summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-09-27 04:17:49 -0400
committerIonen Wolkens <ionen@gentoo.org>2022-09-27 04:36:49 -0400
commite69418c72291eaac2e317d65b1c846609b0330b5 (patch)
tree5b1d98667691cb04f46b965df0a689fbb84c3157 /dev-util
parentdev-db/redis: drop 7.0.4 (diff)
downloadgentoo-e69418c72291eaac2e317d65b1c846609b0330b5.tar.gz
gentoo-e69418c72291eaac2e317d65b1c846609b0330b5.tar.bz2
gentoo-e69418c72291eaac2e317d65b1c846609b0330b5.zip
dev-util/mingw64-toolchain: import drop cflags patch from gcc
Tested this before and it built fine anyway, so thought it wasn't needed for mingw64-toolchain (despite --disabled-bootstrap) -- but seen a user run into it and seems I may have tested wrong back then. Bug: https://bugs.gentoo.org/849722 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/mingw64-toolchain/files/gcc-12.2.0-drop-cflags-sed.patch23
-rw-r--r--dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r1.ebuild1
2 files changed, 24 insertions, 0 deletions
diff --git a/dev-util/mingw64-toolchain/files/gcc-12.2.0-drop-cflags-sed.patch b/dev-util/mingw64-toolchain/files/gcc-12.2.0-drop-cflags-sed.patch
new file mode 100644
index 000000000000..754bc11a1687
--- /dev/null
+++ b/dev-util/mingw64-toolchain/files/gcc-12.2.0-drop-cflags-sed.patch
@@ -0,0 +1,23 @@
+https://bugs.gentoo.org/849722
+https://github.com/InBetweenNames/gentooLTO/issues/846
+https://github.com/vaeth/portage-bashrc-mv/issues/11
+--- a/gcc/gcc/configure
++++ b/gcc/gcc/configure
+@@ -5389,7 +5388,0 @@
+-# Remove the -O2: for historical reasons, unless bootstrapping we prefer
+-# optimizations to be activated explicitly by the toplevel.
+-case "$CC" in
+- */prev-gcc/xgcc*) ;;
+- *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][ ]//" -e "s/-O[0-9]*[ ]//" `
+- CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[ ]//" -e "s/-O[gs][ ]//" -e "s/-O[0-9]*[ ]//" ` ;;
+-esac
+--- a/gcc/gcc/configure.ac
++++ b/gcc/gcc/configure.ac
+@@ -443,7 +442,0 @@
+-# Remove the -O2: for historical reasons, unless bootstrapping we prefer
+-# optimizations to be activated explicitly by the toplevel.
+-case "$CC" in
+- */prev-gcc/xgcc*) ;;
+- *) CFLAGS=`echo "$CFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" `
+- CXXFLAGS=`echo "$CXXFLAGS " | sed -e "s/-Ofast[[ ]]//" -e "s/-O[[gs]][[ ]]//" -e "s/-O[[0-9]]*[[ ]]//" ` ;;
+-esac
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r1.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r1.ebuild
index bc9e79c199db..650225a5218e 100644
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r1.ebuild
+++ b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r1.ebuild
@@ -45,6 +45,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/mingw64-runtime-10.0.0-tmp-files-clash.patch
"${FILESDIR}"/gcc-11.3.0-plugin-objdump.patch
+ "${FILESDIR}"/gcc-12.2.0-drop-cflags-sed.patch
)
pkg_pretend() {