diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2014-06-03 15:22:31 -0400 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-11-10 11:29:46 +0100 |
commit | 7acede7842fc3e605e0ed97bd2ae1b3c87db2bda (patch) | |
tree | 09d4d6dd55e0f30c153523e83533d100208c8a7e | |
parent | e798f6c4bd3da06e848201b724e2a9a8252ceb22 (diff) | |
download | seabios-7acede7842fc3e605e0ed97bd2ae1b3c87db2bda.zip seabios-7acede7842fc3e605e0ed97bd2ae1b3c87db2bda.tar.gz seabios-7acede7842fc3e605e0ed97bd2ae1b3c87db2bda.tar.bz2 |
build: Avoid absolute paths during "whole-program" compiling.
The build currently does a textual include of all files in order to
use the -fwhole-compile optimization. Update it to use relative file
paths instead of absolute file paths. This makes the section names in
the resulting binary more readable. It also makes the build easier on
some Windows hosts.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
(cherry picked from commit ec44fac1f69bd3d513204a6192623de511b11144)
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -112,8 +112,8 @@ endif # 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 "$(CURDIR)/$i"\n)' > $3.tmp.c -$(Q)$(CC) $1 $(CFLAGSWHOLE) -c $3.tmp.c -o $3 +$(Q)printf '$(foreach i,$2,#include "$i"\n)' > $3.tmp.c +$(Q)$(CC) -I. $1 $(CFLAGSWHOLE) -c $3.tmp.c -o $3 endef %.strip.o: %.o |