From patchwork Mon May 14 17:16:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Shen X-Patchwork-Id: 159075 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]) by ozlabs.org (Postfix) with SMTP id E30E1B7002 for ; Tue, 15 May 2012 03:17:15 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1337620636; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:Reply-To:Message-ID:Date:Subject:From:To: Cc:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=gifNrIx wVLXfmzQGE/LH9yHhHcs=; b=atPpIPrizvz1IpGanCuioc7DqA1j2QaiBbDn+FG U1uv202EQXy0Y5ma+TO+KFTBz5cpWmk5c1wtfbfcyLSn2UNkfLNX/w5VnKk+rbvi 5cbrHiHc3mfrXl2SUFKOT49V+cqdMBhCJ8eAgzGax1iUh80rjtEDyYIrLLspZMhv LJHw= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:MIME-Version:Received:Reply-To:X-Google-Appengine-App-Id:Message-ID:Date:Subject:From:To:Cc:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=wIzLws5OkZM0V2bGHy3Dh+jPBGDCSiwJNYUNKCrHctgVFzwwmrUTUrYN7phvLJ Eh5p7rGgb4tMOA/QHuD9o9EidUw4gUed+sQZtd6294Z7F4OEh9I3FdImliwBs2V/ gFYI/0D2BM4odDlvNVa8tCdZzPx34iI0ZZ9RYl4zkEFh0=; Received: (qmail 17411 invoked by alias); 14 May 2012 17:17:10 -0000 Received: (qmail 17290 invoked by uid 22791); 14 May 2012 17:17:07 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_DF, TW_ZJ, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-gg0-f197.google.com (HELO mail-gg0-f197.google.com) (209.85.161.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 May 2012 17:16:54 +0000 Received: by ggki25 with SMTP id i25so7126062ggk.8 for ; Mon, 14 May 2012 10:16:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:reply-to:x-google-appengine-app-id:message-id:date :subject:from:to:cc:content-type:x-gm-message-state; bh=XmvImPGyMLlh0Qx4rmJYQwjurN4BxiHiE6OaQtCzonk=; b=MSybXanqw2cD5aSYQV/0jbz2aaqCA/0ky+nPP2+QC/9h7Rpk6+D7hIwtpw1m465ra5 whqH3PhTqW5oNYdscBkgyPLnni9HxcwaEixh18ypvbE4g9PKAem20lSW+1UZP6TkV4Ez EyC6W7GPmbIz621SR93VA0KM3fZOCVk34HIUCbXc1vSGG1uwkmsoPczu9lnaSNY60wSo HZLlq4BwJzYHG5Pb/2N6s41AY621nwdDzfvtq4DJAzrIJyWJs1iL2o90B6J/Uv90iDxA Kk6yQck/6SaqoyJKGJq+0VYPscsrLCi0KbBhMcXZ3o3sRt5ui1jj+GCsYtDgU8h1b+WY D8Qw== Received: by 10.101.133.36 with SMTP id k36mr3109215ann.25.1337015813021; Mon, 14 May 2012 10:16:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.101.133.36 with SMTP id k36mr3109207ann.25.1337015812867; Mon, 14 May 2012 10:16:52 -0700 (PDT) Reply-To: shenhan@google.com, carrot@google.com, xur@google.com, gcc-patches@gcc.gnu.org, asharif@google.com, reply@codereview-hr.appspotmail.com X-Google-Appengine-App-Id: s~codereview-hr Message-ID: <0016e68fd01895c96804c00240cb@google.com> Date: Mon, 14 May 2012 17:16:52 +0000 Subject: Re: [google/gcc-4_6] Backport arm hardfp patch from trunk (issue 6206055) From: shenhan@google.com To: carrot@google.com, xur@google.com Cc: gcc-patches@gcc.gnu.org, asharif@google.com, reply@codereview-hr.appspotmail.com X-Gm-Message-State: ALoCoQl5DT9R1Dw5aoK2BlxSYEWs5I3YfuVQTQ6/hSiIewKD8w/8q2La/L6CYxfMqF6ZQyMzW2NLUppN9EirhuWPq3TUC4eyKZC/8cGUWSIpoimVkW8xVSG5UVY7l0PLJPsrlpvNS42odCKkPB1p5D/qUWP5xqhA9Q== X-IsSubscribed: yes 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 On 2012/05/11 22:15:37, carrot wrote: > http://codereview.appspot.com/6206055/diff/4001/gcc/ChangeLog > File gcc/ChangeLog (right): http://codereview.appspot.com/6206055/diff/4001/gcc/ChangeLog#newcode11 > gcc/ChangeLog:11: > It seems you also merged in another patch r187012, please mention it. http://codereview.appspot.com/6206055/diff/4001/gcc/config/arm/linux-eabi.h > File gcc/config/arm/linux-eabi.h (right): http://codereview.appspot.com/6206055/diff/4001/gcc/config/arm/linux-eabi.h#newcode77 > gcc/config/arm/linux-eabi.h:77: RUNTIME_ROOT_PREFIX > GLIBC_DYNAMIC_LINKER_SOFT_FLOAT > Here the RUNTIME_ROOT_PREFIX may be redundant. Hi Carrot, thanks! Modified per your comments. @@ -59,10 +60,25 @@ #undef SUBTARGET_EXTRA_LINK_SPEC #define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION -/* Use ld-linux.so.3 so that it will be possible to run "classic" - GNU/Linux binaries on an EABI system. */ +/* GNU/Linux on ARM currently supports three dynamic linkers: + - ld-linux.so.2 - for the legacy ABI + - ld-linux.so.3 - for the EABI-derived soft-float ABI + - ld-linux-armhf.so.3 - for the EABI-derived hard-float ABI. + All the dynamic linkers live in /lib. + We default to soft-float, but this can be overridden by changing both + GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI. */ + #undef GLIBC_DYNAMIC_LINKER -#define GLIBC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/lib/ld-linux.so.3" +#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT \ + RUNTIME_ROOT_PREFIX "/lib/ld-linux.so.3" +#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT \ + RUNTIME_ROOT_PREFIX "/lib/ld-linux-armhf.so.3" +#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT + +#define GLIBC_DYNAMIC_LINKER \ + "%{mfloat-abi=hard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \ + %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ + %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to use the GNU/Linux version, not the generic BPABI version. */ ============= http://codereview.appspot.com/6206055/ ========= Patch start diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f85855..afe7769 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,19 @@ +2012-05-11 Han Shen + + Backport from mainline. + 2012-05-01 Richard Earnshaw + + * arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_DEFAULT): Avoid ifdef + comparing enumeration values. Update comments. + + 2012-04-26 Michael Hope + Richard Earnshaw + + * config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_SOFT_FLOAT): Define. + (GLIBC_DYNAMIC_LINKER_HARD_FLOAT): Define. + (GLIBC_DYNAMIC_LINKER_DEFAULT): Define. + (GLIBC_DYNAMIC_LINKER): Redefine to use the hard float path. + 2012-04-30 Uros Bizjak Backport from mainline diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h index 3a32188..e1d3415 100644 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h @@ -32,7 +32,8 @@ while (false) /* We default to a soft-float ABI so that binaries can run on all - target hardware. */ + target hardware. If you override this to use the hard-float ABI then + change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well. */ #undef TARGET_DEFAULT_FLOAT_ABI #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT