summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-01-16 20:00:57 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-01-16 20:00:57 +0000
commitbcfe4064658aad62431d9e96644c7a3eafd301b4 (patch)
treef2296b5e0c212ad92c1347e54b449d09a4a1c160
parent5952806e050a8494cdff3368b144de206def8780 (diff)
- check for -nostdlib
-rw-r--r--Makerules6
-rw-r--r--Rules.mak1
2 files changed, 4 insertions, 3 deletions
diff --git a/Makerules b/Makerules
index 409a8decd..44292ed9c 100644
--- a/Makerules
+++ b/Makerules
@@ -127,7 +127,7 @@ define link.so
$(Q)$(RM) $@ $@.$(2) $(dir $@)$(1)
@$(disp_ld)
$(Q)$(CC) $(LDFLAGS-$(notdir $@)) -Wl,-soname=$(notdir $@).$(2) \
- -nostdlib -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) \
+ $(NOSTDLIB_CFLAGS) -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)
@@ -153,7 +153,7 @@ define link-flat.so
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $(1) $@
@$(disp_ld)
- $(Q)$(CC) $(LDFLAGS-$(notdir $@)) -nostdlib -o $(1) \
+ $(Q)$(CC) $(LDFLAGS-$(notdir $@)) $(NOSTDLIB_CFLAGS) -o $(1) \
-Wl,-elf2flt -Wl,-shared-lib-id,$(2) $(top_builddir)lib/Scrt1.o \
$(top_builddir)/lib/crti.o -Wl,--whole-archive $(firstword $^) \
$(LIBGCC) -Wl,--no-whole-archive $(LIBS-$(notdir $@)) $(LIBGCC) \
@@ -165,7 +165,7 @@ define linkm.so
$(Q)$(RM) $@ $@.$(2) $(dir $@)$(1)
@$(disp_ld)
$(Q)$(CC) $(LDFLAGS-$(notdir $@)) -Wl,-soname=$(notdir $@).$(2) \
- -nostdlib -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) $^ \
+ $(NOSTDLIB_CFLAGS) -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) $^ \
$(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@))
$(Q)$(LN) -sf $(1) $@.$(2)
$(Q)$(LN) -sf $(1) $@
diff --git a/Rules.mak b/Rules.mak
index 4d6309717..bda4e1853 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -383,6 +383,7 @@ else
SSP_CFLAGS := $(SSP_DISABLE_FLAGS)
endif
+NOSTDLIB_CFLAGS:=$(call check_gcc,-nostdlib,)
# Some nice CFLAGS to work with
CFLAGS := -include $(top_builddir)include/libc-symbols.h \
$(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \