From patchwork Wed Dec 7 03:36:23 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 129884 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 AFA79B6F6F for ; Wed, 7 Dec 2011 14:36:44 +1100 (EST) Received: (qmail 32629 invoked by alias); 7 Dec 2011 03:36:38 -0000 Received: (qmail 32492 invoked by uid 22791); 7 Dec 2011 03:36:37 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Dec 2011 03:36:23 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 31E721B401A; Wed, 7 Dec 2011 03:36:22 +0000 (UTC) From: Mike Frysinger To: gcc-patches@gcc.gnu.org Cc: s390@gentoo.org, Aurelien Jarno , Martin Schwidefsky Subject: [PATCH] _GCC_PICFLAG: use -fPIC for s390x targets Date: Tue, 6 Dec 2011 22:36:23 -0500 Message-Id: <1323228983-27811-1-git-send-email-vapier@gentoo.org> 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 Building newer libiberty for s390x targets fails with relocation errors: libiberty/pic/libiberty.a(hashtab.o): In function 'htab_create': libiberty/hashtab.c:408:(.text+0x5e4): relocation truncated to fit: R_390_GOT12 against symbol 'xcalloc' defined in .text section in libiberty/pic/libiberty.a(xmalloc.o) libiberty/pic/libiberty.a(hashtab.o): In function 'htab_try_create': libiberty/hashtab.c:414:(.text+0x61c): relocation truncated to fit: R_390_GOT12 against symbol 'calloc@@GLIBC_2.2' defined in .text section in /lib/libc.so.6 collect2: ld returned 1 exit status Building with larger GOT (-fPIC rather than -fpic) fixes this. CC: Aurelien Jarno CC: Martin Schwidefsky Signed-off-by: Mike Frysinger config/: 2011-12-06 Mike Frysinger * picflag.m4 (_GCC_PICFLAG): Set $1 to -fPIC for s390x*-*-*. gcc/: libada/: libgcc/: libiberty/: 2011-12-06 Mike Frysinger * configure: Regenerate. --- config/picflag.m4 | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/config/picflag.m4 b/config/picflag.m4 index f6f1b44..db2ce0f 100644 --- a/config/picflag.m4 +++ b/config/picflag.m4 @@ -51,6 +51,9 @@ case "${$2}" in m68k-*-*) $1=-fpic ;; + s390x*-*-*) + $1=-fpic + ;; s390*-*-*) $1=-fpic ;;