From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C6213158041 for ; Sun, 5 Sep 2021 10:49:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 02CDAE0826; Sun, 5 Sep 2021 10:49:24 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CCB67E0826 for ; Sun, 5 Sep 2021 10:49:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BBF4A3407E6 for ; Sun, 5 Sep 2021 10:49:22 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 68AB656 for ; Sun, 5 Sep 2021 10:49:21 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1630837796.ccbf773bca3510785a1c6655c77f5d457ded43af.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-devel/gcc/files/, sys-devel/gcc/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: sys-devel/gcc/files/gcc-10.2.0-xcode-12.5.patch sys-devel/gcc/gcc-10.2.0-r5.ebuild X-VCS-Directories: sys-devel/gcc/files/ sys-devel/gcc/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: ccbf773bca3510785a1c6655c77f5d457ded43af X-VCS-Branch: master Date: Sun, 5 Sep 2021 10:49:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 1860ec13-845d-4cde-b0a6-4d28c1232f32 X-Archives-Hash: 0d316400d5a84313be5cc99a51f84ecf commit: ccbf773bca3510785a1c6655c77f5d457ded43af Author: Fabian Groffen gentoo org> AuthorDate: Sun Sep 5 10:29:56 2021 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Sep 5 10:29:56 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ccbf773b sys-devel/gcc-10.2.0-r5: add patch for Xcode 12.5 Closes: https://bugs.gentoo.org/799170 Package-Manager: Portage-3.0.21-prefix, Repoman-3.0.3 Signed-off-by: Fabian Groffen gentoo.org> sys-devel/gcc/files/gcc-10.2.0-xcode-12.5.patch | 147 ++++++++++++++++++++++++ sys-devel/gcc/gcc-10.2.0-r5.ebuild | 3 + 2 files changed, 150 insertions(+) diff --git a/sys-devel/gcc/files/gcc-10.2.0-xcode-12.5.patch b/sys-devel/gcc/files/gcc-10.2.0-xcode-12.5.patch new file mode 100644 index 0000000000..f8b6b04232 --- /dev/null +++ b/sys-devel/gcc/files/gcc-10.2.0-xcode-12.5.patch @@ -0,0 +1,147 @@ +From 743b8dd6fd757e997eb060d70fd4ae8e04fb56cd Mon Sep 17 00:00:00 2001 +From: Iain Sandoe +Date: Sat, 31 Jul 2021 16:29:03 +0100 +Subject: [PATCH 1/1] Darwin, X86, config: Adjust 'as' command lines + [PR100340]. + +Versions of the assembler using clang from XCode 12.5/12.5.1 +have a bug which produces different code layout between debug and +non-debug input, leading to a compare fail for default configure +parameters. + +This is a workaround fix to disable the optimisation that is +responsible for the bug. + +Signed-off-by: Iain Sandoe + +PR target/100340 - Bootstrap fails with Clang 12.0.5 (XCode 12.5) + + PR target/100340 + +gcc/ChangeLog: + + * config.in: Regenerate. + * config/i386/darwin.h (EXTRA_ASM_OPTS): New + (ASM_SPEC): Pass options to disable branch shortening where + needed. + * configure: Regenerate. + * configure.ac: Detect versions of 'as' that support the + optimisation which has the bug. +--- + gcc/config.in | 7 +++++++ + gcc/config/i386/darwin.h | 10 +++++++++- + gcc/configure | 35 +++++++++++++++++++++++++++++++++++ + gcc/configure.ac | 9 +++++++++ + 4 files changed, 60 insertions(+), 1 deletion(-) + +diff --git a/gcc/config.in b/gcc/config.in +index 7f5b01fad76..d8a810bbc91 100644 +--- a/gcc/config.in ++++ b/gcc/config.in +@@ -616,6 +616,13 @@ + #endif + + ++/* Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false. ++ */ ++#ifndef USED_FOR_TARGET ++#undef HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN ++#endif ++ ++ + /* Define if your Mac OS X assembler supports the -mmacos-version-min option. + */ + #ifndef USED_FOR_TARGET +diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h +index bac32197e83..73b06e2307d 100644 +--- a/gcc/config/i386/darwin.h ++++ b/gcc/config/i386/darwin.h +@@ -125,10 +125,18 @@ along with GCC; see the file COPYING3. If not see + %{mfentry*:%eDarwin does not support -mfentry or associated options}" \ + DARWIN_CC1_SPEC + ++/* This is a workaround for a tool bug: see PR100340. */ ++ ++#ifdef HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN ++#define EXTRA_ASM_OPTS " -mllvm -x86-pad-for-align=false" ++#else ++#define EXTRA_ASM_OPTS "" ++#endif ++ + #undef ASM_SPEC + #define ASM_SPEC "-arch %(darwin_arch) \ + " ASM_OPTIONS " -force_cpusubtype_ALL \ +- %{static}" ASM_MMACOSX_VERSION_MIN_SPEC ++ %{static}" ASM_MMACOSX_VERSION_MIN_SPEC EXTRA_ASM_OPTS + + #undef ENDFILE_SPEC + #define ENDFILE_SPEC \ +diff --git a/gcc/configure b/gcc/configure +index 08c286764e0..a2d1003a0f5 100755 +--- a/gcc/configure ++++ b/gcc/configure +@@ -27082,6 +27082,41 @@ $as_echo "$as_me: WARNING: LTO for $target requires binutils >= 2.20.1, but vers + fi + ;; + esac ++ case $target_os in ++ darwin2[0-9]* | darwin19*) ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for llvm assembler x86-pad-for-align option" >&5 ++$as_echo_n "checking assembler for llvm assembler x86-pad-for-align option... " >&6; } ++if ${gcc_cv_as_mllvm_x86_pad_for_align+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ gcc_cv_as_mllvm_x86_pad_for_align=no ++ if test x$gcc_cv_as != x; then ++ $as_echo '.text' > conftest.s ++ if { ac_try='$gcc_cv_as $gcc_cv_as_flags -mllvm -x86-pad-for-align=false -o conftest.o conftest.s >&5' ++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; } ++ then ++ gcc_cv_as_mllvm_x86_pad_for_align=yes ++ else ++ echo "configure: failed program was" >&5 ++ cat conftest.s >&5 ++ fi ++ rm -f conftest.o conftest.s ++ fi ++fi ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_mllvm_x86_pad_for_align" >&5 ++$as_echo "$gcc_cv_as_mllvm_x86_pad_for_align" >&6; } ++if test $gcc_cv_as_mllvm_x86_pad_for_align = yes; then ++ ++$as_echo "#define HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN 1" >>confdefs.h ++ ++fi ++ ++ ;; ++ esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler for -xbrace_comment" >&5 + $as_echo_n "checking assembler for -xbrace_comment... " >&6; } +diff --git a/gcc/configure.ac b/gcc/configure.ac +index 653a1cc561d..ad8fa5a4604 100644 +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -4799,6 +4799,15 @@ foo: nop + fi + ;; + esac ++ case $target_os in ++ darwin2[[0-9]]* | darwin19*) ++ gcc_GAS_CHECK_FEATURE([llvm assembler x86-pad-for-align option], ++ gcc_cv_as_mllvm_x86_pad_for_align,, ++ [-mllvm -x86-pad-for-align=false], [.text],, ++ [AC_DEFINE(HAVE_AS_MLLVM_X86_PAD_FOR_ALIGN, 1, ++ [Define if your Mac OS X assembler supports -mllvm -x86-pad-for-align=false.])]) ++ ;; ++ esac + + gcc_GAS_CHECK_FEATURE([-xbrace_comment], gcc_cv_as_ix86_xbrace_comment,, + [-xbrace_comment=no], [.text],, +-- +2.27.0 + diff --git a/sys-devel/gcc/gcc-10.2.0-r5.ebuild b/sys-devel/gcc/gcc-10.2.0-r5.ebuild index f146759e09..9baac7c2d6 100644 --- a/sys-devel/gcc/gcc-10.2.0-r5.ebuild +++ b/sys-devel/gcc/gcc-10.2.0-r5.ebuild @@ -53,6 +53,9 @@ src_prepare() { find . -name "configure" | xargs \ sed -i -e '/^\s*10\.\*)/N' \ -e '/^\s*10\.\*)\s*_lt_dar_allow_undefined/s/10\.\*/10.*|11.*/' || die + + # fix interoperation with Xcode 12.5, bug #799170 + eapply -p1 "${FILESDIR}"/${PN}-10.2.0-xcode-12.5.patch } src_configure() {