From: Mischa Jonker <Mischa.Jonker@synopsys.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 07/11] arc: Make sure that libgcc doesn't get included when it doesn't exist yet
Date: Thu, 2 May 2013 15:00:46 +0200 [thread overview]
Message-ID: <1367499650-29869-8-git-send-email-mjonker@synopsys.com> (raw)
In-Reply-To: <1367499650-29869-1-git-send-email-mjonker@synopsys.com>
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>
---
toolchain/uClibc/uclibc.mk | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk
index 1629e76..d4f1d4c 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 $@
--
1.7.0.4
next prev parent reply other threads:[~2013-05-02 13:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 13:00 [Buildroot] [PATCH v3 00/11] ARC port Mischa Jonker
2013-05-02 13:00 ` [Buildroot] [PATCH v3 01/11] arc: Add ARC and ARC BE architecture Mischa Jonker
2013-05-02 13:00 ` [Buildroot] [PATCH v3 02/11] arc: Add option for ARC-specific download site Mischa Jonker
2013-05-02 13:00 ` [Buildroot] [PATCH v3 03/11] arc: Add support for ARC-specific binutils Mischa Jonker
2013-05-02 13:00 ` [Buildroot] [PATCH v3 04/11] arc: disable Crosstool-NG for ARC Mischa Jonker
2013-05-02 13:00 ` [Buildroot] [PATCH v3 05/11] arc: add gcc " Mischa Jonker
2013-05-02 13:00 ` [Buildroot] [PATCH v3 06/11] arc: Add support for ARC-specific uClibc Mischa Jonker
2013-05-02 13:00 ` Mischa Jonker [this message]
2013-05-02 13:00 ` [Buildroot] [PATCH v3 08/11] toolchain/gcc: Only enable --with-float when it makes sense Mischa Jonker
2013-05-02 13:00 ` [Buildroot] [PATCH v3 09/11] toolchain/toolchain-buildroot: Disable NPTL for ARC Mischa Jonker
2013-05-02 13:00 ` [Buildroot] [PATCH v3 10/11] arc: Add arc, arcbe to gnuconfig Mischa Jonker
2013-05-02 13:00 ` [Buildroot] [PATCH v3 11/11] kernel-headers: Add support for ARC kernel headers Mischa Jonker
2013-05-02 15:24 ` [Buildroot] [PATCH v3 00/11] ARC port Thomas Petazzoni
2013-05-02 15:30 ` Mischa Jonker
2013-05-02 16:29 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1367499650-29869-8-git-send-email-mjonker@synopsys.com \
--to=mischa.jonker@synopsys.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox