From patchwork Thu Oct 9 08:46:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Walle X-Patchwork-Id: 397938 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1F8291400B8 for ; Thu, 9 Oct 2014 19:46:25 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=da1QMXhL7CcxFJk3SHvKYrvC1g4irMIwYaE5qamx5SXJhHOE6lGB0 dZBRa01pnXbNu9w47is2Xq7aFONE0HAfL3zGk1CMjRiv1p742SfKoFpTet4G72Kg 8F8jbPtmGCTClhWE8EinMtexSRIXyhPnl4Xdk/XiV9UH5pccFVy3q0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=8ozZY81O5BUA2YZmp7N6Uhcuwhk=; b=D3/AMfFDZmp0FfirNrMkMXj5dEhQ yB4k901TpqZQMVRsY80/27X++MV6E0LQSa68hFEJAjHuzmOUzUn+1Z/X+FGs4MO7 jTOuiU0ed3KKG7J5b2WwUWU9BNH2EvqTjov+sATPntfxj8KR6sl9X4wWXilzTQ7c bRt9hPUV5WGMV3s= Received: (qmail 340 invoked by alias); 9 Oct 2014 08:46:17 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@sourceware.org Received: (qmail 331 invoked by uid 89); 9 Oct 2014 08:46:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: smtprelay04.ispgateway.de Received: from smtprelay04.ispgateway.de (HELO smtprelay04.ispgateway.de) (80.67.31.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 09 Oct 2014 08:46:15 +0000 Received: from [93.215.213.51] (helo=localhost) by smtprelay04.ispgateway.de with esmtpsa (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.84) (envelope-from ) id 1Xc9MR-00036w-Ml; Thu, 09 Oct 2014 10:46:11 +0200 From: Bernhard Walle To: crossgcc@sourceware.org Cc: Bernhard Walle Subject: [RESEND] [PATCH] cc/gcc: Fix dynamic linker path for hard float libc Date: Thu, 9 Oct 2014 10:46:07 +0200 Message-Id: <1412844367-5815-1-git-send-email-bernhard@bwalle.de> X-Df-Sender: YmVybmhhcmRAYndhbGxlLmRl X-IsSubscribed: yes When compiling glibc 2.16 and gcc 4.7.4 with CT_ARCH_FLOAT="hard", I end up in a dynamic linker called /lib/ld-linux-armhf.so.3, but gcc compiles the binaries with an ELF interpreter /lib/ld-linux.so.3. That doesn't work. This patch (which is included in recent gcc version and also is included in Linaro 4.7 versions) fixes the problem. I just stripped the ChangeLog diff from the original commit. Signed-off-by: Bernhard Walle --- patches/gcc/4.7.4/100-hardfloat-ld.patch | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 patches/gcc/4.7.4/100-hardfloat-ld.patch diff --git a/patches/gcc/4.7.4/100-hardfloat-ld.patch b/patches/gcc/4.7.4/100-hardfloat-ld.patch new file mode 100644 index 0000000..0e97b6f --- /dev/null +++ b/patches/gcc/4.7.4/100-hardfloat-ld.patch @@ -0,0 +1,44 @@ +From 9dd1a0668e5ab10a5943fdd1aee2e1616d7fc7ed Mon Sep 17 00:00:00 2001 +From: michaelh +Date: Thu, 26 Apr 2012 04:33:08 +0000 +Subject: [PATCH] 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. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186859 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/config/arm/linux-eabi.h | 12 +++++++++++- + 2 files changed, 19 insertions(+), 1 deletion(-) + +diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h +index 80bd825..2ace6f0 100644 +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -62,7 +62,17 @@ + /* Use ld-linux.so.3 so that it will be possible to run "classic" + GNU/Linux binaries on an EABI system. */ + #undef GLIBC_DYNAMIC_LINKER +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" ++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" ++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" ++#if TARGET_DEFAULT_FLOAT_ABI == ARM_FLOAT_ABI_HARD ++#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_HARD_FLOAT ++#else ++#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT ++#endif ++#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. */ +-- +2.1.0 +