From patchwork Fri Oct 9 19:51:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lynn A. Boger" X-Patchwork-Id: 528414 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 E38EF140E41 for ; Sat, 10 Oct 2015 07:17:35 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=xYkq9AUL; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=L/MKXoPmcRf9gq8dN RkkgRx+RtxTreWx34ZcGcvKXIGDYogHjQX7410O1Na6ER/dlGqGTA4Qiy8nqmcXb VapTvumXWwfxVjVd9w86Hbib+76fY21hsEGWIqM5oxm3VQ5ZAPubvOvNjOw+H1cl urwlYOTqHu1or6z5KY3pGtUQro= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=e0cut+uDiDZ+5q9i2oeF8dT KtU0=; b=xYkq9AULkASw8nVekp9SYF88MnM7Jm84uBzwpjbYuDh0/kXJqyxlLLL aOmJbb+2/9Mu7qNPHnbfpjEb61N3UsQADaCJZ89GQWqM/JT2OzD6G3RG/Od0+Evb 1Q4s1xv3lSUtPIgicBzIteLlYrEOFjgbhNi/KD4ulyc5ERUQVWac= Received: (qmail 127677 invoked by alias); 9 Oct 2015 20:17:29 -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 127667 invoked by uid 89); 9 Oct 2015 20:17:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: e12.ny.us.ibm.com Received: from e12.ny.us.ibm.com (HELO e12.ny.us.ibm.com) (129.33.205.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 09 Oct 2015 20:17:27 +0000 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 9 Oct 2015 16:17:24 -0400 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 9 Oct 2015 16:17:10 -0400 X-IBM-Helo: d01dlp02.pok.ibm.com X-IBM-MailFrom: laboger@linux.vnet.ibm.com X-IBM-RcptTo: gcc-patches@gcc.gnu.org Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id DC53DD20231 for ; Fri, 9 Oct 2015 15:40:06 -0400 (EDT) Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t99Jps8l58785880 for ; Fri, 9 Oct 2015 19:51:54 GMT Received: from d01av04.pok.ibm.com (localhost [127.0.0.1]) by d01av04.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t99JpslH029486 for ; Fri, 9 Oct 2015 15:51:54 -0400 Received: from oc3540537726.ibm.com (oc3540537726.ibm.com.rchland.ibm.com [9.10.86.61] (may be forged)) by d01av04.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id t99Jpr3X029414; Fri, 9 Oct 2015 15:51:53 -0400 Subject: Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack To: Matthias Klose , Ian Lance Taylor References: <55D39752.5090602@linux.vnet.ibm.com> <55D4DA0B.6000106@ubuntu.com> <55D50BBA.6060909@linux.vnet.ibm.com> <55DF7A72.2040208@linux.vnet.ibm.com> <55F86277.8010100@linux.vnet.ibm.com> <55FB10E7.9090607@linux.vnet.ibm.com> <56101F0E.8000003@ubuntu.com> <56153C00.2000209@linux.vnet.ibm.com> <561556F9.8030802@ubuntu.com> <5616BC63.3060307@linux.vnet.ibm.com> <5616D609.2000400@ubuntu.com> Cc: David Edelsohn , gcc-patches , Alan Modra From: "Lynn A. Boger" Message-ID: <56181AD9.6080501@linux.vnet.ibm.com> Date: Fri, 9 Oct 2015 14:51:53 -0500 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5616D609.2000400@ubuntu.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15100920-0049-0000-0000-000004BC9C4E X-IsSubscribed: yes Here's a new one. Tried all the variations, verified that split stack is still enabled and uses gold linker for 64 bit targets when using a 64 bit default compiler, and does not give the split stack error for 32 bit default compilers. On 10/08/2015 03:46 PM, Matthias Klose wrote: > On 08.10.2015 20:56, Lynn A. Boger wrote: >> I think my original fix with linux.h doing the #undef on >> TARGET_CAN_SPLIT_STACK_64BIT is the right fix at least >> for powerpc-linux-gnu 32 bit only. >> >> It works for powerpc-linux-gnu without multilib and doesn't break >> powerpc64-linux-gnu or powerpc64le-linux-gnu. >> >> Can you tell me how you are configuring the multilib build that >> defaults to >> powerpc-linux-gnu and how it >> fails? Maybe there is another problem for that combination. > > Configured with: -v > --with-pkgversion='Ubuntu 20151005-0ubuntu1' > --with-bugurl='file:///usr/share/doc/gcc-snapshot/README.Bugs' > --enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++ > --prefix=/usr/lib/gcc-snapshot > --enable-shared > --enable-linker-build-id > --disable-nls > --with-sysroot=/ > --enable-clocale=gnu > --enable-libstdcxx-debug > --enable-libstdcxx-time=yes > --with-default-libstdcxx-abi=new > --enable-gnu-unique-object > --disable-libitm > --disable-libquadmath > --enable-plugin > --with-system-zlib > --disable-browser-plugin > --enable-java-awt=gtk > --enable-gtk-cairo > --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-snap-powerpc/jre > --enable-java-home > --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-snap-powerpc > --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-snap-powerpc > --with-arch-directory=ppc > --with-ecj-jar=/usr/share/java/eclipse-ecj.jar > --enable-objc-gc > --enable-secureplt > --disable-softfloat > --with-cpu=default32 > --disable-softfloat > --enable-targets=powerpc-linux,powerpc64-linux > --enable-multiarch > --disable-werror > --with-long-double-128 > --enable-multilib > --enable-checking=yes > --build=powerpc-linux-gnu > --host=powerpc-linux-gnu > --target=powerpc-linux-gnu > > fails in gotools with: > cc1: error: '-fsplit-stack' currently only supported on PowerPC64 > GNU/Linux with glibc-2.18 or later > cc1: error: '-fsplit-stack' is not supported by this compiler > configuration > > this information is from the log below, but it's a parallel build, so > a bit useless > https://launchpadlibrarian.net/220374353/buildlog_ubuntu-wily-powerpc.gcc-snapshot_20151005-0ubuntu1_BUILDING.txt.gz > > >> As David noted, the use of TARGET_64BIT or TARGET_POWERPC64 won't >> work for this >> #define. > > I found that out too =) Note that ada builds are currently broken on > the trunk. > > Matthias > > Index: gcc/common/config/rs6000/rs6000-common.c =================================================================== --- gcc/common/config/rs6000/rs6000-common.c (revision 228653) +++ gcc/common/config/rs6000/rs6000-common.c (working copy) @@ -303,10 +303,12 @@ rs6000_supports_split_stack (bool report, #define TARGET_GLIBC_MINOR 0 #endif /* Note: Can't test DEFAULT_ABI here, it isn't set until later. */ +#ifdef TARGET_CAN_SPLIT_STACK_64BIT if (TARGET_GLIBC_MAJOR * 1000 + TARGET_GLIBC_MINOR >= 2018 && TARGET_64BIT && TARGET_ELF) return true; +#endif if (report) error ("%<-fsplit-stack%> currently only supported on PowerPC64 GNU/Linux with glibc-2.18 or later"); Index: gcc/config/rs6000/sysv4.h =================================================================== --- gcc/config/rs6000/sysv4.h (revision 228653) +++ gcc/config/rs6000/sysv4.h (working copy) @@ -940,13 +940,15 @@ ncrtn.o%s" #undef TARGET_ASAN_SHADOW_OFFSET #define TARGET_ASAN_SHADOW_OFFSET rs6000_asan_shadow_offset -/* On ppc64 and ppc64le, split stack is only support for - 64 bit. */ +/* On ppc64 and ppc64le, split stack is only supported for + 64 bit targets with a 64 bit compiler. */ #undef TARGET_CAN_SPLIT_STACK_64BIT +#if defined (__64BIT__) || defined (__powerpc64__) || defined (__ppc64__) #if TARGET_GLIBC_MAJOR > 2 \ || (TARGET_GLIBC_MAJOR == 2 && TARGET_GLIBC_MINOR >= 18) #define TARGET_CAN_SPLIT_STACK_64BIT #endif +#endif /* This target uses the sysv4.opt file. */ #define TARGET_USES_SYSV4_OPT 1