From patchwork Mon Jan 29 13:30:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 867130 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-472184-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="iY/r0lBL"; dkim-atps=neutral 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 3zVVlW5p6Xz9s83 for ; Tue, 30 Jan 2018 00:31:19 +1100 (AEDT) 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:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=PI7LJDbmy+OTfm3H8nQ863vV6QpAk4ZVBJaKiuK1UAPpUhGWAagSc Fm0rdtoURQ1msX84f4/VCpWwu05aKLobnJvxn3XQBw7PYAVpigKl55vu8dvWIc/V Tp7wJnWq76pZMAdHtQ0POnf9OYWuNywIucrKBsClpAomibwsV1e/Gg= 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:subject:date:message-id:mime-version:content-type; s= default; bh=KKDrQdZ48FbuxVp5Vu/BFDIhlyY=; b=iY/r0lBLVa+uy2w5B3hV rZ8aCEKRszcEzHQ9OfcwAjzm2Bs0BzcRmVjDIPr/UmBb56rhu4gvaRMhIVPRpHhI V8x1+JDt3Y+TAuebmldbDkJl148dj33P5itLVYjhAqpHJ+xnLkAzBooyY+4GstyK xeREUJIx695cG+mqsO8PbpQ= Received: (qmail 60863 invoked by alias); 29 Jan 2018 13:30:53 -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 60692 invoked by uid 89); 29 Jan 2018 13:30:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-19.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=UD:prod-options.c, prodoptionsc, prod-options.c 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; Mon, 29 Jan 2018 13:30:38 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 73487EB4 for ; Mon, 29 Jan 2018 14:30:12 +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 4Qv3QZQZMFFd for ; Mon, 29 Jan 2018 14:30:09 +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 B428DEB2 for ; Mon, 29 Jan 2018 14:30:09 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id w0TDU42I024280; Mon, 29 Jan 2018 14:30:04 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [build] Disable SHF_MERGE on Solaris 10/x86 (PR bootstrap/84017) Date: Mon, 29 Jan 2018 14:30:04 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes As described in the PR, Solaris 10/x86 ld is broken when dealing with the SHF_MERGE flag, causing the bootstrap to break in strange ways. Solaris as doesn't support it, but gas does, so only gas/ld builds were affected. This patch forces HAVE_GAS_SHF_MERGE to 0 to work around this. I've massively simplified the scan-assembler statements in gcc.dg/debug/dwarf2/prod-options.c. According to the original submission, it is immaterial which concrete syntax is used for DW_AT_producer, only that it's present in some form. Bootstrapped on i386-pc-solaris2.10. I've also tested the prod-options.c part on i386-pc-solaris2.11, sparc-sun-solaris2.11 (as and gas, which use different alternatives for the DW_AT_producer scan), and x86_64-pc-linux-gnu. Will commit to mainline shortly and backport to the gcc-6 and gcc-7 branches after some soak time. Rainer # HG changeset patch # Parent 1d4d7906b123d09089bb93d9833791c855b52578 Disable SHF_MERGE on Solaris 10/x86 (PR bootstrap/84017) diff --git a/gcc/configure.ac b/gcc/configure.ac --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2954,6 +2954,14 @@ if test $gcc_cv_as_shf_merge = no; then [elf,2,12,0], [--fatal-warnings], [.section .rodata.str, "aMS", %progbits, 1]) fi +case "$target" in + i?86-*-solaris2.10* | x86_64-*-solaris2.10*) + # SHF_MERGE support in Solaris 10/x86 ld is broken. + if test x"$gnu_ld" = xno; then + gcc_cv_as_shf_merge=no + fi + ;; +esac AC_DEFINE_UNQUOTED(HAVE_GAS_SHF_MERGE, [`if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`], [Define 0/1 if your assembler supports marking sections with SHF_MERGE flag.]) diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c b/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c --- a/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c @@ -4,8 +4,7 @@ as well. */ /* { dg-do compile } */ /* { dg-options "-O2 -gdwarf -dA -fdebug-prefix-map=a=b" } */ -/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C" { target { { { ! *-*-solaris2* } || gas } && { { ! hppa*64*-*-* } && { ! powerpc-ibm-aix* } } } } } } */ -/* { dg-final { scan-assembler "\"GNU C\[^\\n\\r\]+ DW_AT_producer" { target { { *-*-solaris2* && { ! gas } } || { hppa*64*-*-* } } } } } */ +/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C|\"GNU C\[^\\n\\r\]+ DW_AT_producer" } } */ /* { dg-final { scan-assembler-not "debug-prefix-map" } } */ void func (void)