From patchwork Mon Apr 22 11:37:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mischa Jonker X-Patchwork-Id: 238479 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 725542C00C9 for ; Mon, 22 Apr 2013 21:39:56 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id D6B4F31B6E; Mon, 22 Apr 2013 11:39:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l7T5NbrZ7kEP; Mon, 22 Apr 2013 11:39:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 7138D31802; Mon, 22 Apr 2013 11:39:17 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 365F08F7AA for ; Mon, 22 Apr 2013 11:39:01 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3F7CD80819 for ; Mon, 22 Apr 2013 11:39:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8Qy-vV-0VkRN for ; Mon, 22 Apr 2013 11:39:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from vaxjo.synopsys.com (us02smtp1.synopsys.com [198.182.60.75]) by whitealder.osuosl.org (Postfix) with ESMTP id 7827280057 for ; Mon, 22 Apr 2013 11:39:01 +0000 (UTC) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by vaxjo.synopsys.com (Postfix) with ESMTP id 7BE36E10D for ; Mon, 22 Apr 2013 04:38:52 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 61B7EE45; Mon, 22 Apr 2013 04:38:52 -0700 (PDT) Received: from localhost.localdomain (nl-droid1.internal.synopsys.com [10.100.24.228]) by mailhost.synopsys.com (Postfix) with ESMTP id ADE49E44; Mon, 22 Apr 2013 04:38:51 -0700 (PDT) From: Mischa Jonker To: buildroot@busybox.net Date: Mon, 22 Apr 2013 13:37:31 +0200 Message-Id: <1366630651-6857-8-git-send-email-mjonker@synopsys.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1366630651-6857-1-git-send-email-mjonker@synopsys.com> References: <1366630651-6857-1-git-send-email-mjonker@synopsys.com> Cc: Mischa Jonker Subject: [Buildroot] [PATCH 7/7] arc: Make sure that libgcc doesn't get included when it doesn't exist yet X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net 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 --- toolchain/uClibc/uclibc.mk | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/toolchain/uClibc/uclibc.mk b/toolchain/uClibc/uclibc.mk index 1629e76..14083a9 100644 --- a/toolchain/uClibc/uclibc.mk +++ b/toolchain/uClibc/uclibc.mk @@ -404,6 +404,12 @@ ifeq ($(BR2_CCACHE),y) $(UCLIBC_DIR)/.config: | host-ccache endif +ifeq ($(BR2_arc)$(BR2_arceb),) +REALLY_NOSTDLIB= +else +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 +428,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 $@