]> xenbits.xensource.com Git - seabios.git/commitdiff
build: Avoid absolute paths during "whole-program" compiling.
authorKevin O'Connor <kevin@koconnor.net>
Tue, 3 Jun 2014 19:22:31 +0000 (15:22 -0400)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 10 Nov 2014 10:29:46 +0000 (11:29 +0100)
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)

Makefile

index 78b598eeec93a01670e9ece459beb425e337778b..7c2b33c3abbb62b3a12cdd6d98a76f2509a9b053 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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