From c05b7f4153af543284b1af35eff2efc7bef997ee Mon Sep 17 00:00:00 2001 From: Chris J Arges Date: Wed, 25 Jun 2014 23:52:00 +0400 Subject: [PATCH] Ensure LDFLAGS is passed to CC not LD. If we build with something like: make LDFLAGS="-Wl,-Bsymbolic-functions" We'll get an error because the LDFLAGS are being passed to LD when they should be pased to CC. Signed-off-by: Chris J Arges Acked-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- scripts/Makefile.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 5ea61b702..ad0b24587 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -172,7 +172,7 @@ $(1)-all-objs += $(all-objs) $$(obj)/$(1).built-in.o: $$($(1)-all-objs) $$($(1)-libs-e) $(libs-e) $$(E) " LINK " $$@ - $$(Q) $$(LD) $$(LDFLAGS) -r -o $$@ $$^ + $$(Q) $$(LD) -r -o $$@ $$^ _all += $$(obj)/$(1).built-in.o cleanup-y += $$(obj)/$(1).built-in.o @@ -193,7 +193,7 @@ ifeq ($(targets),) ifneq ($(all-objs),) $(obj)/built-in.o: $(all-objs) $(libs-e) $(E) " LINK " $@ - $(Q) $(LD) $(LDFLAGS) -r -o $@ $^ + $(Q) $(LD) -r -o $@ $^ _all += $(obj)/built-in.o cleanup-y += $(obj)/built-in.o @@ -205,7 +205,7 @@ endif ifneq ($(lib-so),) $(obj)/$(lib-so).so: $(all-objs) $(libs-e) $(E) " LINK " $@ - $(Q) $(CC) -shared $(cflags-so) -o $@ $^ $(ldflags-so) + $(Q) $(CC) -shared $(cflags-so) -o $@ $^ $(ldflags-so) $(LDFLAGS) _all += $(obj)/$(lib-so).so cleanup-y += $(obj)/$(lib-so).so