rules.mk: Use $(CXX) instead of $(LD) for linking

CXX is used for linking instead of LD now, since LD might point to the real
linker, which doesn't understand -Wl,--blah options, of course.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-06-15 10:06:50 +00:00
commit cbd944d254

View file

@ -275,10 +275,10 @@ strip.done: $(EXE_ALL)
ifeq ($(LIBTYPE),shared)
$(SO_PREFIX)%.so: %.o
$(LD) -shared $(REAL_LDFLAGS) $(FLAVOUR_PREFIX)$^ -o $@
$(CXX) -shared $(REAL_LDFLAGS) $(FLAVOUR_PREFIX)$^ -o $@
else
$(SO_PREFIX)%.so: %.o
$(LD) $(REAL_LDFLAGS) $(FLAVOUR_PREFIX)$^ -o $@
$(CXX) $(REAL_LDFLAGS) $(FLAVOUR_PREFIX)$^ -o $@
endif
$(VERSION_SCRIPT):