From patchwork Tue Mar 19 09:15:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhenqiang Chen X-Patchwork-Id: 228981 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 3AFF52C00BF for ; Tue, 19 Mar 2013 21:08:20 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=dkim1; b=G04mQ0PyzgoCtS3c+I rIVuQ1Xya56Bi1bvuPRiIq/4QAP4Y9nnOr1gM6JkgIsjEP0IdK4xIY9D/gtnv1LS C/b589ZCcH/5yAZ/dCHsOjS0XAl1ErwCUcpm/wZs2yJBLvkrqiQjawzpMJo5gfne HfMc2BydpyfN+5lPeUXHQCG0Q= DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=dkim1; bh=VPR8GUotXNws8+krEXSTd5mH yhg=; b=tCFW1X8inFui7RpVGhTbuPC/aO9oQg0Ok86Yd60zynRV9rKkpFRUBesf stlZRz2SQcwhr6WsWGvXKhyb2kAUAkD7md9fjJIWl3L0BG6Pb2PbZtd67BA4Z9hH ZUZKObMhM+oqFb5KNrLzip88PsH7vQW3XVHtXPdb338pqcHEKZw= Received: (qmail 26122 invoked by alias); 19 Mar 2013 09:39:59 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 25998 invoked by uid 89); 19 Mar 2013 09:15:26 -0000 Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 19 Mar 2013 09:15:26 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Tue, 19 Mar 2013 09:15:22 +0000 Received: from shawin003 ([10.164.2.44]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Tue, 19 Mar 2013 09:15:19 +0000 From: "Zhenqiang Chen" To: Subject: [PATCH, ARM] Extend uclinux LINK_GCC_C_SEQUENCE_SPEC Date: Tue, 19 Mar 2013 17:15:02 +0800 Message-ID: <000001ce2482$3dddfd70$b999f850$@arm.com> MIME-Version: 1.0 X-MC-Unique: 113031909152207901 Hi, libstdc++ configure will check "shl_load". If shared library is disabled in gcc and uclibc configure, the libstdc++ configure will fail for options like -mthumb -march=armv7-r. The fail logs like: .../libgcc.a(unwind-arm.o): In function `unwind_phase2_forced': unwind-arm.c:(.text+0x282): undefined reference to `memcpy' unwind-arm.c:(.text+0x2b0): undefined reference to `memcpy' collect2: error: ld returned 1 exit status Logs show uclibc depends on "__aeabi_unwind_cpp_pr1" from libgcc. And unwind_phase2_forced from libgcc depends on memcpy from uclibc. So an additional %L is required for non-static link. Is it OK for trunk? Thanks! -Zhenqiang 2013-03-19 Zhenqiang Chen * config/arm/uclinux-elf.h: Add %L to LINK_GCC_C_SEQUENCE_SPEC for non- static link diff --git a/gcc/config/arm/uclinux-elf.h b/gcc/config/arm/uclinux-elf.h index c1fe9f1..74d63df 100644 --- a/gcc/config/arm/uclinux-elf.h +++ b/gcc/config/arm/uclinux-elf.h @@ -65,7 +65,7 @@ #undef LINK_GCC_C_SEQUENCE_SPEC #define LINK_GCC_C_SEQUENCE_SPEC \ - "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}" + "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G %L}" /* Use --as-needed -lgcc_s for eh support. */ #ifdef HAVE_LD_AS_NEEDED