From patchwork Wed Nov 29 14:10:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 1869700 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=cebitec.uni-bielefeld.de header.i=@cebitec.uni-bielefeld.de header.a=rsa-sha256 header.s=20200306 header.b=NNGx7t/O; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SgLnR3dm6z1yS6 for ; Thu, 30 Nov 2023 01:10:19 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D1AE8386F021 for ; Wed, 29 Nov 2023 14:10:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id E3CFD385782B for ; Wed, 29 Nov 2023 14:10:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E3CFD385782B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cebitec.uni-bielefeld.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E3CFD385782B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=129.70.160.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701267004; cv=none; b=qoN+K82bPJNcOTduaujpiHI/ZxAA0J+8vxKOZSwkxKF2H/WYx3LVhZ9Ia88lmRM+/QK6/EhOBfKwAsLQmiDDJG8n3B6vWPOsq28uVjXtX7Ds3QL1MRDANt3V3Zim78MQzhKmwUn/WUwX7cfBrMPqD6cxMEZfQbj8crHqdYAJtJM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701267004; c=relaxed/simple; bh=JtjngtReDbqazPoBnnhqbzs63hFCVqE//d1TzMxm0Ag=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=aAQ3bVOYvf/oERMDj+RvgSA8jmBh/khRQrzOIXhgz4VcQjMD/Bo43ZqbaovbIFvSr2MwdPl4LjeqIOrZ6Skq9MgSk2RNpskvOqj4rBH85aqaBDaRq/Z7ftT23NffYTkok48E5NWGCmoYBIle/yfJxE7JfXRrG6AQWYfIeZ2DIeA= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id EDA58C1F37; Wed, 29 Nov 2023 15:10:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= cebitec.uni-bielefeld.de; h=content-type:content-type :mime-version:user-agent:message-id:date:date:subject:subject :from:from:received:received; s=20200306; t=1701267001; bh=Jtjng tReDbqazPoBnnhqbzs63hFCVqE//d1TzMxm0Ag=; b=NNGx7t/OpUmxq96Q3KUXz CKPUQNHEUrfMi3E75YIT9gTu/Z4iELHbkrnVoVg7M9/K3Isl7A6WNJIWkKNkCe57 3N3+BEVA6MEi3AinHW8fhAOqZt8B69OXwSFQTTHBs10i6qAGmu/Zbbl5k0rgXq63 TgladTzY39ELVWeQQxBrX/eOPU9AJGqTuU7t5Yo6MAh4rvPst90EAOdPvrUd3EIV tG9gBsZrZk5io2mUJAvdGElEqhfI+aMGroMX4+fJEFdDlqRDNkmC1S3f1U5OLvTN eaL71JOqURtKqC53BW5NfEFZjEqYnemy8WaUpvGtdVwM8Ls8Ab/qcC7wDXB4o/xK w== X-Virus-Scanned: amavisd-new at cebitec.uni-bielefeld.de Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gNpT0qkSix7g; Wed, 29 Nov 2023 15:10:01 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddb508.dip0.t-ipconnect.de [79.221.181.8]) (Authenticated sender: ro) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id DF7BAC3F55; Wed, 29 Nov 2023 15:10:00 +0100 (CET) From: Rainer Orth To: gcc-patches@gcc.gnu.org, binutils@sourceware.org Cc: Jakub Jelinek Subject: [PATCH] libiberty: Disable hwcaps for sha1.o Date: Wed, 29 Nov 2023 15:10:00 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 X-Spam-Status: No, score=-3791.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org This patch commit bf4f40cc3195eb7b900bf5535cdba1ee51fdbb8e Author: Jakub Jelinek Date: Tue Nov 28 13:14:05 2023 +0100 libiberty: Use x86 HW optimized sha1 broke Solaris/x86 bootstrap with the native as: libtool: compile: /var/gcc/regression/master/11.4-gcc/build/./gcc/gccgo -B/var/gcc/regression/master/11.4-gcc/build/./gcc/ -B/vol/gcc/i386-pc-solaris2.11/bin/ -B/vol/gcc/i386-pc-solaris2.11/lib/ -isystem /vol/gcc/i386-pc-solaris2.11/include -isystem /vol/gcc/i386-pc-solaris2.11/sys-include -fchecking=1 -minline-all-stringops -O2 -g -I . -c -fgo-pkgpath=internal/goarch /vol/gcc/src/hg/master/local/libgo/go/internal/goarch/goarch.go zgoarch.go ld.so.1: go1: fatal: /var/gcc/regression/master/11.4-gcc/build/gcc/go1: hardware capability (CA_SUNW_HW_2) unsupported: 0x4000000 [ SHA1 ] gccgo: fatal error: Killed signal terminated program go1 As is already done in a couple of other similar cases, this patches disables hwcaps support for libiberty. Initially, this didn't work because config/hwcaps.m4 uses target_os, but didn't ensure it is defined. Tested on i386-pc-solaris2.11 with as and gas (gcc build completed, make check still running). binutils-gdb build is currently broken in gdb/procfs.c, unfortunately. Ok for both gcc and binutils? Rainer # HG changeset patch # Parent fd492da0442de0bcc8afbf1aa71957f3e05afdb7 libiberty: Disable hwcaps for sha1.o diff --git a/config/hwcaps.m4 b/config/hwcaps.m4 --- a/config/hwcaps.m4 +++ b/config/hwcaps.m4 @@ -7,6 +7,7 @@ dnl HWCAP_CFLAGS='-Wa,-nH' if possible. dnl AC_DEFUN([GCC_CHECK_ASSEMBLER_HWCAP], [ test -z "$HWCAP_CFLAGS" && HWCAP_CFLAGS='' + AC_REQUIRE([AC_CANONICAL_TARGET]) # Restrict the test to Solaris, other assemblers (e.g. AIX as) have -nH # with a different meaning. diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in @@ -114,7 +114,7 @@ INCDIR=$(srcdir)/$(MULTISRCTOP)../includ COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) \ $(HDEFINES) @ac_libiberty_warn_cflags@ -D_GNU_SOURCE \ - @CET_HOST_FLAGS@ + @CET_HOST_FLAGS@ @HWCAP_CFLAGS@ # Just to make sure we don't use a built-in rule with VPATH .c.$(objext): diff --git a/libiberty/configure.ac b/libiberty/configure.ac --- a/libiberty/configure.ac +++ b/libiberty/configure.ac @@ -265,6 +265,8 @@ AC_SUBST(NOASANFLAG) GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) AC_SUBST(CET_HOST_FLAGS) +GCC_CHECK_ASSEMBLER_HWCAP + echo "# Warning: this fragment is automatically generated" > temp-frag if [[ -n "${frag}" ]] && [[ -f "${frag}" ]]; then