From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E75AC3883035; Thu, 22 Apr 2021 16:48:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E75AC3883035 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/97163] Build error with -mcpu=power9 on ppc64 Date: Thu, 22 Apr 2021 16:48:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 10.2.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2021 16:48:32 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97163 --- Comment #12 from CVS Commits --- The releases/gcc-8 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:ebb474647037a7bd429e400b21b2dedbb78fee5e commit r8-10858-gebb474647037a7bd429e400b21b2dedbb78fee5e Author: Jakub Jelinek Date: Sat Sep 26 10:07:41 2020 +0200 powerpc, libcpp: Fix gcc build with clang on power8 [PR97163] libcpp has two specialized altivec implementations of search_line_fast, one for power8+ and the other one otherwise. Both use __attribute__((altivec(vector))) and the GCC builtins rather t= han altivec.h and the APIs from there, which is fine, but should be restric= ted to when libcpp is built with GCC, so that it can be relied on. The second elif is and thus e.g. when built with clang it isn't picked, but the first one = was just guarded with and so according to the bugreporter clang fails miserably on that. The following patch fixes that by adding the same GCC_VERSION requireme= nt as the second version. I don't know where the 4.5 in there comes from = and the exact version doesn't matter that much, as long as it is above 4.2 = that clang pretends to be and smaller or equal to 4.8 as the oldest gcc we support as bootstrap compiler ATM. Furthermore, the patch fixes the comment, the version it is talking abo= ut is not pre-GCC 5, but actually the GCC 5+ one. 2020-09-26 Jakub Jelinek PR bootstrap/97163 * lex.c (search_line_fast): Only use _ARCH_PWR8 Altivec version for GCC >=3D 4.5. (cherry picked from commit cd547f0ddcd3a54e5b73bcda5ac0f0c46808db8b)=