summaryrefslogtreecommitdiffstats
path: root/toolchain/uClibc
diff options
context:
space:
mode:
authorMischa Jonker <mischa.jonker@synopsys.com>2013-05-02 09:51:29 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2013-05-04 23:21:31 +0200
commita6e6bf3ef63781579784f6c31f6f5d8d374e0f64 (patch)
treec1c4c1ebfa13113e2152ebbcd86d63a73606c760 /toolchain/uClibc
parent5de23bf875e34fd89eff5b9472ab501c2992b6b1 (diff)
downloadbuildroot-novena-a6e6bf3ef63781579784f6c31f6f5d8d374e0f64.tar.gz
buildroot-novena-a6e6bf3ef63781579784f6c31f6f5d8d374e0f64.zip
arc: Make sure that libgcc doesn't get included when it doesn't exist yet
For ARC, libgcc is always included, even when -nostdlib is given. This is related to some small pieces of code that are not always generated by the compiler; a call to libgcc is used in those cases instead. During the initial stages of building the toolchain, this is a problem, as libgcc does not exist yet. The ARC compiler supports -really-nostdlib to override the default behavior. Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain/uClibc')
-rw-r--r--toolchain/uClibc/uclibc.mk15
1 files changed, 13 insertions, 2 deletions
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index 1629e7625..d4f1d4cdf 100644
--- a/toolchain/uClibc/uclibc.mk
+++ b/toolchain/uClibc/uclibc.mk
@@ -404,6 +404,17 @@ ifeq ($(BR2_CCACHE),y)
$(UCLIBC_DIR)/.config: | host-ccache
endif
+# For ARC, libgcc is always included, even when -nostdlib is given. This
+# is related to some small pieces of code that are not always generated
+# by the compiler; a call to libgcc is used in those cases instead.
+#
+# During the initial stages of building the toolchain, this is a problem,
+# as libgcc does not exist yet. The ARC compiler supports -really-nostdlib
+# to override the default behavior.
+ifeq ($(BR2_arc),y)
+REALLY_NOSTDLIB=-really-nostdlib
+endif
+
$(UCLIBC_DIR)/.configured: $(LINUX_HEADERS_DIR)/.configured $(UCLIBC_DIR)/.config
$(Q)$(call MESSAGE,"Installing uClibc headers")
$(MAKE1) -C $(UCLIBC_DIR) \
@@ -422,8 +433,8 @@ $(UCLIBC_DIR)/.configured: $(LINUX_HEADERS_DIR)/.configured $(UCLIBC_DIR)/.confi
cp -pLR $(LINUX_HEADERS_DIR)/include/* \
$(TOOLCHAIN_DIR)/uClibc_dev/usr/include/; \
fi
- $(TARGET_CROSS)gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/libc.so
- $(TARGET_CROSS)gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/libm.so
+ $(TARGET_CROSS)gcc -nostdlib $(REALLY_NOSTDLIB) -nostartfiles -shared -x c /dev/null -o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/libc.so
+ $(TARGET_CROSS)gcc -nostdlib $(REALLY_NOSTDLIB) -nostartfiles -shared -x c /dev/null -o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/libm.so
cp -pLR $(UCLIBC_DIR)/lib/crt[1in].o $(TOOLCHAIN_DIR)/uClibc_dev/usr/lib/
touch $@