diff options
author | Sam James <sam@gentoo.org> | 2021-11-18 05:22:50 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-11-18 05:22:50 +0000 |
commit | 192068fcd5aa14c681bcd90fe28f4bff641599e1 (patch) | |
tree | a9a4f84a3ce0349e32808857350b6ac524cd0eab /sys-devel/gcc | |
parent | dev-lang/python: skip test_distutils with PGO if rpm is installed (diff) | |
download | gentoo-192068fcd5aa14c681bcd90fe28f4bff641599e1.tar.gz gentoo-192068fcd5aa14c681bcd90fe28f4bff641599e1.tar.bz2 gentoo-192068fcd5aa14c681bcd90fe28f4bff641599e1.zip |
sys-devel/gcc: add workaround for cross-compile failure
Bug: https://bugs.gentoo.org/803371
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel/gcc')
-rw-r--r-- | sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch | 26 | ||||
-rw-r--r-- | sys-devel/gcc/gcc-11.2.0.ebuild | 9 |
2 files changed, 35 insertions, 0 deletions
diff --git a/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch b/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch new file mode 100644 index 000000000000..d06410650bb0 --- /dev/null +++ b/sys-devel/gcc/files/gcc-11.2.0-cross-compile-include.patch @@ -0,0 +1,26 @@ +https://bugs.gentoo.org/803371 +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80196 +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017 +--- a/configure ++++ b/configure +@@ -17044,7 +17044,7 @@ else + fi + + +-RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET" ++RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ar" >&5 + $as_echo_n "checking where to find the target ar... " >&6; } +--- a/configure.ac ++++ b/configure.ac +@@ -3529,7 +3529,7 @@ ACX_CHECK_INSTALLED_TARGET_TOOL(STRIP_FOR_TARGET, strip) + ACX_CHECK_INSTALLED_TARGET_TOOL(WINDRES_FOR_TARGET, windres) + ACX_CHECK_INSTALLED_TARGET_TOOL(WINDMC_FOR_TARGET, windmc) + +-RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET" ++RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET -nostdinc++" + + GCC_TARGET_TOOL(ar, AR_FOR_TARGET, AR, [binutils/ar]) + GCC_TARGET_TOOL(as, AS_FOR_TARGET, AS, [gas/as-new]) + diff --git a/sys-devel/gcc/gcc-11.2.0.ebuild b/sys-devel/gcc/gcc-11.2.0.ebuild index 193f8b813ec4..728de92f4777 100644 --- a/sys-devel/gcc/gcc-11.2.0.ebuild +++ b/sys-devel/gcc/gcc-11.2.0.ebuild @@ -11,3 +11,12 @@ KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 RDEPEND="" BDEPEND="${CATEGORY}/binutils" + +src_prepare() { + toolchain_src_prepare + + if is_crosscompile ; then + # bug #803371 + eapply "${FILESDIR}"/gcc-11.2.0-cross-compile-include.patch + fi +} |