From 8c66e0a6c7987cda9df8c88e84b3d50d573c1dbb Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 11 Mar 2015 22:59:51 +0100 Subject: buildsys: create linker script with proper flags We were not passing the correct use-ld and -m{32,64,...} when creating the linker script. Revisit for gold later on anyway. Signed-off-by: Bernhard Reutner-Fischer --- Makerules | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Makerules') diff --git a/Makerules b/Makerules index 1596988d2..cc543889c 100644 --- a/Makerules +++ b/Makerules @@ -326,9 +326,10 @@ cmd_hcompile.o = $(HOSTCC) $(filter-out $(PHONY),$<) $(DEPS-$(notdir $@)) -c -o define create-lds $(Q)$(RM) $@.lds - $(Q)$(CC) -nostdlib -nostartfiles -shared -Wl,-z,combreloc \ - -Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \ - -Wl,--verbose 2>&1 | LC_ALL=C \ + $(Q)$(CC) $(LDFLAG-fuse-ld) $(CPU_LDFLAGS-y) \ + -nostdlib -nostartfiles -shared -Wl,-z,combreloc \ + -Wl,-z,relro $(CFLAG_-Wl--hash-style=gnu) -Wl,-z,defs \ + -x c /dev/null -Wl,--verbose 2>&1 | LC_ALL=C \ $(SED) -e '/^=========/,/^=========/!d;/^=========/d' \ -e 's/^\([ ]*\)\. = .* + SIZEOF_HEADERS;/&\n\1$(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds endef -- cgit v1.2.3 From 5d3c0cc2aa60da804c9c981ffd5edcd2f02f1977 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 18 Mar 2015 22:31:53 +0100 Subject: buildsys: fix IS_IN_lib* for .i Signed-off-by: Bernhard Reutner-Fischer --- Makerules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makerules') diff --git a/Makerules b/Makerules index cc543889c..a60338a87 100644 --- a/Makerules +++ b/Makerules @@ -29,7 +29,7 @@ objs: all_objs # apply unconditional per-directory flags define add_IS_IN_lib ifneq ($(strip $(2)),) -__add_IS_IN_lib := $(2) +__add_IS_IN_lib := $(2) $(2:.o=.i) $(2:.os=.i) $(2:.oS=.i) $$(__add_IS_IN_lib): CFLAGS-for-library-members:=$(CFLAGS-$(1)) -DIN_LIB=$(word 1,$(subst /, ,$(1))) endif endef -- cgit v1.2.3 From c846358a61434e6cb9b1f73bc35df0e5404f52d2 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 24 Mar 2015 00:11:41 +0100 Subject: buildsys: fix IS_IN_lib* for .s Signed-off-by: Bernhard Reutner-Fischer --- Makerules | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makerules') diff --git a/Makerules b/Makerules index a60338a87..fd6bb190d 100644 --- a/Makerules +++ b/Makerules @@ -29,7 +29,9 @@ objs: all_objs # apply unconditional per-directory flags define add_IS_IN_lib ifneq ($(strip $(2)),) -__add_IS_IN_lib := $(2) $(2:.o=.i) $(2:.os=.i) $(2:.oS=.i) +__add_IS_IN_lib := $(2) +__add_IS_IN_lib += $(2:.o=.i) $(2:.os=.i) $(2:.oS=.i) +__add_IS_IN_lib += $(2:.o=.s) $(2:.os=.s) $(2:.oS=.s) $$(__add_IS_IN_lib): CFLAGS-for-library-members:=$(CFLAGS-$(1)) -DIN_LIB=$(word 1,$(subst /, ,$(1))) endif endef -- cgit v1.2.3