From patchwork Fri Jan 6 14:35:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 90182 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp9473839qgi; Fri, 6 Jan 2017 06:35:40 -0800 (PST) X-Received: by 10.99.117.79 with SMTP id f15mr1234843pgn.69.1483713340335; Fri, 06 Jan 2017 06:35:40 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id d21si79636011pgh.276.2017.01.06.06.35.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Jan 2017 06:35:40 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-445546-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-445546-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-445546-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=yKgr2W0CdbGbFNCD Gac98FeZqE6c57F///WCMpPDCnN3tRWgEMqpnPgY/6kXVFeV+fdY5Y5AgSVJpnyF KzAmpOMoUzaUYfanCGUQUNagFBr36n7drcAP84XWz9kSwjjEu/oUPRO6GnnV8NDC oQMNRm71NJN9JRJ/ygZEQ5RVD8E= 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:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=osLrXMB5t2068eh+Y0nvPD l+ptE=; b=H3zhTHNu8tB5m6Oe9/lMI/i2BEjhLi1ilw6NNY32Yorug1pzBeKOWG mPFhffR+V95PgVswKCS9bP7K5Lq92oZ4O3YYIs1mUmHV9Cw2N7usSpYfIgwaN0Pu mGidDiotn89aHKv3366MnTcjlNw5OSThOiHvT8i3WcK1gaWXdnI3I= Received: (qmail 29746 invoked by alias); 6 Jan 2017 14:35:23 -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 29725 invoked by uid 89); 6 Jan 2017 14:35:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*f:sk:CAKOQZ8, H*i:sk:CAKOQZ8, H*i:sk:QwvpXyh, H*f:wDaz1suMsv1rT X-Spam-User: qpsmtpd, 2 recipients X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Jan 2017 14:35:13 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id E4515535; Fri, 6 Jan 2017 15:35:10 +0100 (CET) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id s5xnq1Hz6UHv; Fri, 6 Jan 2017 15:35:08 +0100 (CET) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 6433F533; Fri, 6 Jan 2017 15:35:08 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id v06EZ7QK005636; Fri, 6 Jan 2017 15:35:07 +0100 (MET) From: Rainer Orth To: Ian Lance Taylor Cc: gcc-patches , "libstdc++\@gcc.gnu.org" , Paolo Bonzini Subject: Re: [build, libgo, libstdc++] Build libgo with -Wa, -nH if possible (PR go/78978) References: Date: Fri, 06 Jan 2017 15:35:07 +0100 In-Reply-To: (Ian Lance Taylor's message of "Fri, 6 Jan 2017 06:17:10 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Hi Ian, > On Thu, Jan 5, 2017 at 1:20 AM, Rainer Orth wrote: >> As could have been expected, the static libgo.a causes the same problem >> with hardware capabilities on Solaris/x86 as was solved for libgo.so >> with >> >> https://gcc.gnu.org/ml/gcc-patches/2016-12/msg00726.html >> >> Instead of trying to pass -mclear-hwcap with -static-libgo, it was >> deemed easier to solve both problems the same way and disable hwcaps >> support in the assembler in the first place. >> >> This has already been done in libstdc++, so I've moved the corresponding >> autoconf macro to config/hwcaps.m4 and adapted it to set HWCAP_CFLAGS >> instead of HWCAP_FLAGS to better differntiate from HWCAP_LDFLAGS. >> Everything else is straightforward, I believe. >> >> Bootstrapped without regressions on i386-pc-solaris2.1[02] with as/ld >> (where as supports -nH) and sparc-sun-solaris2.12 with as/ld (where as >> doesn't, or rather it's called -hwcap={1|0}), and the libgo >> runtime/pprof failure is gone. >> >> Ok for mainline? >> >> Once approved, how should we proceed with checking? Ian, will you take >> care of the libgo part once the rest is in? > > This patch is OK. Yes, please commit the config and libstdc++ > portions. Then I will commit the libgo portions to the external repo > and mirror them in. Thanks. done, thanks. While preparing the partial commit, I noticed that I'd created the libgo part of the patch on top of a tree that contained a workaround for PR go/64900. Here's the libgo part again, this time on top of a vanilla tree. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University diff --git a/libgo/Makefile.am b/libgo/Makefile.am --- a/libgo/Makefile.am +++ b/libgo/Makefile.am @@ -42,14 +42,12 @@ ACLOCAL_AMFLAGS = -I ./config -I ../conf AM_CFLAGS = -fexceptions -fnon-call-exceptions -fplan9-extensions \ $(SPLIT_STACK) $(WARN_CFLAGS) \ - $(STRINGOPS_FLAG) $(OSCFLAGS) \ + $(STRINGOPS_FLAG) $(HWCAP_CFLAGS) $(OSCFLAGS) \ -I $(srcdir)/../libgcc -I $(srcdir)/../libbacktrace \ -I $(MULTIBUILDTOP)../../gcc/include -AM_LDFLAGS = $(HWCAP_LDFLAGS) - if USING_SPLIT_STACK -AM_LDFLAGS += -XCClinker $(SPLIT_STACK) +AM_LDFLAGS = -XCClinker $(SPLIT_STACK) endif # Multilib support. diff --git a/libgo/configure.ac b/libgo/configure.ac --- a/libgo/configure.ac +++ b/libgo/configure.ac @@ -421,8 +421,8 @@ case "$target" in esac AC_SUBST(OSCFLAGS) -dnl Check linker hardware capability support. -GCC_CHECK_LINKER_HWCAP +dnl Check if assembler supports disabling hardware capability support. +GCC_CHECK_ASSEMBLER_HWCAP dnl Use -fsplit-stack when compiling C code if available. AC_CACHE_CHECK([whether -fsplit-stack is supported],