From patchwork Tue Jan 9 12:33:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Clifton X-Patchwork-Id: 186348 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp74837dyi; Tue, 9 Jan 2024 04:33:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IExWMHDmmMf0JUuyWdgNqp7HE9IvIFailJhZm3oDiU93eDHwEQvja8sDeG22KqL98xnSH1k X-Received: by 2002:a05:6214:f2b:b0:67f:62e5:bf17 with SMTP id iw11-20020a0562140f2b00b0067f62e5bf17mr871952qvb.34.1704803634944; Tue, 09 Jan 2024 04:33:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704803634; cv=pass; d=google.com; s=arc-20160816; b=VL6LwzesTNYv/xe9d3MoN5EpgMFt1KenJOTWGLQmrw7VctibXWrcCqXYxsISd/5PmQ isIqvCgfmpBmDUiRVdaJDuiwt2BF0yF8boSFBEn6ZRjsAUq97jhr7YWQHxoSRimrE61t GPPoBi9vE3cLtsJA3rCoxFRBdiSk8F6DGm1z5LoXVMjdCTKAG0E+SQqgtFa/zF3c/JfH j5Q2Uzj7GnLM6FJQ/s7QoAVqvCyhhsOkzZzPCLJ0xb082Swh/t0BOyxgVAKqWD5Z2/Z6 bZnRbaka0blVjnNQT/uhjSYqjERmZDAX5eS93op838xsi0GLs0cI8uxMIEoedmAOqvhT nnKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:message-id:date :subject:to:from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=qOpRNYWZRjMG7Yyh82laaald7wSnxD6hT1Z4tBL1nhE=; fh=NLxAvL/bDfPg4AGOtxqvQlND8vazkZrNzKLY8+LAbBY=; b=HCjEdRtme44D03W6D0Cvr2DRm9E4HrTPi2xBq+Z+YzdQCgTjuhphAmcBP5ZZ12uo/5 1Tmj7JQf3MX7mewfQp8T9tvC/h5A57fmch5uOflunOxAd+ssaZXvjpvEgqlx2dTFOhSt HDPy5kulWTqRe0CYDGeCz29SurlmSLGoolujtK5CDsN/6B4pTjBCxV6kyvMTp0HQSSnK KFOAIMSYuBpIrcGmCqEcbysBZRErZEZGPgAgXj4TUfcgHOR44h32rm54Wgbp6yFmLjIw 2Gk6y0GmFiTqWhEl3/rRDmVe9Q5mygLdijnt7O+j7eX3QEZhfAOAXug7tpit4kudV6op UZoQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CzWniHPZ; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id b17-20020a0ccd11000000b00680cd3fbdf0si2172938qvm.55.2024.01.09.04.33.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 04:33:54 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=CzWniHPZ; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 934313858421 for ; Tue, 9 Jan 2024 12:33:54 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id A25613858CDB for ; Tue, 9 Jan 2024 12:33:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A25613858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A25613858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704803621; cv=none; b=RkpKtUfYypvBEO/HD5TxdSUF00rvE6OFB3YS5HVCFLQj8fh0UUVRJtp5+zXTXBwduMYonKkWbIvAnCKp8mjWA+54U/H71Sa8KdrxEbCGt7hzalvevpojrWT48cMbdDSfiyisWvgXjVojXqRCSwdhpUssMGeAOXaAGU4r5ZyGKIA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704803621; c=relaxed/simple; bh=EtgFgO15Y9PiXWWqof4hgJfuy9YczqWNyMUFXf4Ftsc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=AxIQTjsCJC4hmKZ+691KKuVH/q3DelsbSoy6GsFthfONtAMrWvHSqPu854du8rf+TT46TK9YOibx4sSiCLmMmXk6uaFi6QAhCw2VYLcwfKFSjRpA8XC6WNvqJa316YtkYDtMD25hUZ01JDmFbliX7ftmy9CMziOp383Zy+4H2/s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1704803617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=qOpRNYWZRjMG7Yyh82laaald7wSnxD6hT1Z4tBL1nhE=; b=CzWniHPZxdqkr9rDfPpw3PabYWEiv/8Mg65KI81d8QE6p0FpbzVfP4IyKSfrgWmwec6VbH ZtJ9XYobvY9NdbUyB2xe6Q3PF2Ar7SSwQN4ZvriGAcbOM9DnZCtsChKEyyRsUozfkRuKvZ uK1iW9bmD7Ower1Ikg7hV6mrei/oWrM= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-681-4pQpxEt9M9WvA-9M1XyYag-1; Tue, 09 Jan 2024 07:33:35 -0500 X-MC-Unique: 4pQpxEt9M9WvA-9M1XyYag-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 579F038425A2 for ; Tue, 9 Jan 2024 12:33:35 +0000 (UTC) Received: from prancer.redhat.com (unknown [10.42.28.109]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A48AB2166B32 for ; Tue, 9 Jan 2024 12:33:34 +0000 (UTC) From: Nick Clifton To: binutils@sourceware.org Subject: Commit: Sync libiberty with gcc master version Date: Tue, 09 Jan 2024 12:33:33 +0000 Message-ID: <87il42it42.fsf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_LOTSOFHASH, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787616176302216093 X-GMAIL-MSGID: 1787616176302216093 Hi Guys, I am applying the attached patch to sync the sourceware copy of the libiberty sources with the master version in the gcc repository. This sync brings in the following commits: commit c73cc6fe6207b2863afa31a3be8ad87b70d3df0a Author: Jakub Jelinek Date: Tue Dec 5 23:32:19 2023 +0100 libiberty: Fix build with GCC < 7 Tobias reported on IRC that the linker fails to build with GCC 4.8.5. In configure I've tried to use everything actually used in the sha1.c x86 hw implementation, but unfortunately I forgot about implicit function declarations. GCC before 7 did have header and bit_SHA define and __get_cpuid function defined inline, but it didn't define __get_cpuid_count, which compiled fine (and the configure test is intentionally compile time only) due to implicit function declaration, but then failed to link when linking the linker, because __get_cpuid_count wasn't defined anywhere. The following patch fixes that by using what autoconf uses in AC_CHECK_DECL to make sure the functions are declared. commit 691858d279335eeeeed3afafdf872b1c5f8f4201 Author: Rainer Orth Date: Tue Dec 5 11:04:06 2023 +0100 libiberty: Fix pex_unix_wait return type The recent warning patches broke Solaris bootstrap: /vol/gcc/src/hg/master/local/libiberty/pex-unix.c:326:3: error: initialization of 'pid_t (*)(struct pex_obj *, pid_t, int *, struct pex_time *, int, const char **, int *)' {aka 'long int (*)(struct pex_obj *, long int, int *, struct pex_time *, int, const char **, int *)'} from incompatible pointer type 'int (*)(struct pex_obj *, pid_t, int *, struct pex_time *, int, const char **, int *)' {aka 'int (*)(struct pex_obj *, long int, int *, struct pex_time *, int, const char **, int *)'} [-Wincompatible-pointer-types] 326 | pex_unix_wait, | ^~~~~~~~~~~~~ /vol/gcc/src/hg/master/local/libiberty/pex-unix.c:326:3: note: (near initialization for 'funcs.wait') While pex_funcs.wait expects a function returning pid_t, pex_unix_wait currently returns int. However, on Solaris pid_t is long for 32-bit, but int for 64-bit. This patches fixes this by having pex_unix_wait return pid_t as expected, and like every other variant already does. Bootstrapped without regressions on i386-pc-solaris2.11, sparc-sun-solaris2.11, x86_64-pc-linux-gnu, and x86_64-apple-darwin23.1.0. commit c3f281a0c1ca50e4df5049923aa2f5d1c3c39ff6 Author: Jason Merrill Date: Mon Sep 25 10:15:02 2023 +0100 c++: mangle function template constraints Per https://github.com/itanium-cxx-abi/cxx-abi/issues/24 and https://github.com/itanium-cxx-abi/cxx-abi/pull/166 We need to mangle constraints to be able to distinguish between function templates that only differ in constraints. From the latter link, we want to use the template parameter mangling previously specified for lambdas to also make explicit the form of a template parameter where the argument is not a "natural" fit for it, such as when the parameter is constrained or deduced. I'm concerned about how the latter link changes the mangling for some C++98 and C++11 patterns, so I've limited template_parm_natural_p to avoid two cases found by running the testsuite with -Wabi forced on: template T f() { return V; } int main() { return f(); } template int max() { return i; } template int max() { int sub = max(); return i > sub ? i : sub; } int main() { return max<1,2,3>(); } A third C++11 pattern is changed by this patch: template