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>
This commit is contained in:
parent
ca34ce5aaa
commit
ec44fac1f6
4
Makefile
4
Makefile
|
@ -111,8 +111,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
|
||||
|
|
Loading…
Reference in New Issue