Commit c05b7f41 authored by Chris J Arges's avatar Chris J Arges Committed by Pavel Emelyanov

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: 's avatarChris J Arges <chris.j.arges@canonical.com>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 64dc66c2
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment