diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2012-12-11 21:59:45 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2012-12-11 21:59:45 -0500 |
commit | fa2eacbb9affd0d6b56a28a71041f7e63505805c (patch) | |
tree | e2164062e334bce1e6deba95952a39c0fd3da5b8 /Makefile | |
parent | 3ffa8cc090cd0277db25819b6f00864eaf113f26 (diff) | |
download | seabios-fa2eacbb9affd0d6b56a28a71041f7e63505805c.tar.gz |
Don't use gcc's -combine option.
The combine option has been deprecated from gcc for the last few
revisions. The option doesn't add any real benefits, so there's no
real point in checking for it on the few systems that will still have
it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 5 insertions, 22 deletions
@@ -89,34 +89,17 @@ ifeq "$(TESTGCC)" "-1" $(error "Please upgrade the build environment") endif -ifndef COMPSTRAT -COMPSTRAT=$(TESTGCC) +ifeq "$(TESTGCC)" "0" +# Use -fwhole-program +CFLAGSWHOLE=-fwhole-program -DWHOLE_PROGRAM endif -# Do a whole file compile - three methods are supported. -ifeq "$(COMPSTRAT)" "1" -# First method - use -fwhole-program without -combine. +# Do a whole file compile by textually including all C code. define whole-compile @echo " Compiling whole program $3" $(Q)printf '$(foreach i,$2,#include "../$i"\n)' > $3.tmp.c -$(Q)$(CC) $1 -fwhole-program -DWHOLE_PROGRAM -c $3.tmp.c -o $3 +$(Q)$(CC) $1 $(CFLAGSWHOLE) -c $3.tmp.c -o $3 endef -else -ifeq "$(COMPSTRAT)" "2" -# Second menthod - don't use -fwhole-program at all. -define whole-compile -@echo " Compiling whole program $3" -$(Q)printf '$(foreach i,$2,#include "../$i"\n)' > $3.tmp.c -$(Q)$(CC) $1 -c $3.tmp.c -o $3 -endef -else -# Third (and preferred) method - use -fwhole-program with -combine -define whole-compile -@echo " Compiling whole program $3" -$(Q)$(CC) $1 -fwhole-program -DWHOLE_PROGRAM -combine -c $2 -o $3 -endef -endif -endif %.strip.o: %.o @echo " Stripping $@" |