From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36034 invoked by alias); 15 Sep 2015 18:18:50 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 35970 invoked by uid 89); 15 Sep 2015 18:18:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f178.google.com Received: from mail-ig0-f178.google.com (HELO mail-ig0-f178.google.com) (209.85.213.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 15 Sep 2015 18:18:48 +0000 Received: by igxx6 with SMTP id x6so18016801igx.1 for ; Tue, 15 Sep 2015 11:18:46 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.143.4 with SMTP id sa4mr8295925igb.52.1442341126507; Tue, 15 Sep 2015 11:18:46 -0700 (PDT) Received: by 10.36.133.5 with HTTP; Tue, 15 Sep 2015 11:18:46 -0700 (PDT) In-Reply-To: <55DF7A72.2040208@linux.vnet.ibm.com> References: <55D39752.5090602@linux.vnet.ibm.com> <55D4DA0B.6000106@ubuntu.com> <55D50BBA.6060909@linux.vnet.ibm.com> <55DF7A72.2040208@linux.vnet.ibm.com> Date: Tue, 15 Sep 2015 18:21:00 -0000 Message-ID: Subject: Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack From: David Edelsohn To: "Lynn A. Boger" Cc: Matthias Klose , gcc-patches , Ian Taylor , Alan Modra Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-09/txt/msg01118.txt.bz2 On Thu, Aug 27, 2015 at 5:00 PM, Lynn A. Boger wrote: > Here is an updated patch, with a summary of the differences from my previous > patch: > > - In my previous patch gcc configure was verifying the gold linker even if > it was the > default linker, but that is not necessary since in that case -fuse-ld=gold > does not > need to be set. Gold version checking is now only done if the alternate > linker is gold > and the default linker is not. > - The STACK_SPLIT_STACK spec define found in gcc/gcc.c now adds > -fuse-ld=gold > if the gcc configure determines the alternate gold linker has split stack > support. > - A case statement is now used in gcc configure to verify the gold version, > to make it > easier for other platforms to add their checks if necessary. I don't know > if other > platforms require this checking; Matthias' patch did not check the version. > For powerpc64 > big and little endian we have to check the gold linker version because the > split > stack support was added recently and older gold linkers won't work. > - The version checking of the gold linker was removed from the libgo > configure > since gcc configure has already decided if it is correct. > - TARGET_CAN_SPLIT_STACK_64BIT is now defined in sysv4.h if the glibc > version > is correct for split stack for powerpc64 big and little endian. This define > is used in > go/gospec.c in the same way that TARGET_CAN_SPLIT_STACK is used now but, > additionally verifies that it is a 64 bit compile. This is necessary > because split > stack support is not available for ppc 32 bit big endian in gcc or the gold > linker. > > Bootstrapped and tested on x86_64, ppc64le, ppc64 (ran m32, m64 tests) > > > 2015-08-27 Lynn Boger > > gcc/ > PR target/66870 > config/rs6000/sysv4.h: Define TARGET_CAN_SPLIT_STACK_64BIT > based on LIBC version. > config.in: Set up HAVE_GOLD_ALTERNATE. > configure.ac: Define HAVE_GOLD_ALTERNATE if the version of the > gold > linker supports split stack. > configure: Regenerate. > gcc.c: Add -fuse-ld=gold to STACK_SPLIT_SPEC if > HAVE_GOLD_ALTERNATE > is defined. > go/gospec.c: (lang_specific_driver): Use > TARGET_CAN_SPLIT_STACK_64BIT > to control setting of fsplit-stack and u,pthread_create options for > 64 bit > compiles. I don't have authority to approve for most of the patch. I noticed that the test for Gold version number is different than a similar test in another part of configure. And the sed pattern seems to be too restrictive -- it fails to extract a version number for my tests with Gold in a few different Linux distros. This should be addressed instead of silently misidentifying split stack support in some distros. - David