From patchwork Tue Dec 24 13:25:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vineet Gupta X-Patchwork-Id: 304972 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 28E712C00A7 for ; Wed, 25 Dec 2013 00:25:47 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2FFE5896A3; Tue, 24 Dec 2013 13:25:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o-B-ERrGXEeh; Tue, 24 Dec 2013 13:25:43 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2BE2489363; Tue, 24 Dec 2013 13:25:43 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id A3F7F1BFA7E for ; Tue, 24 Dec 2013 13:25:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9C76D26415 for ; Tue, 24 Dec 2013 13:25:42 +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 R5BjpeXyiOZi for ; Tue, 24 Dec 2013 13:25:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-relay.synopsys.com (vaxjo.synopsys.com [198.182.60.75]) by silver.osuosl.org (Postfix) with ESMTP id 9A3341FDF6 for ; Tue, 24 Dec 2013 13:25:41 +0000 (UTC) Received: from WBSNus02mta2 (us02secmta2.synopsys.com [10.12.235.98]) by smtp-relay.synopsys.com (Postfix) with ESMTP id 42B6BDA50 for ; Tue, 24 Dec 2013 05:25:40 -0800 (PST) Received: from us02secmta2.internal.synopsys.com (us02secmta2.internal.synopsys.com [127.0.0.1]) by us02secmta2.internal.synopsys.com (Service) with ESMTP id 3074155F13 for ; Tue, 24 Dec 2013 05:25:40 -0800 (PST) Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.9.202.240]) by us02secmta2.internal.synopsys.com (Service) with ESMTP id 1931255F02 for ; Tue, 24 Dec 2013 05:25:40 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 0E507D8A for ; Tue, 24 Dec 2013 05:25:40 -0800 (PST) Received: from us01wehtc1.internal.synopsys.com (us01wehtc1.internal.synopsys.com [10.12.239.235]) by mailhost.synopsys.com (Postfix) with ESMTP id 08C78D89 for ; Tue, 24 Dec 2013 05:25:39 -0800 (PST) Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.104) by us01wehtc1.internal.synopsys.com (10.12.239.235) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 24 Dec 2013 05:25:39 -0800 Received: from vineetg-E6520.internal.synopsys.com (10.12.197.70) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.158.1; Tue, 24 Dec 2013 18:55:35 +0530 From: Vineet Gupta To: Subject: [PATCH] ARC: unbork buildroot build Date: Tue, 24 Dec 2013 18:55:17 +0530 Message-ID: <1387891517-16624-1-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 1.8.1.2 MIME-Version: 1.0 X-Originating-IP: [10.12.197.70] Cc: Anton Kolesov , Vineet Gupta , Francois Bedard X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: uclibc-bounces@uclibc.org Sender: uclibc-bounces@uclibc.org crt1.S -> include sysdep.h -> include sysnum.h In multistage gcc build, Buildroot happens to build crt1.S before sysnum.h is generated. So break the above include chain and opencode the ENTRY/END macros. Reported-by: Anton Kolesov Signed-off-by: Vineet Gupta --- libc/sysdeps/linux/arc/crt1.S | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libc/sysdeps/linux/arc/crt1.S b/libc/sysdeps/linux/arc/crt1.S index d78a96dcc4fb..95c41f888850 100644 --- a/libc/sysdeps/linux/arc/crt1.S +++ b/libc/sysdeps/linux/arc/crt1.S @@ -5,7 +5,6 @@ */ #include -#include .text @@ -31,7 +30,12 @@ env[0...N] environment variables (pointers) NULL */ -ENTRY(__start) + .text + .align 4 + .global __start + .hidden __start + .type __start,@function +__start: mov fp, 0 ld_s r1, [sp] ; argc @@ -50,5 +54,4 @@ ENTRY(__start) /* Should never get here.... */ flag 1 -END(__start) -libc_hidden_def(__start) +.size __start,.-__start