summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-10-13 14:50:43 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-10-13 14:50:43 +0000
commit51ce75b5b02a7617bfee5272d9236835be48d02d (patch)
tree45d559f5b9b02f0fa705797081a28f638f52463e /Makerules
parent3936de030a9c53a21825701cea9c4d36e0d00b85 (diff)
- use the compiler-driver instead of the linker
- adjust setting flags accordingly to use (hardcoded, see below) -Wl, Potential improvements: *) --warn-unresolved-symbols should perhaps be used for all libs *) eventually rename LDFLAGS to CC_LDFLAGS *) probe for compiler driver's notion of flag to use for passing in linker flags (i.e. don't hardcode "-Wl,")
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makerules b/Makerules
index b4df69bb6..aec7238a0 100644
--- a/Makerules
+++ b/Makerules
@@ -126,9 +126,9 @@ define link.so
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@ $@.$(2) $(dir $@)$(1)
@$(disp_ld)
- $(Q)$(LD) $(LDFLAGS-$(notdir $@)) -soname=$(notdir $@).$(2) \
- -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) \
- --whole-archive $(firstword $^) --no-whole-archive \
+ $(Q)$(CC) $(LDFLAGS-$(notdir $@)) -Wl,-soname=$(notdir $@).$(2) \
+ -nostdlib -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) \
+ -Wl,--whole-archive $(firstword $^) -Wl,--no-whole-archive \
$(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@))
$(Q)$(LN) -sf $(1) $@.$(2)
$(Q)$(LN) -sf $(1) $@
@@ -150,10 +150,10 @@ define link-flat.so
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $(1) $@
@$(disp_ld)
- $(Q)$(LD) $(LDFLAGS-$(notdir $@)) -o $(1) \
- -elf2flt -shared-lib-id $(2) $(top_builddir)lib/Scrt1.o \
- $(top_builddir)/lib/crti.o --whole-archive $(firstword $^) \
- --no-whole-archive $(LIBS-$(notdir $@)) $(LIBGCC) \
+ $(Q)$(CC) $(LDFLAGS-$(notdir $@)) -nostdlib -o $(1) \
+ -Wl,-elf2flt -Wl,-shared-lib-id $(2) $(top_builddir)lib/Scrt1.o \
+ $(top_builddir)/lib/crti.o -Wl,--whole-archive $(firstword $^) \
+ -Wl,--no-whole-archive $(LIBS-$(notdir $@)) $(LIBGCC) \
$(top_builddir)/lib/crtn.o
endef
@@ -161,8 +161,8 @@ define linkm.so
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@ $@.$(2) $(dir $@)$(1)
@$(disp_ld)
- $(Q)$(LD) $(LDFLAGS-$(notdir $@)) -soname=$(notdir $@).$(2) \
- -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) $^ \
+ $(Q)$(CC) $(LDFLAGS-$(notdir $@)) -Wl,-soname=$(notdir $@).$(2) \
+ -nostdlib -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) $^ \
$(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@))
$(Q)$(LN) -sf $(1) $@.$(2)
$(Q)$(LN) -sf $(1) $@