* [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/, dev-util/mingw64-toolchain/files/
@ 2022-05-13 7:20 Ionen Wolkens
0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2022-05-13 7:20 UTC (permalink / raw
To: gentoo-commits
commit: dde8c3f4bdcec2a7435f88a047615991bc474d04
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri May 13 07:03:21 2022 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri May 13 07:19:59 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dde8c3f4
dev-util/mingw64-toolchain: fix direct objdump call
Cherry pick from Gentoo's gcc patches. Ideally don't want to
carry/follow the full set given they do not really affect this
(features are disabled, or irrelevant with mingw target), but
this one does.
Turns out plugin is silently skipped entirely if objdump is missing.
Bug: https://bugs.gentoo.org/843989
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
.../files/gcc-11.3.0-plugin-objdump.patch | 22 ++++++++++++++++++++++
.../mingw64-toolchain-10.0.0.ebuild | 1 +
2 files changed, 23 insertions(+)
diff --git a/dev-util/mingw64-toolchain/files/gcc-11.3.0-plugin-objdump.patch b/dev-util/mingw64-toolchain/files/gcc-11.3.0-plugin-objdump.patch
new file mode 100644
index 000000000000..1de712de48bc
--- /dev/null
+++ b/dev-util/mingw64-toolchain/files/gcc-11.3.0-plugin-objdump.patch
@@ -0,0 +1,22 @@
+https://gcc.gnu.org/PR95648
+--- a/gcc/config/gcc-plugin.m4
++++ b/gcc/config/gcc-plugin.m4
+@@ -47,3 +47,3 @@
+ if test x$build = x$host; then
+- export_sym_check="objdump${exeext} -T"
++ export_sym_check="$ac_cv_prog_OBJDUMP -T"
+ elif test x$host = x$target; then
+--- a/gcc/gcc/configure
++++ b/gcc/gcc/configure
+@@ -32069,3 +32069,3 @@
+ if test x$build = x$host; then
+- export_sym_check="objdump${exeext} -T"
++ export_sym_check="$ac_cv_prog_OBJDUMP -T"
+ elif test x$host = x$target; then
+--- a/gcc/libcc1/configure
++++ b/gcc/libcc1/configure
+@@ -15017,3 +15017,3 @@
+ if test x$build = x$host; then
+- export_sym_check="objdump${exeext} -T"
++ export_sym_check="$ac_cv_prog_OBJDUMP -T"
+ elif test x$host = x$target; then
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0.ebuild
index 4df5573bc1e4..13b92a3c573c 100644
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0.ebuild
+++ b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0.ebuild
@@ -43,6 +43,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/mingw64-runtime-10.0.0-tmp-files-clash.patch
+ "${FILESDIR}"/gcc-11.3.0-plugin-objdump.patch
)
pkg_pretend() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/, dev-util/mingw64-toolchain/files/
@ 2022-06-29 17:22 Ionen Wolkens
0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2022-06-29 17:22 UTC (permalink / raw
To: gentoo-commits
commit: d8f263e503f54eb05f2c764ae443ea2e08e47366
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 29 16:23:21 2022 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Jun 29 17:22:36 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8f263e5
dev-util/mingw64-toolchain: fix build with musl and gcc:12
Closes: https://bugs.gentoo.org/855002
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
.../files/gcc-11.3.0-musl-calloc.patch | 33 ++++++++++++++++++++++
.../mingw64-toolchain-10.0.0-r1.ebuild | 1 +
2 files changed, 34 insertions(+)
diff --git a/dev-util/mingw64-toolchain/files/gcc-11.3.0-musl-calloc.patch b/dev-util/mingw64-toolchain/files/gcc-11.3.0-musl-calloc.patch
new file mode 100644
index 000000000000..71602df60cca
--- /dev/null
+++ b/dev-util/mingw64-toolchain/files/gcc-11.3.0-musl-calloc.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/855002
+https://gcc.gnu.org/PR104799
+https://gcc.gnu.org/PR106102
+--- a/gcc/gcc/cp/mapper-client.cc
++++ b/gcc/gcc/cp/mapper-client.cc
+@@ -29,2 +29,3 @@
+ #define INCLUDE_MAP
++#include <pthread.h>
+ #include "system.h"
+--- a/gcc/gcc/cp/mapper-resolver.cc
++++ b/gcc/gcc/cp/mapper-resolver.cc
+@@ -27,2 +27,3 @@
+ #define INCLUDE_MAP
++#include <pthread.h>
+ #include "system.h"
+--- a/gcc/gcc/cp/module.cc
++++ b/gcc/gcc/cp/module.cc
+@@ -206,2 +206,3 @@
+ #define INCLUDE_VECTOR
++#include <pthread.h>
+ #include "system.h"
+--- a/gcc/libcc1/libcc1plugin.cc
++++ b/gcc/libcc1/libcc1plugin.cc
+@@ -19,2 +19,3 @@
+
++#include <pthread.h>
+ #include <cc1plugin-config.h>
+--- a/gcc/libcc1/libcp1plugin.cc
++++ b/gcc/libcc1/libcp1plugin.cc
+@@ -20,2 +20,3 @@
+
++#include <pthread.h>
+ #include <cc1plugin-config.h>
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild
index c0d573454f7f..c902601aa43c 100644
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild
+++ b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r1.ebuild
@@ -44,6 +44,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/mingw64-runtime-10.0.0-tmp-files-clash.patch
"${FILESDIR}"/gcc-11.3.0-plugin-objdump.patch
+ "${FILESDIR}"/gcc-11.3.0-musl-calloc.patch
)
pkg_pretend() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/, dev-util/mingw64-toolchain/files/
@ 2022-09-27 8:38 Ionen Wolkens
0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2022-09-27 8:38 UTC (permalink / raw
To: gentoo-commits
commit: e69418c72291eaac2e317d65b1c846609b0330b5
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 27 08:17:49 2022 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Sep 27 08:36:49 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e69418c7
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 <AT> gentoo.org>
.../files/gcc-12.2.0-drop-cflags-sed.patch | 23 ++++++++++++++++++++++
.../mingw64-toolchain-10.0.0_p1-r1.ebuild | 1 +
2 files changed, 24 insertions(+)
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() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/, dev-util/mingw64-toolchain/files/
@ 2022-09-27 8:38 Ionen Wolkens
0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2022-09-27 8:38 UTC (permalink / raw
To: gentoo-commits
commit: cc1b8b7f53de06cfda807177fcc3a76640f61c19
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 27 08:33:14 2022 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Sep 27 08:36:49 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc1b8b7f
dev-util/mingw64-toolchain: drop 10.0.0-r2
Not seeing a motivation to keep/maintain old gcc/binutils
with this package for very long. If regression testing is
really needed, there's crossdev.
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
dev-util/mingw64-toolchain/Manifest | 2 -
.../files/gcc-11.3.0-musl-calloc.patch | 33 ---
.../mingw64-toolchain-10.0.0-r2.ebuild | 302 ---------------------
3 files changed, 337 deletions(-)
diff --git a/dev-util/mingw64-toolchain/Manifest b/dev-util/mingw64-toolchain/Manifest
index 9bedc4e54451..ec14b3eba767 100644
--- a/dev-util/mingw64-toolchain/Manifest
+++ b/dev-util/mingw64-toolchain/Manifest
@@ -1,5 +1,3 @@
-DIST binutils-2.37.tar.xz 22916924 BLAKE2B f5a374fdf0300f7734d1e462333296b16c9d5ed6eba167e1742a4da7082f4388c929e286bf76c3933b3e434937380340732a31790723654b491ea0c8ab5b9ba5 SHA512 5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7
DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
-DIST gcc-11.3.0.tar.xz 81141364 BLAKE2B 7e562d25446ca4ab9fe8cdb714866f66aba3744d78bf84f31bfb097c1a981e4c7f990cb1e6bcfec5ae6671836a4984e2b70eb8fed81dcef5e244f88da8623469 SHA512 f0be5ad705c73b84477128a69c047f57dd47002f375eb60e1e842e08cf2009a509e92152bca345823926d550b7395ae6d4de7db51d1ee371c2dc37313881fca7
DIST gcc-12.2.0.tar.xz 84645292 BLAKE2B 715574af9ad678f9dc8cfd19c866bf910c7edfd479e7e9681337feaa9b54e5d304ddb85483816b8d89754d502405823ae2eff0d1e444538763f40be8e428d8da SHA512 e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
DIST mingw-w64-v10.0.0.tar.bz2 9620291 BLAKE2B 451372403289c492ca939d65bb4d9f6e9fa6bdd6b32d79d6438d858e106e8cc291712ada1f3f7b951a4c6908e7d0385d485ca76920af39bcf86effa48408e330 SHA512 3c0827af7c40809a867758f6cd9ef3ff0c988b43082345bf725e03949af95968d634ace99a7ffae323189549221dcb5d861de9e801f1fbc7904e446641b60516
diff --git a/dev-util/mingw64-toolchain/files/gcc-11.3.0-musl-calloc.patch b/dev-util/mingw64-toolchain/files/gcc-11.3.0-musl-calloc.patch
deleted file mode 100644
index 71602df60cca..000000000000
--- a/dev-util/mingw64-toolchain/files/gcc-11.3.0-musl-calloc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://bugs.gentoo.org/855002
-https://gcc.gnu.org/PR104799
-https://gcc.gnu.org/PR106102
---- a/gcc/gcc/cp/mapper-client.cc
-+++ b/gcc/gcc/cp/mapper-client.cc
-@@ -29,2 +29,3 @@
- #define INCLUDE_MAP
-+#include <pthread.h>
- #include "system.h"
---- a/gcc/gcc/cp/mapper-resolver.cc
-+++ b/gcc/gcc/cp/mapper-resolver.cc
-@@ -27,2 +27,3 @@
- #define INCLUDE_MAP
-+#include <pthread.h>
- #include "system.h"
---- a/gcc/gcc/cp/module.cc
-+++ b/gcc/gcc/cp/module.cc
-@@ -206,2 +206,3 @@
- #define INCLUDE_VECTOR
-+#include <pthread.h>
- #include "system.h"
---- a/gcc/libcc1/libcc1plugin.cc
-+++ b/gcc/libcc1/libcc1plugin.cc
-@@ -19,2 +19,3 @@
-
-+#include <pthread.h>
- #include <cc1plugin-config.h>
---- a/gcc/libcc1/libcp1plugin.cc
-+++ b/gcc/libcc1/libcp1plugin.cc
-@@ -20,2 +20,3 @@
-
-+#include <pthread.h>
- #include <cc1plugin-config.h>
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r2.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r2.ebuild
deleted file mode 100644
index a7fc75296ccc..000000000000
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0-r2.ebuild
+++ /dev/null
@@ -1,302 +0,0 @@
-# Copyright 2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MULTILIB_COMPAT=( abi_x86_{32,64} )
-inherit edo flag-o-matic multilib-build toolchain-funcs
-
-# Pick versions known to work for Wine and use vanilla for simplicity,
-# ideally update only on mingw64-runtime bumps or if there's known issues
-# (please report) to avoid rebuilding the entire toolchain too often.
-# Do _p1++ rather than revbump if changing without bumping mingw64 itself.
-BINUTILS_PV=2.37 # 2.38 needs bug #838106
-GCC_PV=11.3.0
-MINGW_PV=$(ver_cut 1-3)
-
-DESCRIPTION="All-in-one mingw64 toolchain intended for building Wine without crossdev"
-HOMEPAGE="
- https://www.mingw-w64.org/
- https://gcc.gnu.org/
- https://sourceware.org/binutils/"
-SRC_URI="
- mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${MINGW_PV}.tar.bz2
- mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.xz
- mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.xz"
-S="${WORKDIR}"
-
-# l1:binutils+gcc, l2:gcc(libraries), l3:mingw64-runtime
-LICENSE="
- GPL-3+
- LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 )
- ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain"
-SLOT="0"
-KEYWORDS="-* amd64 x86"
-IUSE="+abi_x86_32 custom-cflags debug"
-
-RDEPEND="
- dev-libs/gmp:=
- dev-libs/mpc:=
- dev-libs/mpfr:=
- sys-libs/zlib:=
- virtual/libiconv"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/mingw64-runtime-10.0.0-tmp-files-clash.patch
- "${FILESDIR}"/gcc-11.3.0-plugin-objdump.patch
- "${FILESDIR}"/gcc-11.3.0-musl-calloc.patch
-)
-
-pkg_pretend() {
- [[ ${MERGE_TYPE} == binary ]] && return
-
- tc-is-cross-compiler &&
- die "cross-compilation of the toolchain itself is unsupported"
-}
-
-src_prepare() {
- # rename directories to simplify both patching and the ebuild
- mv binutils{-${BINUTILS_PV},} || die
- mv gcc{-${GCC_PV},} || die
- mv mingw-w64-v${MINGW_PV} mingw64 || die
-
- default
-}
-
-src_compile() {
- # not great but do everything in src_compile given bootstrapping
- # process needs to be done in steps of configure+compile+install
- # (done modular to have most package-specific things in one place)
-
- CTARGET=$(usex x86 i686 x86_64)-w64-mingw32
-
- MWT_D=${T}/root # use ${T} to respect VariableScope for ${D}
- local mwtdir=/usr/lib/${PN}
- local prefix=${EPREFIX}${mwtdir}
- local sysroot=${MWT_D}${prefix}
- local -x PATH=${sysroot}/bin:${PATH}
-
- use custom-cflags || strip-flags # fancy flags are not realistic here
-
- local multilib=false
- use abi_x86_32 && use abi_x86_64 && multilib=true
-
- # global configure flags
- local conf=(
- --build=${CBUILD:-${CHOST}}
- --target=${CTARGET}
- --{doc,info,man}dir=/.skip # let individual packages handle docs
- )
-
- # binutils
- local conf_binutils=(
- --prefix="${prefix}"
- --host=${CHOST}
- --disable-cet
- --disable-nls
- --disable-shared
- --with-system-zlib
- --without-debuginfod
- )
- mwt-binutils() {
- # symlink gcc's lto plugin for AR (bug #854516)
- ln -s ../../libexec/gcc/${CTARGET}/${GCC_PV}/liblto_plugin.so \
- "${sysroot}"/lib/bfd-plugins || die
- }
-
- # gcc (minimal -- if need more, disable only in stage1 / enable in stage3)
- local conf_gcc=(
- --prefix="${prefix}"
- --host=${CHOST}
- --disable-bootstrap
- --disable-cet
- --disable-gcov #843989
- --disable-gomp
- --disable-libquadmath
- --disable-libsanitizer
- --disable-libssp
- --disable-libvtv
- --disable-shared
- --disable-werror
- --with-system-zlib
- --without-isl
- --without-zstd
- )
- ${multilib} || conf_gcc+=( --disable-multilib )
-
- local conf_gcc_stage1=(
- --enable-languages=c
- --disable-libatomic
- --with-sysroot="${sysroot}"
- )
- local -n conf_gcc_stage2=conf_gcc_stage1
-
- local conf_gcc_stage3=(
- --enable-languages=c,c++
- --enable-threads=posix # needs stage3, and is required for dxvk/vkd3d
- --with-sysroot="${prefix}"
- --with-build-sysroot="${sysroot}"
- )
-
- # mingw64-runtime (split in several parts, 3 needed for gcc stages)
- local conf_mingw64=(
- --prefix="${prefix}"/${CTARGET}
- --host=${CTARGET}
- --with-sysroot=no
- --without-{crt,headers}
-
- # mingw .dll aren't used by wine and packages wouldn't find them
- # at runtime, use crossdev if need dll and proper search paths
- --disable-shared
- )
-
- local conf_mingw64_headers=(
- --enable-idl
- --with-headers
- )
- mwt-mingw64_headers() { ln -s ${CTARGET} "${sysroot}"/mingw || die; } #419601
-
- local conf_mingw64_runtime=( --with-crt )
- ${multilib} ||
- conf_mingw64_runtime+=( $(usex x86 --disable-lib64 --disable-lib32 ) )
-
- local conf_mingw64_libraries=( --with-libraries )
- local conf_mingw64_libraries32=(
- --libdir="${prefix}"/${CTARGET}/lib32
- --with-libraries
- CC="${CTARGET}-gcc -m32"
- RCFLAGS="--target=pe-i386 ${RCFLAGS}"
- )
-
- # mingw64-runtime's idl compiler (useful not to depend on wine for widl)
- local conf_widl=( --prefix="${prefix}" )
-
- # mwt-build [-x] <path/package-name> [stage-name]
- # -> ./configure && make && make install && mwt-package() && mwt-package_stage()
- # passes conf, conf_package, and conf_package_stage arrays to configure, and
- # users can add options through environment with e.g.
- # MWT_BINUTILS_CONF="--some-option"
- # MWT_GCC_STAGE1_CONF="--some-gcc-stage1-only-option"
- # MWT_WIDL_CONF="--some-other-option"
- # EXTRA_ECONF="--global-option" (generic naming for if not reading this)
- mwt-build() {
- if [[ ${1} == -x ]]; then
- (
- # cross-compiling, cleanup and let ./configure handle it
- unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP
- CHOST=${CTARGET}
- filter-flags '-fstack-protector*' #870136
- filter-flags '-fuse-ld=*'
- strip-unsupported-flags
- mwt-build "${@:2}"
- )
- return
- fi
-
- local id=${1##*/}
- local build_dir=${WORKDIR}/${1}${2+_${2}}-build
-
- # econf is not allowed in src_compile and its defaults are
- # mostly unused here, so use configure directly
- local conf=( "${WORKDIR}/${1}"/configure "${conf[@]}" )
-
- local -n conf_id=conf_${id} conf_id2=conf_${id}_${2}
- [[ ${conf_id@a} == *a* ]] && conf+=( "${conf_id[@]}" )
- [[ ${2} && ${conf_id2@a} == *a* ]] && conf+=( "${conf_id2[@]}" )
-
- local -n extra_id=MWT_${id^^}_CONF extra_id2=MWT_${id^^}_${2^^}_CONF
- conf+=( ${EXTRA_ECONF} ${extra_id} ${2+${extra_id2}} )
-
- einfo "Building ${id}${2+ ${2}} in ${build_dir} ..."
-
- mkdir "${build_dir}" || die
- pushd "${build_dir}" >/dev/null || die
-
- edo "${conf[@]}"
- emake
- emake DESTDIR="${MWT_D}" install
-
- declare -f mwt-${id} >/dev/null && edo mwt-${id}
- declare -f mwt-${id}_${2} >/dev/null && edo mwt-${id}_${2}
-
- popd >/dev/null || die
- }
-
- # build with same ordering that crossdev would do + stage3 for pthreads
- mwt-build binutils
- mwt-build mingw64 headers
- mwt-build gcc stage1
- mwt-build -x mingw64 runtime
- mwt-build gcc stage2
- ${multilib} && mwt-build -x mingw64 libraries32
- mwt-build -x mingw64 libraries
- mwt-build gcc stage3
- mwt-build mingw64/mingw-w64-tools/widl
- # note: /could/ system-bootstrap if already installed, but gcc and
- # libraries will use the system's older mingw64 headers/static-libs
- # and make this potentially fragile without more workarounds/stages
-
- if ${multilib}; then
- # Like system's gcc, `x86_64-w64-mingw32-gcc -m32` can build for x86,
- # but packages expect crossdev's i686-w64-mingw32-gcc which is the same
- # just without 64bit support and would rather not build the toolchain
- # twice. Dirty but wrap to allow simple interoperability with crossdev.
- mwt-i686_wrapper() {
- printf "#!/usr/bin/env sh\nexec \"${prefix}/bin/${bin}\" ${*} "'"${@}"\n' \
- > ${bin32} || die
- chmod +x ${bin32} || die
- }
- pushd "${sysroot}"/bin >/dev/null || die
- local bin bin32
- for bin in ${CTARGET}-*; do
- bin32=${bin/x86_64-w64/i686-w64}
- case ${bin#${CTARGET}-} in
- gcc|gcc-${GCC_PV}|g++|widl) mwt-i686_wrapper -m32;;
- ld|ld.bfd) mwt-i686_wrapper -m i386pe;;
- windres) mwt-i686_wrapper --target=pe-i386;;
- *) ln -s ${bin} ${bin32} || die;;
- esac
- done
- popd >/dev/null || die
- fi
-
- # portage doesn't know the right strip executable to use for CTARGET
- # and it can lead to .a mangling, notably with 32bit (breaks toolchain)
- dostrip -x ${mwtdir}/{${CTARGET}/lib{,32},lib/gcc/${CTARGET}}
-
- # ... and instead do it here given this saves ~60MB
- if use !debug; then
- einfo "Stripping ${CTARGET} static libraries ..."
- find "${sysroot}"/{,lib/gcc/}${CTARGET} -type f -name '*.a' \
- -exec ${CTARGET}-strip --strip-unneeded {} + || die
- fi
-}
-
-src_install() {
- # use mv over copying given it's ~370MB
- mv "${MWT_D}${EPREFIX}"/* "${ED}" || die
-
- # gcc handles static libs internally without needing .la
- find "${ED}" -type f -name '*.la' -delete || die
-}
-
-pkg_postinst() {
- if [[ ! ${REPLACING_VERSIONS} ]]; then
- elog "Note that this package is primarily intended for Wine and related"
- elog "packages to depend on without needing a manual crossdev setup."
- elog
- elog "Settings are oriented only for what these need and simplicity."
- elog "Use sys-devel/crossdev if need full toolchain/customization:"
- elog " https://wiki.gentoo.org/wiki/Mingw"
- elog " https://wiki.gentoo.org/wiki/Crossdev"
- fi
-
- local cross_gcc=cross-$(usex x86 i686 x86_64)-w64-mingw32/gcc
- if has_version ${cross_gcc}; then
- # encourage cleanup given users may not realize if switch by default
- ewarn "${cross_gcc} is installed, note that ${PN}"
- ewarn "is redundant with the *-w64-mingw32/{binutils,gcc,mingw64-runtime}"
- ewarn "packages and optionally only one needs to be kept."
- fi
-}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/, dev-util/mingw64-toolchain/files/
@ 2023-04-19 4:10 Ionen Wolkens
0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2023-04-19 4:10 UTC (permalink / raw
To: gentoo-commits
commit: d35b84e61b8b7388978aea1a38dea24489d13d47
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 19 01:54:12 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Apr 19 03:26:53 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d35b84e6
dev-util/mingw64-toolchain: add 10.0.0_p3 (unkeyworded w/ gcc13)
Also includes a binutils-2.40 backport needed for dxvk.
Will likely keyword in _p4 whenever 13 is released (non-snapshot).
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
dev-util/mingw64-toolchain/Manifest | 1 +
.../files/binutils-2.40-import-lib.patch | 30 ++
.../mingw64-toolchain-10.0.0_p3.ebuild | 323 +++++++++++++++++++++
3 files changed, 354 insertions(+)
diff --git a/dev-util/mingw64-toolchain/Manifest b/dev-util/mingw64-toolchain/Manifest
index e2d41c1f9190..b3f53ced509a 100644
--- a/dev-util/mingw64-toolchain/Manifest
+++ b/dev-util/mingw64-toolchain/Manifest
@@ -1,4 +1,5 @@
DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
DIST gcc-12.2.0.tar.xz 84645292 BLAKE2B 715574af9ad678f9dc8cfd19c866bf910c7edfd479e7e9681337feaa9b54e5d304ddb85483816b8d89754d502405823ae2eff0d1e444538763f40be8e428d8da SHA512 e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
+DIST gcc-13-20230416.tar.xz 83936936 BLAKE2B c052fff2838a0bdd87f90345a5f7f5c607a6fe360b02ce8cb076f6dd3a62f6aae0c7d3914eee447e9c92c971331ddcbf0c94f2aa120aef89a742162b5e7dbfdd SHA512 222bb6db05b23aeb428262c69319a4964097065a88a5ae6c19b104c31af82c465f139c08f01bb077b0e776685769b77a54b772ebc4e2057e7c3e8954283997cf
DIST mingw-w64-v10.0.0.tar.bz2 9620291 BLAKE2B 451372403289c492ca939d65bb4d9f6e9fa6bdd6b32d79d6438d858e106e8cc291712ada1f3f7b951a4c6908e7d0385d485ca76920af39bcf86effa48408e330 SHA512 3c0827af7c40809a867758f6cd9ef3ff0c988b43082345bf725e03949af95968d634ace99a7ffae323189549221dcb5d861de9e801f1fbc7904e446641b60516
diff --git a/dev-util/mingw64-toolchain/files/binutils-2.40-import-lib.patch b/dev-util/mingw64-toolchain/files/binutils-2.40-import-lib.patch
new file mode 100644
index 000000000000..844fdf93020d
--- /dev/null
+++ b/dev-util/mingw64-toolchain/files/binutils-2.40-import-lib.patch
@@ -0,0 +1,30 @@
+Fixes building app-emulation/dxvk:
+
+ FAILED: src/d3d10/d3d10.dll
+ x86_64-w64-mingw32-g++ -m32 -mfpmath=sse -o src/d3d10/d3d10.dll <snip>
+ ld: internal error: aborting at ldlang.c:527 in compare_section
+ ld: please report this bug
+
+https://sourceware.org/PR30079
+https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=b7eab2a9d4f4e92692daf14b09fc95ca11b72e30
+From: Michael Matz <matz@suse.de>
+Date: Thu, 9 Feb 2023 15:29:00 +0100
+Subject: [PATCH] Fix PR30079: abort on mingw
+
+the early-out in wild_sort is not enough, it might still be
+that filenames are equal _and_ the wildcard list doesn't specify
+a sort order either. Don't call compare_section then.
+
+Tested on all targets.
+--- a/binutils/ld/ldlang.c
++++ b/binutils/ld/ldlang.c
+@@ -649,7 +649,8 @@ wild_sort (lang_wild_statement_type *wild,
+ looking at the sections for this file. */
+
+ /* Find the correct node to append this section. */
+- if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
++ if (sec && sec->spec.sorted != none && sec->spec.sorted != by_none
++ && compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
+ tree = &((*tree)->left);
+ else
+ tree = &((*tree)->right);
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p3.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p3.ebuild
new file mode 100644
index 000000000000..53a29447919b
--- /dev/null
+++ b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p3.ebuild
@@ -0,0 +1,323 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MULTILIB_COMPAT=( abi_x86_{32,64} )
+inherit edo flag-o-matic multilib-build toolchain-funcs
+
+# Pick versions known to work for wine+dxvk, and avoid too frequent updates
+# to due to slow rebuilds. Do _p1++ rather than revbump on changes (not using
+# Gentoo patchsets for simplicity, their changes are mostly unneeded here).
+BINUTILS_PV=2.40
+GCC_PV=13-20230416
+MINGW_PV=$(ver_cut 1-3)
+
+DESCRIPTION="All-in-one mingw64 toolchain intended for building Wine without crossdev"
+HOMEPAGE="
+ https://www.mingw-w64.org/
+ https://gcc.gnu.org/
+ https://sourceware.org/binutils/"
+SRC_URI="
+ mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${MINGW_PV}.tar.bz2
+ mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.xz"
+if [[ ${GCC_PV} == *-* ]]; then
+ SRC_URI+=" mirror://gcc/snapshots/${GCC_PV}/gcc-${GCC_PV}.tar.xz"
+else
+ SRC_URI+="
+ mirror://gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.xz
+ mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.xz"
+fi
+S="${WORKDIR}"
+
+# l1:binutils+gcc, l2:gcc(libraries), l3:mingw64-runtime
+LICENSE="
+ GPL-3+
+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 )
+ ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain"
+SLOT="0"
+# unkeyworded for testing new binutils+gcc, will likely keyword _p4 with
+# non-snapshot gcc-13.0.1 if no known issues
+#KEYWORDS="-* ~amd64 ~x86"
+IUSE="+abi_x86_32 custom-cflags debug"
+
+RDEPEND="
+ dev-libs/gmp:=
+ dev-libs/mpc:=
+ dev-libs/mpfr:=
+ sys-libs/zlib:=
+ virtual/libiconv"
+DEPEND="${RDEPEND}"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+ strerror_r # libstdc++ test using -Wimplicit+error
+)
+
+PATCHES=(
+ "${FILESDIR}"/mingw64-runtime-10.0.0-msvcr-extra-race.patch
+ "${FILESDIR}"/mingw64-runtime-10.0.0-tmp-files-clash.patch
+ "${FILESDIR}"/binutils-2.40-import-lib.patch
+ "${FILESDIR}"/gcc-12.2.0-drop-cflags-sed.patch
+)
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} == binary ]] && return
+
+ tc-is-cross-compiler &&
+ die "cross-compilation of the toolchain itself is unsupported"
+}
+
+src_prepare() {
+ # rename directories to simplify both patching and the ebuild
+ mv binutils{-${BINUTILS_PV},} || die
+ mv gcc{-${GCC_PV},} || die
+ mv mingw-w64-v${MINGW_PV} mingw64 || die
+
+ default
+}
+
+src_compile() {
+ # not great but do everything in src_compile given bootstrapping
+ # process needs to be done in steps of configure+compile+install
+ # (done modular to have most package-specific things in one place)
+
+ CTARGET=$(usex x86 i686 x86_64)-w64-mingw32
+
+ MWT_D=${T}/root # moved to ${D} in src_install
+ local mwtdir=/usr/lib/${PN}
+ local prefix=${EPREFIX}${mwtdir}
+ local sysroot=${MWT_D}${prefix}
+ local -x PATH=${sysroot}/bin:${PATH}
+
+ filter-lto # requires setting up, and may be messy with mingw static libs
+ use custom-cflags || strip-flags # fancy flags are not realistic here
+
+ local multilib=false
+ use abi_x86_32 && use abi_x86_64 && multilib=true
+
+ # global configure flags
+ local conf=(
+ --build=${CBUILD:-${CHOST}}
+ --target=${CTARGET}
+ --{doc,info,man}dir=/.skip # let individual packages handle docs
+ )
+
+ # binutils
+ local conf_binutils=(
+ --prefix="${prefix}"
+ --host=${CHOST}
+ --disable-cet
+ --disable-default-execstack
+ --disable-nls
+ --disable-shared
+ --with-system-zlib
+ --without-debuginfod
+ --without-msgpack
+ --without-zstd
+ )
+ mwt-binutils() {
+ # symlink gcc's lto plugin for AR (bug #854516)
+ ln -s ../../libexec/gcc/${CTARGET}/${GCC_PV%%[.-]*}/liblto_plugin.so \
+ "${sysroot}"/lib/bfd-plugins || die
+ }
+
+ # gcc (minimal -- if need more, disable only in stage1 / enable in stage3)
+ local conf_gcc=(
+ --prefix="${prefix}"
+ --host=${CHOST}
+ --disable-bootstrap
+ --disable-cet
+ --disable-gcov #843989
+ --disable-gomp
+ --disable-libquadmath
+ --disable-libsanitizer
+ --disable-libssp
+ --disable-libvtv
+ --disable-shared
+ --disable-werror
+ --with-gcc-major-version-only
+ --with-system-zlib
+ --without-isl
+ --without-zstd
+ )
+ ${multilib} || conf_gcc+=( --disable-multilib )
+
+ local conf_gcc_stage1=(
+ --enable-languages=c
+ --disable-libatomic
+ --with-sysroot="${sysroot}"
+ )
+ local -n conf_gcc_stage2=conf_gcc_stage1
+
+ local conf_gcc_stage3=(
+ --enable-languages=c,c++
+ --enable-threads=posix # needs stage3, and is required for dxvk/vkd3d
+ --with-sysroot="${prefix}"
+ --with-build-sysroot="${sysroot}"
+ )
+
+ # mingw64-runtime (split in several parts, 3 needed for gcc stages)
+ local conf_mingw64=(
+ --prefix="${prefix}"/${CTARGET}
+ --host=${CTARGET}
+ --with-sysroot=no
+ --without-{crt,headers}
+
+ # mingw .dll aren't used by wine and packages wouldn't find them
+ # at runtime, use crossdev if need dll and proper search paths
+ --disable-shared
+ )
+
+ local conf_mingw64_headers=(
+ --enable-idl
+ --with-headers
+ )
+ mwt-mingw64_headers() { ln -s ${CTARGET} "${sysroot}"/mingw || die; } #419601
+
+ local conf_mingw64_runtime=( --with-crt )
+ ${multilib} ||
+ conf_mingw64_runtime+=( $(usex x86 --disable-lib64 --disable-lib32 ) )
+
+ local conf_mingw64_libraries=( --with-libraries )
+ local conf_mingw64_libraries32=(
+ --libdir="${prefix}"/${CTARGET}/lib32
+ --with-libraries
+ CC="${CTARGET}-gcc -m32"
+ RCFLAGS="--target=pe-i386 ${RCFLAGS}"
+ )
+
+ # mingw64-runtime's idl compiler (useful not to depend on wine for widl)
+ local conf_widl=( --prefix="${prefix}" )
+
+ # mwt-build [-x] <path/package-name> [stage-name]
+ # -> ./configure && make && make install && mwt-package() && mwt-package_stage()
+ # passes conf, conf_package, and conf_package_stage arrays to configure, and
+ # users can add options through environment with e.g.
+ # MWT_BINUTILS_CONF="--some-option"
+ # MWT_GCC_STAGE1_CONF="--some-gcc-stage1-only-option"
+ # MWT_WIDL_CONF="--some-other-option"
+ # EXTRA_ECONF="--global-option" (generic naming for if not reading this)
+ mwt-build() {
+ if [[ ${1} == -x ]]; then
+ (
+ # cross-compiling, cleanup and let ./configure handle it
+ unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP
+ CHOST=${CTARGET}
+ filter-flags '-fstack-clash-protection' #758914
+ filter-flags '-fstack-protector*' #870136
+ filter-flags '-fuse-ld=*'
+ filter-flags '-mfunction-return=thunk*' #878849
+ strip-unsupported-flags
+ mwt-build "${@:2}"
+ )
+ return
+ fi
+
+ local id=${1##*/}
+ local build_dir=${WORKDIR}/${1}${2+_${2}}-build
+
+ # econf is not allowed in src_compile and its defaults are
+ # mostly unused here, so use configure directly
+ local conf=( "${WORKDIR}/${1}"/configure "${conf[@]}" )
+
+ local -n conf_id=conf_${id} conf_id2=conf_${id}_${2}
+ [[ ${conf_id@a} == *a* ]] && conf+=( "${conf_id[@]}" )
+ [[ ${2} && ${conf_id2@a} == *a* ]] && conf+=( "${conf_id2[@]}" )
+
+ local -n extra_id=MWT_${id^^}_CONF extra_id2=MWT_${id^^}_${2^^}_CONF
+ conf+=( ${EXTRA_ECONF} ${extra_id} ${2+${extra_id2}} )
+
+ einfo "Building ${id}${2+ ${2}} in ${build_dir} ..."
+
+ mkdir -p "${build_dir}" || die
+ pushd "${build_dir}" >/dev/null || die
+
+ edo "${conf[@]}"
+ emake
+ emake DESTDIR="${MWT_D}" install
+
+ declare -f mwt-${id} >/dev/null && edo mwt-${id}
+ declare -f mwt-${id}_${2} >/dev/null && edo mwt-${id}_${2}
+
+ popd >/dev/null || die
+ }
+
+ # workaround race condition with out-of-source crt build (bug #879537)
+ mkdir -p mingw64_runtime-build/mingw-w64-crt/lib{32,64} || die
+
+ # build with same ordering that crossdev would do + stage3 for pthreads
+ mwt-build binutils
+ mwt-build mingw64 headers
+ mwt-build gcc stage1
+ mwt-build -x mingw64 runtime
+ mwt-build gcc stage2
+ ${multilib} && mwt-build -x mingw64 libraries32
+ mwt-build -x mingw64 libraries
+ mwt-build gcc stage3
+ mwt-build mingw64/mingw-w64-tools/widl
+ # note: /could/ system-bootstrap if already installed, but gcc and
+ # libraries will use the system's older mingw64 headers/static-libs
+ # and make this potentially fragile without more workarounds/stages
+
+ if ${multilib}; then
+ # Like system's gcc, `x86_64-w64-mingw32-gcc -m32` can build for x86,
+ # but packages expect crossdev's i686-w64-mingw32-gcc which is the same
+ # just without 64bit support and would rather not build the toolchain
+ # twice. Dirty but wrap to allow simple interoperability with crossdev.
+ mwt-i686_wrapper() {
+ printf "#!/usr/bin/env sh\nexec \"${prefix}/bin/${bin}\" ${*} "'"${@}"\n' \
+ > ${bin32} || die
+ chmod +x ${bin32} || die
+ }
+ pushd "${sysroot}"/bin >/dev/null || die
+ local bin bin32
+ for bin in ${CTARGET}-*; do
+ bin32=${bin/x86_64-w64/i686-w64}
+ case ${bin#${CTARGET}-} in
+ as) mwt-i686_wrapper --32;;
+ cpp|gcc|gcc-${GCC_PV%%[.-]*}|g++|widl) mwt-i686_wrapper -m32;;
+ ld|ld.bfd) mwt-i686_wrapper -m i386pe;;
+ windres) mwt-i686_wrapper --target=pe-i386;;
+ *) ln -s ${bin} ${bin32} || die;;
+ esac
+ done
+ popd >/dev/null || die
+ fi
+
+ # portage doesn't know the right strip executable to use for CTARGET
+ # and it can lead to .a mangling, notably with 32bit (breaks toolchain)
+ dostrip -x ${mwtdir}/{${CTARGET}/lib{,32},lib/gcc/${CTARGET}}
+
+ # ... and instead do it here given this saves ~60MB
+ if use !debug; then
+ einfo "Stripping ${CTARGET} static libraries ..."
+ find "${sysroot}"/{,lib/gcc/}${CTARGET} -type f -name '*.a' \
+ -exec ${CTARGET}-strip --strip-unneeded {} + || die
+ fi
+}
+
+src_install() {
+ mv "${MWT_D}${EPREFIX}"/* "${ED}" || die
+
+ find "${ED}" -type f -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+ if [[ ! ${REPLACING_VERSIONS} ]]; then
+ elog "Note that this package is primarily intended for Wine and related"
+ elog "packages to depend on without needing a manual crossdev setup."
+ elog
+ elog "Settings are oriented only for what these need and simplicity."
+ elog "Use sys-devel/crossdev if need full toolchain/customization:"
+ elog " https://wiki.gentoo.org/wiki/Mingw"
+ elog " https://wiki.gentoo.org/wiki/Crossdev"
+ fi
+
+ local cross_gcc=cross-$(usex x86 i686 x86_64)-w64-mingw32/gcc
+ if has_version ${cross_gcc}; then
+ # encourage cleanup given users may not realize if switch by default
+ ewarn "${cross_gcc} is installed, note that ${PN}"
+ ewarn "is redundant with the *-w64-mingw32/{binutils,gcc,mingw64-runtime}"
+ ewarn "packages and optionally only one needs to be kept."
+ fi
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/, dev-util/mingw64-toolchain/files/
@ 2023-09-12 16:15 Ionen Wolkens
0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2023-09-12 16:15 UTC (permalink / raw
To: gentoo-commits
commit: 9970a77654637ca98a9eabd282ede3f24bb56b7d
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 12 15:55:28 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Sep 12 15:55:28 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9970a776
dev-util/mingw64-toolchain: drop 10.0.0_p1-r2, 11.0.0
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
dev-util/mingw64-toolchain/Manifest | 5 -
.../files/binutils-2.40-import-lib.patch | 30 --
.../files/gcc-11.3.0-plugin-objdump.patch | 22 --
| 22 --
.../mingw64-runtime-10.0.0-tmp-files-clash.patch | 10 -
.../mingw64-toolchain-10.0.0_p1-r2.ebuild | 319 --------------------
.../mingw64-toolchain-11.0.0.ebuild | 325 ---------------------
7 files changed, 733 deletions(-)
diff --git a/dev-util/mingw64-toolchain/Manifest b/dev-util/mingw64-toolchain/Manifest
index 87da411f739f..20f636111961 100644
--- a/dev-util/mingw64-toolchain/Manifest
+++ b/dev-util/mingw64-toolchain/Manifest
@@ -1,8 +1,3 @@
-DIST binutils-2.39.tar.xz 25167756 BLAKE2B ac6a5296c6586d53eaadcbffc5c399a6d79edf72450b9bb8b3525ce525129cef3d2eb90c85ef3bb3270b5a03b0e1ffb8f0b705f028158726f9777ebb8685066f SHA512 68e038f339a8c21faa19a57bbc447a51c817f47c2e06d740847c6e9cc3396c025d35d5369fa8c3f8b70414757c89f0e577939ddc0d70f283182504920f53b0a3
-DIST binutils-2.40.tar.xz 25241484 BLAKE2B 8d799f7c595f878b9af5b17a490021dd8b8300ac2fe0ed8574c012929d22d2d0493e003a3e631a9436e8e712da801779b777c566167fe42b0bde119ffa5ad1c2 SHA512 a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925
DIST binutils-2.41.tar.xz 26765692 BLAKE2B 3bccec2b52f7e82a727121bf2a2e51a6249ba63dcd74c665fd834e858645c912ffd8245d848435288b938852830b482905606f55c40df4061215fd75c52ffc75 SHA512 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
-DIST gcc-12.2.0.tar.xz 84645292 BLAKE2B 715574af9ad678f9dc8cfd19c866bf910c7edfd479e7e9681337feaa9b54e5d304ddb85483816b8d89754d502405823ae2eff0d1e444538763f40be8e428d8da SHA512 e9e857bd81bf7a370307d6848c81b2f5403db8c7b5207f54bce3f3faac3bde63445684092c2bc1a2427cddb6f7746496d9fbbef05fbbd77f2810b2998f1f9173
-DIST gcc-13.1.0.tar.xz 87451196 BLAKE2B b956a773cffe8b43bd6c9a99fe614f53f665438925a6b320975d301f547923e45d4d6fa577a143467fb03e0a9c1bab2b6719a1011d672367f3e644433a2d7606 SHA512 6cf06dfc48f57f5e67f7efe3248019329a14d690c728d9f2f7ef5fa0d58f1816f309586ba7ea2eac20d0b60a2d1b701f68392e9067dd46f827ba0efd7192db33
DIST gcc-13.2.0.tar.xz 87858592 BLAKE2B 0034b29d3d6cc05821f0c4253ce077805943aff7b370729dd203bda57d89c107edd657eeddc2fb1e69ea15c7b0323b961f46516c7f4af89a3ccf7fea84701be2 SHA512 d99e4826a70db04504467e349e9fbaedaa5870766cda7c5cab50cdebedc4be755ebca5b789e1232a34a20be1a0b60097de9280efe47bdb71c73251e30b0862a2
-DIST mingw-w64-v10.0.0.tar.bz2 9620291 BLAKE2B 451372403289c492ca939d65bb4d9f6e9fa6bdd6b32d79d6438d858e106e8cc291712ada1f3f7b951a4c6908e7d0385d485ca76920af39bcf86effa48408e330 SHA512 3c0827af7c40809a867758f6cd9ef3ff0c988b43082345bf725e03949af95968d634ace99a7ffae323189549221dcb5d861de9e801f1fbc7904e446641b60516
DIST mingw-w64-v11.0.0.tar.bz2 10058657 BLAKE2B 3f7637bcc7c3f25b2141d35105ea086eab74e228d7275725ffb4f07e283fd75169dbe0900a9c29494fba9ddb2ea03bdd6ae26f06048311e9c93ae3e317c4c060 SHA512 bc1c9fd9d8593ead9375fcbe40950f06cf7616b94dc676db2793ac9b496fe3a6cc94b5793effda3b752942be0d7d01a1c37a8f221aaf178df0d4eeb0aa6d1f8d
diff --git a/dev-util/mingw64-toolchain/files/binutils-2.40-import-lib.patch b/dev-util/mingw64-toolchain/files/binutils-2.40-import-lib.patch
deleted file mode 100644
index 844fdf93020d..000000000000
--- a/dev-util/mingw64-toolchain/files/binutils-2.40-import-lib.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Fixes building app-emulation/dxvk:
-
- FAILED: src/d3d10/d3d10.dll
- x86_64-w64-mingw32-g++ -m32 -mfpmath=sse -o src/d3d10/d3d10.dll <snip>
- ld: internal error: aborting at ldlang.c:527 in compare_section
- ld: please report this bug
-
-https://sourceware.org/PR30079
-https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=b7eab2a9d4f4e92692daf14b09fc95ca11b72e30
-From: Michael Matz <matz@suse.de>
-Date: Thu, 9 Feb 2023 15:29:00 +0100
-Subject: [PATCH] Fix PR30079: abort on mingw
-
-the early-out in wild_sort is not enough, it might still be
-that filenames are equal _and_ the wildcard list doesn't specify
-a sort order either. Don't call compare_section then.
-
-Tested on all targets.
---- a/binutils/ld/ldlang.c
-+++ b/binutils/ld/ldlang.c
-@@ -649,7 +649,8 @@ wild_sort (lang_wild_statement_type *wild,
- looking at the sections for this file. */
-
- /* Find the correct node to append this section. */
-- if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
-+ if (sec && sec->spec.sorted != none && sec->spec.sorted != by_none
-+ && compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
- tree = &((*tree)->left);
- else
- tree = &((*tree)->right);
diff --git a/dev-util/mingw64-toolchain/files/gcc-11.3.0-plugin-objdump.patch b/dev-util/mingw64-toolchain/files/gcc-11.3.0-plugin-objdump.patch
deleted file mode 100644
index 1de712de48bc..000000000000
--- a/dev-util/mingw64-toolchain/files/gcc-11.3.0-plugin-objdump.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-https://gcc.gnu.org/PR95648
---- a/gcc/config/gcc-plugin.m4
-+++ b/gcc/config/gcc-plugin.m4
-@@ -47,3 +47,3 @@
- if test x$build = x$host; then
-- export_sym_check="objdump${exeext} -T"
-+ export_sym_check="$ac_cv_prog_OBJDUMP -T"
- elif test x$host = x$target; then
---- a/gcc/gcc/configure
-+++ b/gcc/gcc/configure
-@@ -32069,3 +32069,3 @@
- if test x$build = x$host; then
-- export_sym_check="objdump${exeext} -T"
-+ export_sym_check="$ac_cv_prog_OBJDUMP -T"
- elif test x$host = x$target; then
---- a/gcc/libcc1/configure
-+++ b/gcc/libcc1/configure
-@@ -15017,3 +15017,3 @@
- if test x$build = x$host; then
-- export_sym_check="objdump${exeext} -T"
-+ export_sym_check="$ac_cv_prog_OBJDUMP -T"
- elif test x$host = x$target; then
diff --git a/dev-util/mingw64-toolchain/files/mingw64-runtime-10.0.0-msvcr-extra-race.patch b/dev-util/mingw64-toolchain/files/mingw64-runtime-10.0.0-msvcr-extra-race.patch
deleted file mode 100644
index 263dd8b4ac9b..000000000000
--- a/dev-util/mingw64-toolchain/files/mingw64-runtime-10.0.0-msvcr-extra-race.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-https://bugs.gentoo.org/879537
-https://sourceforge.net/p/mingw-w64/mingw-w64/ci/e1b0c1420bbd52ef505c71737c57393ac1397b0a
-(Makefile.in regenerated in 0eeb66e041327b9ca3f6bc1dd1d0a0bd2f46254d)
---- a/mingw64/mingw-w64-crt/Makefile.in
-+++ b/mingw64/mingw-w64-crt/Makefile.in
-@@ -77916,11 +77916,11 @@
- @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<)
--@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt10.a: lib32/msvcrt10.mri lib32/libmsvcrt10_def.a lib32/libmsvcrt_common.a
-+@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt10.a: lib32/msvcrt10.mri lib32/libmsvcrt10_def.a lib32/libmsvcrt_common.a lib32/libmsvcrt10_extra.a
- @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<)
--@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt20.a: lib32/msvcrt20.mri lib32/libmsvcrt20_def.a lib32/libmsvcrt_common.a
-+@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt20.a: lib32/msvcrt20.mri lib32/libmsvcrt20_def.a lib32/libmsvcrt_common.a lib32/libmsvcrt20_extra.a
- @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<)
--@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt40.a: lib32/msvcrt40.mri lib32/libmsvcrt40_def.a lib32/libmsvcrt_common.a
-+@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcrt40.a: lib32/msvcrt40.mri lib32/libmsvcrt40_def.a lib32/libmsvcrt_common.a lib32/libmsvcrt40_extra.a
- @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<)
--@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcr70.a: lib32/msvcr70.mri lib32/libmsvcr70_def.a lib32/libmsvcrt_common.a
-+@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcr70.a: lib32/msvcr70.mri lib32/libmsvcr70_def.a lib32/libmsvcrt_common.a lib32/libmsvcr70_extra.a
- @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<)
--@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcr71.a: lib32/msvcr71.mri lib32/libmsvcr71_def.a lib32/libmsvcrt_common.a
-+@LIB32_TRUE@@W32API_FALSE@lib32/libmsvcr71.a: lib32/msvcr71.mri lib32/libmsvcr71_def.a lib32/libmsvcrt_common.a lib32/libmsvcr71_extra.a
- @LIB32_TRUE@@W32API_FALSE@ cd $(dir $@) && $(AR) -M < $(abspath $<)
diff --git a/dev-util/mingw64-toolchain/files/mingw64-runtime-10.0.0-tmp-files-clash.patch b/dev-util/mingw64-toolchain/files/mingw64-runtime-10.0.0-tmp-files-clash.patch
deleted file mode 100644
index 38c4abf91e77..000000000000
--- a/dev-util/mingw64-toolchain/files/mingw64-runtime-10.0.0-tmp-files-clash.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-Fix clash when enabling lib32 and lib64 at same time, backport from:
-https://sourceforge.net/p/mingw-w64/mingw-w64/ci/953bcd32ae470c4647e94de8548dda5a8f07d82d/
-(except directly to Makefile.in to avoid autoreconf over this)
---- a/mingw64/mingw-w64-crt/Makefile.in
-+++ b/mingw64/mingw-w64-crt/Makefile.in
-@@ -153,3 +153,3 @@
- host_triplet = @host@
--@DLLTOOL_HAS_TEMP_PREFIX_TRUE@am__append_1 = --temp-prefix $$(basename $@ .a)
-+@DLLTOOL_HAS_TEMP_PREFIX_TRUE@am__append_1 = --temp-prefix $(basename $@)
- @DELAY_IMPORT_LIBS_TRUE@am__append_2 = --output-delaylib $@.delayimp.a
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r2.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r2.ebuild
deleted file mode 100644
index 0cd505bd6851..000000000000
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p1-r2.ebuild
+++ /dev/null
@@ -1,319 +0,0 @@
-# Copyright 2022-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MULTILIB_COMPAT=( abi_x86_{32,64} )
-inherit edo flag-o-matic multilib-build toolchain-funcs
-
-# Pick versions known to work for Wine and use vanilla for simplicity,
-# ideally update only on mingw64-runtime bumps or if there's known issues
-# (please report) to avoid rebuilding the entire toolchain too often.
-# Do _p1++ rather than revbump if changing without bumping mingw64 itself.
-BINUTILS_PV=2.39
-GCC_PV=12.2.0
-MINGW_PV=$(ver_cut 1-3)
-
-DESCRIPTION="All-in-one mingw64 toolchain intended for building Wine without crossdev"
-HOMEPAGE="
- https://www.mingw-w64.org/
- https://gcc.gnu.org/
- https://sourceware.org/binutils/"
-SRC_URI="
- mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${MINGW_PV}.tar.bz2
- mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.xz
- mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.xz"
-S="${WORKDIR}"
-
-# l1:binutils+gcc, l2:gcc(libraries), l3:mingw64-runtime
-LICENSE="
- GPL-3+
- LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 )
- ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain"
-SLOT="0"
-KEYWORDS="-* amd64 x86"
-IUSE="+abi_x86_32 custom-cflags debug"
-
-RDEPEND="
- dev-libs/gmp:=
- dev-libs/mpc:=
- dev-libs/mpfr:=
- sys-libs/zlib:=
- virtual/libiconv"
-DEPEND="${RDEPEND}"
-
-PATCHES=(
- "${FILESDIR}"/mingw64-runtime-10.0.0-msvcr-extra-race.patch
- "${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() {
- [[ ${MERGE_TYPE} == binary ]] && return
-
- tc-is-cross-compiler &&
- die "cross-compilation of the toolchain itself is unsupported"
-}
-
-src_prepare() {
- # rename directories to simplify both patching and the ebuild
- mv binutils{-${BINUTILS_PV},} || die
- mv gcc{-${GCC_PV},} || die
- mv mingw-w64-v${MINGW_PV} mingw64 || die
-
- default
-}
-
-src_compile() {
- # not great but do everything in src_compile given bootstrapping
- # process needs to be done in steps of configure+compile+install
- # (done modular to have most package-specific things in one place)
-
- CTARGET=$(usex x86 i686 x86_64)-w64-mingw32
-
- MWT_D=${T}/root # use ${T} to respect VariableScope for ${D}
- local mwtdir=/usr/lib/${PN}
- local prefix=${EPREFIX}${mwtdir}
- local sysroot=${MWT_D}${prefix}
- local -x PATH=${sysroot}/bin:${PATH}
-
- use custom-cflags || strip-flags # fancy flags are not realistic here
-
- local multilib=false
- use abi_x86_32 && use abi_x86_64 && multilib=true
-
- # global configure flags
- local conf=(
- --build=${CBUILD:-${CHOST}}
- --target=${CTARGET}
- --{doc,info,man}dir=/.skip # let individual packages handle docs
- )
-
- # binutils
- local conf_binutils=(
- --prefix="${prefix}"
- --host=${CHOST}
- --disable-cet
- --disable-default-execstack
- --disable-nls
- --disable-shared
- --with-system-zlib
- --without-debuginfod
- --without-msgpack
- )
- mwt-binutils() {
- # symlink gcc's lto plugin for AR (bug #854516)
- ln -s ../../libexec/gcc/${CTARGET}/${GCC_PV}/liblto_plugin.so \
- "${sysroot}"/lib/bfd-plugins || die
- }
-
- # gcc (minimal -- if need more, disable only in stage1 / enable in stage3)
- local conf_gcc=(
- --prefix="${prefix}"
- --host=${CHOST}
- --disable-bootstrap
- --disable-cet
- --disable-gcov #843989
- --disable-gomp
- --disable-libquadmath
- --disable-libsanitizer
- --disable-libssp
- --disable-libvtv
- --disable-shared
- --disable-werror
- --with-system-zlib
- --without-isl
- --without-zstd
- )
- ${multilib} || conf_gcc+=( --disable-multilib )
-
- local conf_gcc_stage1=(
- --enable-languages=c
- --disable-libatomic
- --with-sysroot="${sysroot}"
- )
- local -n conf_gcc_stage2=conf_gcc_stage1
-
- local conf_gcc_stage3=(
- --enable-languages=c,c++
- --enable-threads=posix # needs stage3, and is required for dxvk/vkd3d
- --with-sysroot="${prefix}"
- --with-build-sysroot="${sysroot}"
- )
-
- # mingw64-runtime (split in several parts, 3 needed for gcc stages)
- local conf_mingw64=(
- --prefix="${prefix}"/${CTARGET}
- --host=${CTARGET}
- --with-sysroot=no
- --without-{crt,headers}
-
- # mingw .dll aren't used by wine and packages wouldn't find them
- # at runtime, use crossdev if need dll and proper search paths
- --disable-shared
- )
-
- local conf_mingw64_headers=(
- --enable-idl
- --with-headers
- )
- mwt-mingw64_headers() { ln -s ${CTARGET} "${sysroot}"/mingw || die; } #419601
-
- local conf_mingw64_runtime=( --with-crt )
- ${multilib} ||
- conf_mingw64_runtime+=( $(usex x86 --disable-lib64 --disable-lib32 ) )
-
- local conf_mingw64_libraries=( --with-libraries )
- local conf_mingw64_libraries32=(
- --libdir="${prefix}"/${CTARGET}/lib32
- --with-libraries
- CC="${CTARGET}-gcc -m32"
- RCFLAGS="--target=pe-i386 ${RCFLAGS}"
- )
-
- # mingw64-runtime's idl compiler (useful not to depend on wine for widl)
- local conf_widl=( --prefix="${prefix}" )
-
- # mwt-build [-x] <path/package-name> [stage-name]
- # -> ./configure && make && make install && mwt-package() && mwt-package_stage()
- # passes conf, conf_package, and conf_package_stage arrays to configure, and
- # users can add options through environment with e.g.
- # MWT_BINUTILS_CONF="--some-option"
- # MWT_GCC_STAGE1_CONF="--some-gcc-stage1-only-option"
- # MWT_WIDL_CONF="--some-other-option"
- # EXTRA_ECONF="--global-option" (generic naming for if not reading this)
- mwt-build() {
- if [[ ${1} == -x ]]; then
- (
- # cross-compiling, cleanup and let ./configure handle it
- unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP
- CHOST=${CTARGET}
- filter-flags '-fstack-clash-protection' #758914
- filter-flags '-fstack-protector*' #870136
- filter-flags '-fuse-ld=*'
- filter-flags '-mfunction-return=thunk*' #878849
-
- # -mavx with mingw-gcc has a history of obscure issues and
- # disabling is seen as safer, e.g. `WINEARCH=win32 winecfg`
- # crashes with -march=skylake >=wine-8.10, similar issues with
- # znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273
- append-flags -mno-avx
-
- strip-unsupported-flags
- mwt-build "${@:2}"
- )
- return
- fi
-
- local id=${1##*/}
- local build_dir=${WORKDIR}/${1}${2+_${2}}-build
-
- # econf is not allowed in src_compile and its defaults are
- # mostly unused here, so use configure directly
- local conf=( "${WORKDIR}/${1}"/configure "${conf[@]}" )
-
- local -n conf_id=conf_${id} conf_id2=conf_${id}_${2}
- [[ ${conf_id@a} == *a* ]] && conf+=( "${conf_id[@]}" )
- [[ ${2} && ${conf_id2@a} == *a* ]] && conf+=( "${conf_id2[@]}" )
-
- local -n extra_id=MWT_${id^^}_CONF extra_id2=MWT_${id^^}_${2^^}_CONF
- conf+=( ${EXTRA_ECONF} ${extra_id} ${2+${extra_id2}} )
-
- einfo "Building ${id}${2+ ${2}} in ${build_dir} ..."
-
- mkdir -p "${build_dir}" || die
- pushd "${build_dir}" >/dev/null || die
-
- edo "${conf[@]}"
- emake V=1
- # -j1 to match bug #906155, other packages may be fragile too
- emake -j1 V=1 DESTDIR="${MWT_D}" install
-
- declare -f mwt-${id} >/dev/null && edo mwt-${id}
- declare -f mwt-${id}_${2} >/dev/null && edo mwt-${id}_${2}
-
- popd >/dev/null || die
- }
-
- # workaround race condition with out-of-source crt build (bug #879537)
- mkdir -p mingw64_runtime-build/mingw-w64-crt/lib{32,64} || die
-
- # build with same ordering that crossdev would do + stage3 for pthreads
- mwt-build binutils
- mwt-build mingw64 headers
- mwt-build gcc stage1
- mwt-build -x mingw64 runtime
- mwt-build gcc stage2
- ${multilib} && mwt-build -x mingw64 libraries32
- mwt-build -x mingw64 libraries
- mwt-build gcc stage3
- mwt-build mingw64/mingw-w64-tools/widl
- # note: /could/ system-bootstrap if already installed, but gcc and
- # libraries will use the system's older mingw64 headers/static-libs
- # and make this potentially fragile without more workarounds/stages
-
- if ${multilib}; then
- # Like system's gcc, `x86_64-w64-mingw32-gcc -m32` can build for x86,
- # but packages expect crossdev's i686-w64-mingw32-gcc which is the same
- # just without 64bit support and would rather not build the toolchain
- # twice. Dirty but wrap to allow simple interoperability with crossdev.
- mwt-i686_wrapper() {
- printf "#!/usr/bin/env sh\nexec \"${prefix}/bin/${bin}\" ${*} "'"${@}"\n' \
- > ${bin32} || die
- chmod +x ${bin32} || die
- }
- pushd "${sysroot}"/bin >/dev/null || die
- local bin bin32
- for bin in ${CTARGET}-*; do
- bin32=${bin/x86_64-w64/i686-w64}
- case ${bin#${CTARGET}-} in
- as) mwt-i686_wrapper --32;;
- cpp|gcc|gcc-${GCC_PV}|g++|widl) mwt-i686_wrapper -m32;;
- ld|ld.bfd) mwt-i686_wrapper -m i386pe;;
- windres) mwt-i686_wrapper --target=pe-i386;;
- *) ln -s ${bin} ${bin32} || die;;
- esac
- done
- popd >/dev/null || die
- fi
-
- # portage doesn't know the right strip executable to use for CTARGET
- # and it can lead to .a mangling, notably with 32bit (breaks toolchain)
- dostrip -x ${mwtdir}/{${CTARGET}/lib{,32},lib/gcc/${CTARGET}}
-
- # ... and instead do it here given this saves ~60MB
- if use !debug; then
- einfo "Stripping ${CTARGET} static libraries ..."
- find "${sysroot}"/{,lib/gcc/}${CTARGET} -type f -name '*.a' \
- -exec ${CTARGET}-strip --strip-unneeded {} + || die
- fi
-}
-
-src_install() {
- # use mv over copying given it's ~370MB
- mv "${MWT_D}${EPREFIX}"/* "${ED}" || die
-
- # gcc handles static libs internally without needing .la
- find "${ED}" -type f -name '*.la' -delete || die
-}
-
-pkg_postinst() {
- if [[ ! ${REPLACING_VERSIONS} ]]; then
- elog "Note that this package is primarily intended for Wine and related"
- elog "packages to depend on without needing a manual crossdev setup."
- elog
- elog "Settings are oriented only for what these need and simplicity."
- elog "Use sys-devel/crossdev if need full toolchain/customization:"
- elog " https://wiki.gentoo.org/wiki/Mingw"
- elog " https://wiki.gentoo.org/wiki/Crossdev"
- fi
-
- local cross_gcc=cross-$(usex x86 i686 x86_64)-w64-mingw32/gcc
- if has_version ${cross_gcc}; then
- # encourage cleanup given users may not realize if switch by default
- ewarn "${cross_gcc} is installed, note that ${PN}"
- ewarn "is redundant with the *-w64-mingw32/{binutils,gcc,mingw64-runtime}"
- ewarn "packages and optionally only one needs to be kept."
- fi
-}
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.0.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.0.ebuild
deleted file mode 100644
index fe1e24330e9d..000000000000
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.0.ebuild
+++ /dev/null
@@ -1,325 +0,0 @@
-# Copyright 2022-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-MULTILIB_COMPAT=( abi_x86_{32,64} )
-inherit edo flag-o-matic multilib-build toolchain-funcs
-
-# Pick versions known to work for wine+dxvk, and avoid too frequent updates
-# due to slow rebuilds. Do _p1++ rather than revbump on changes (not using
-# Gentoo patchsets for simplicity, their changes are mostly unneeded here).
-BINUTILS_PV=2.40
-GCC_PV=13.1.0
-MINGW_PV=$(ver_cut 1-3)
-
-DESCRIPTION="All-in-one mingw64 toolchain intended for building Wine without crossdev"
-HOMEPAGE="
- https://www.mingw-w64.org/
- https://gcc.gnu.org/
- https://sourceware.org/binutils/"
-SRC_URI="
- mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${MINGW_PV}.tar.bz2
- mirror://gnu/binutils/binutils-${BINUTILS_PV}.tar.xz"
-if [[ ${GCC_PV} == *-* ]]; then
- SRC_URI+=" mirror://gcc/snapshots/${GCC_PV}/gcc-${GCC_PV}.tar.xz"
-else
- SRC_URI+="
- mirror://gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.xz
- mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_PV}.tar.xz"
-fi
-S="${WORKDIR}"
-
-# l1:binutils+gcc, l2:gcc(libraries), l3:mingw64-runtime
-LICENSE="
- GPL-3+
- LGPL-3+ || ( GPL-3+ libgcc libstdc++ gcc-runtime-library-exception-3.1 )
- ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain"
-SLOT="0"
-KEYWORDS="-* amd64 x86"
-IUSE="+abi_x86_32 custom-cflags debug"
-
-RDEPEND="
- dev-libs/gmp:=
- dev-libs/mpc:=
- dev-libs/mpfr:=
- sys-libs/zlib:=
- virtual/libiconv"
-DEPEND="${RDEPEND}"
-
-QA_CONFIG_IMPL_DECL_SKIP=(
- strerror_r # libstdc++ test using -Wimplicit+error
-)
-
-PATCHES=(
- "${FILESDIR}"/binutils-2.40-import-lib.patch
- "${FILESDIR}"/gcc-12.2.0-drop-cflags-sed.patch
-)
-
-pkg_pretend() {
- [[ ${MERGE_TYPE} == binary ]] && return
-
- tc-is-cross-compiler &&
- die "cross-compilation of the toolchain itself is unsupported"
-}
-
-src_prepare() {
- # rename directories to simplify both patching and the ebuild
- mv binutils{-${BINUTILS_PV},} || die
- mv gcc{-${GCC_PV},} || die
- mv mingw-w64-v${MINGW_PV} mingw64 || die
-
- default
-}
-
-src_compile() {
- # not great but do everything in src_compile given bootstrapping
- # process needs to be done in steps of configure+compile+install
- # (done modular to have most package-specific things in one place)
-
- CTARGET=$(usex x86 i686 x86_64)-w64-mingw32
-
- MWT_D=${T}/root # moved to ${D} in src_install
- local mwtdir=/usr/lib/${PN}
- local prefix=${EPREFIX}${mwtdir}
- local sysroot=${MWT_D}${prefix}
- local -x PATH=${sysroot}/bin:${PATH}
-
- filter-lto # requires setting up, and may be messy with mingw static libs
- use custom-cflags || strip-flags # fancy flags are not realistic here
-
- local multilib=false
- use abi_x86_32 && use abi_x86_64 && multilib=true
-
- # global configure flags
- local conf=(
- --build=${CBUILD:-${CHOST}}
- --target=${CTARGET}
- --{doc,info,man}dir=/.skip # let individual packages handle docs
- )
-
- # binutils
- local conf_binutils=(
- --prefix="${prefix}"
- --host=${CHOST}
- --disable-cet
- --disable-default-execstack
- --disable-nls
- --disable-shared
- --with-system-zlib
- --without-debuginfod
- --without-msgpack
- --without-zstd
- )
- mwt-binutils() {
- # symlink gcc's lto plugin for AR (bug #854516)
- ln -s ../../libexec/gcc/${CTARGET}/${GCC_PV%%[.-]*}/liblto_plugin.so \
- "${sysroot}"/lib/bfd-plugins || die
- }
-
- # gcc (minimal -- if need more, disable only in stage1 / enable in stage3)
- local conf_gcc=(
- --prefix="${prefix}"
- --host=${CHOST}
- --disable-bootstrap
- --disable-cet
- --disable-gcov #843989
- --disable-gomp
- --disable-libquadmath
- --disable-libsanitizer
- --disable-libssp
- --disable-libvtv
- --disable-shared
- --disable-werror
- --with-gcc-major-version-only
- --with-system-zlib
- --without-isl
- --without-zstd
- )
- ${multilib} || conf_gcc+=( --disable-multilib )
-
- local conf_gcc_stage1=(
- --enable-languages=c
- --disable-libatomic
- --with-sysroot="${sysroot}"
- )
- local -n conf_gcc_stage2=conf_gcc_stage1
-
- local conf_gcc_stage3=(
- --enable-languages=c,c++
- --enable-threads=posix # needs stage3, and is required for dxvk/vkd3d
- --with-sysroot="${prefix}"
- --with-build-sysroot="${sysroot}"
- )
-
- # mingw64-runtime (split in several parts, 3 needed for gcc stages)
- local conf_mingw64=(
- --prefix="${prefix}"/${CTARGET}
- --host=${CTARGET}
- --with-sysroot=no
- --without-{crt,headers}
-
- # mingw .dll aren't used by wine and packages wouldn't find them
- # at runtime, use crossdev if need dll and proper search paths
- --disable-shared
- )
-
- local conf_mingw64_headers=(
- --enable-idl
- --with-headers
- )
- mwt-mingw64_headers() { ln -s ${CTARGET} "${sysroot}"/mingw || die; } #419601
-
- local conf_mingw64_runtime=( --with-crt )
- ${multilib} ||
- conf_mingw64_runtime+=( $(usex x86 --disable-lib64 --disable-lib32 ) )
-
- local conf_mingw64_libraries=( --with-libraries )
- local conf_mingw64_libraries32=(
- --libdir="${prefix}"/${CTARGET}/lib32
- --with-libraries
- CC="${CTARGET}-gcc -m32"
- RCFLAGS="--target=pe-i386 ${RCFLAGS}"
- )
-
- # mingw64-runtime's idl compiler (useful not to depend on wine for widl)
- local conf_widl=( --prefix="${prefix}" )
-
- # mwt-build [-x] <path/package-name> [stage-name]
- # -> ./configure && make && make install && mwt-package() && mwt-package_stage()
- # passes conf, conf_package, and conf_package_stage arrays to configure, and
- # users can add options through environment with e.g.
- # MWT_BINUTILS_CONF="--some-option"
- # MWT_GCC_STAGE1_CONF="--some-gcc-stage1-only-option"
- # MWT_WIDL_CONF="--some-other-option"
- # EXTRA_ECONF="--global-option" (generic naming for if not reading this)
- mwt-build() {
- if [[ ${1} == -x ]]; then
- (
- # cross-compiling, cleanup and let ./configure handle it
- unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP
- CHOST=${CTARGET}
- filter-flags '-fuse-ld=*'
- filter-flags '-mfunction-return=thunk*' #878849
-
- # -mavx with mingw-gcc has a history of obscure issues and
- # disabling is seen as safer, e.g. `WINEARCH=win32 winecfg`
- # crashes with -march=skylake >=wine-8.10, similar issues with
- # znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273
- append-flags -mno-avx
-
- strip-unsupported-flags
- mwt-build "${@:2}"
- )
- return
- fi
-
- local id=${1##*/}
- local build_dir=${WORKDIR}/${1}${2+_${2}}-build
-
- # econf is not allowed in src_compile and its defaults are
- # mostly unused here, so use configure directly
- local conf=( "${WORKDIR}/${1}"/configure "${conf[@]}" )
-
- local -n conf_id=conf_${id} conf_id2=conf_${id}_${2}
- [[ ${conf_id@a} == *a* ]] && conf+=( "${conf_id[@]}" )
- [[ ${2} && ${conf_id2@a} == *a* ]] && conf+=( "${conf_id2[@]}" )
-
- local -n extra_id=MWT_${id^^}_CONF extra_id2=MWT_${id^^}_${2^^}_CONF
- conf+=( ${EXTRA_ECONF} ${extra_id} ${2+${extra_id2}} )
-
- einfo "Building ${id}${2+ ${2}} in ${build_dir} ..."
-
- mkdir -p "${build_dir}" || die
- pushd "${build_dir}" >/dev/null || die
-
- edo "${conf[@]}"
- emake V=1
- # -j1 to match bug #906155, other packages may be fragile too
- emake -j1 V=1 DESTDIR="${MWT_D}" install
-
- declare -f mwt-${id} >/dev/null && edo mwt-${id}
- declare -f mwt-${id}_${2} >/dev/null && edo mwt-${id}_${2}
-
- popd >/dev/null || die
- }
-
- # workaround race condition with out-of-source crt build (bug #879537)
- mkdir -p mingw64_runtime-build/mingw-w64-crt/lib{32,64} || die
-
- # build with same ordering that crossdev would do + stage3 for pthreads
- mwt-build binutils
- mwt-build mingw64 headers
- mwt-build gcc stage1
- mwt-build -x mingw64 runtime
- mwt-build gcc stage2
- ${multilib} && mwt-build -x mingw64 libraries32
- mwt-build -x mingw64 libraries
- mwt-build gcc stage3
- mwt-build mingw64/mingw-w64-tools/widl
- # note: /could/ system-bootstrap if already installed, but gcc and
- # libraries will use the system's older mingw64 headers/static-libs
- # and make this potentially fragile without more workarounds/stages
-
- if ${multilib}; then
- # Like system's gcc, `x86_64-w64-mingw32-gcc -m32` can build for x86,
- # but packages expect crossdev's i686-w64-mingw32-gcc which is the same
- # just without 64bit support and would rather not build the toolchain
- # twice. Dirty but wrap to allow simple interoperability with crossdev.
- mwt-i686_wrapper() {
- printf "#!/usr/bin/env sh\nexec \"${prefix}/bin/${bin}\" ${*} "'"${@}"\n' \
- > ${bin32} || die
- chmod +x ${bin32} || die
- }
- pushd "${sysroot}"/bin >/dev/null || die
- local bin bin32
- for bin in ${CTARGET}-*; do
- bin32=${bin/x86_64-w64/i686-w64}
- case ${bin#${CTARGET}-} in
- as) mwt-i686_wrapper --32;;
- cpp|gcc|gcc-${GCC_PV%%[.-]*}|g++|widl) mwt-i686_wrapper -m32;;
- ld|ld.bfd) mwt-i686_wrapper -m i386pe;;
- windres) mwt-i686_wrapper --target=pe-i386;;
- *) ln -s ${bin} ${bin32} || die;;
- esac
- done
- popd >/dev/null || die
- fi
-
- # portage doesn't know the right strip executable to use for CTARGET
- # and it can lead to .a mangling, notably with 32bit (breaks toolchain)
- dostrip -x ${mwtdir}/{${CTARGET}/lib{,32},lib/gcc/${CTARGET}}
-
- # ... and instead do it here given this saves ~60MB
- if use !debug; then
- einfo "Stripping ${CTARGET} static libraries ..."
- find "${sysroot}"/{,lib/gcc/}${CTARGET} -type f -name '*.a' \
- -exec ${CTARGET}-strip --strip-unneeded {} + || die
- fi
-}
-
-src_install() {
- mv "${MWT_D}${EPREFIX}"/* "${ED}" || die
-
- find "${ED}" -type f -name '*.la' -delete || die
-}
-
-pkg_postinst() {
- if [[ ! ${REPLACING_VERSIONS} ]]; then
- elog "Note that this package is primarily intended for Wine and related"
- elog "packages to depend on without needing a manual crossdev setup."
- elog
- elog "Settings are oriented only for what these need and simplicity."
- elog "Use sys-devel/crossdev if need full toolchain/customization:"
- elog " https://wiki.gentoo.org/wiki/Mingw"
- elog " https://wiki.gentoo.org/wiki/Crossdev"
- fi
-
- local cross_gcc=cross-$(usex x86 i686 x86_64)-w64-mingw32/gcc
- if has_version ${cross_gcc}; then
- # encourage cleanup given users may not realize if switch by default
- ewarn "${cross_gcc} is installed, note that ${PN}"
- ewarn "is redundant with the *-w64-mingw32/{binutils,gcc,mingw64-runtime}"
- ewarn "packages and optionally only one needs to be kept."
- fi
-}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/, dev-util/mingw64-toolchain/files/
@ 2023-09-23 18:30 Ionen Wolkens
0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2023-09-23 18:30 UTC (permalink / raw
To: gentoo-commits
commit: 91de32d5f3f633f479687f16573716ca177cb13b
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 23 17:39:32 2023 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Sat Sep 23 18:30:02 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91de32d5
dev-util/mingw64-toolchain: fix build with libcxx-17
Meant to delay this until it'd be fixed in sys-devel/gcc, but issue
unfortunately went under the radar. Tried a snapshot (13-20230916)
but still seems broken the same way, and assume sys-devel/gcc likely
still has issues too (not tested).
For now no harm in just picking/rebasing PR#32249 which is sufficient
for what is used here (tested on llvm-musl w/ default-libcxx-17).
Technically patch could warrant a revbump like the PR did (and in
~arch), but feels too basic to be worth the extra churn and a long
rebuild.
Closes: https://bugs.gentoo.org/914565
Closes: https://github.com/gentoo/gentoo/pull/32249
Co-Authored-By: Violet Purcell <vimproved <AT> inventati.org>
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
.../files/gcc-13.2.0-libcxx-17.patch | 63 ++++++++++++++++++++++
.../mingw64-toolchain-11.0.0_p2.ebuild | 1 +
2 files changed, 64 insertions(+)
diff --git a/dev-util/mingw64-toolchain/files/gcc-13.2.0-libcxx-17.patch b/dev-util/mingw64-toolchain/files/gcc-13.2.0-libcxx-17.patch
new file mode 100644
index 000000000000..03c5b8cd01e3
--- /dev/null
+++ b/dev-util/mingw64-toolchain/files/gcc-13.2.0-libcxx-17.patch
@@ -0,0 +1,63 @@
+https://bugs.gentoo.org/914565
+--- a/gcc/gcc/system.h
++++ b/gcc/gcc/system.h
+@@ -201,6 +201,9 @@ extern int fprintf_unlocked (FILE *, con
+ #ifdef INCLUDE_STRING
+ # include <string>
+ #endif
++#ifdef INCLUDE_VECTOR
++# include <vector>
++#endif
+ #endif
+
+ /* There are an extraordinary number of issues with <ctype.h>.
+@@ -229,9 +232,6 @@ extern int errno;
+ #ifdef INCLUDE_SET
+ # include <set>
+ #endif
+-#ifdef INCLUDE_VECTOR
+-# include <vector>
+-#endif
+ #ifdef INCLUDE_ARRAY
+ # include <array>
+ #endif
+--- a/gcc/libcc1/libcc1plugin.cc
++++ b/gcc/libcc1/libcc1plugin.cc
+@@ -19,6 +19,8 @@
+
+ #include <cc1plugin-config.h>
+
++#include <vector>
++
+ #undef PACKAGE_NAME
+ #undef PACKAGE_STRING
+ #undef PACKAGE_TARNAME
+@@ -69,8 +71,6 @@
+ #include "gcc-c-interface.h"
+ #include "context.hh"
+
+-#include <vector>
+-
+ using namespace cc1_plugin;
+
+ \f
+--- a/gcc/libcc1/libcp1plugin.cc
++++ b/gcc/libcc1/libcp1plugin.cc
+@@ -20,6 +20,8 @@
+
+ #include <cc1plugin-config.h>
+
++#include <vector>
++
+ #undef PACKAGE_NAME
+ #undef PACKAGE_STRING
+ #undef PACKAGE_TARNAME
+@@ -71,8 +73,6 @@
+ #include "rpc.hh"
+ #include "context.hh"
+
+-#include <vector>
+-
+ using namespace cc1_plugin;
+
+ \f
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.0_p2.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.0_p2.ebuild
index 5a09bb4367bc..1a08ba3e0844 100644
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.0_p2.ebuild
+++ b/dev-util/mingw64-toolchain/mingw64-toolchain-11.0.0_p2.ebuild
@@ -58,6 +58,7 @@ QA_CONFIG_IMPL_DECL_SKIP=(
PATCHES=(
"${FILESDIR}"/gcc-12.2.0-drop-cflags-sed.patch
+ "${FILESDIR}"/gcc-13.2.0-libcxx-17.patch
)
pkg_pretend() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/, dev-util/mingw64-toolchain/files/
@ 2024-11-18 9:59 Ionen Wolkens
0 siblings, 0 replies; 8+ messages in thread
From: Ionen Wolkens @ 2024-11-18 9:59 UTC (permalink / raw
To: gentoo-commits
commit: 869d0dd6ceb9728b6792fe2ad6b46e62e6367a4f
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 18 09:28:29 2024 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Mon Nov 18 09:59:13 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=869d0dd6
dev-util/mingw64-toolchain: fix binutils build with c23 (gcc15)
Closes: https://bugs.gentoo.org/943715
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
.../files/binutils-2.42-c23.patch | 93 ++++++++++++++++++++++
.../mingw64-toolchain-12.0.0.ebuild | 1 +
2 files changed, 94 insertions(+)
diff --git a/dev-util/mingw64-toolchain/files/binutils-2.42-c23.patch b/dev-util/mingw64-toolchain/files/binutils-2.42-c23.patch
new file mode 100644
index 000000000000..f7e18615d6e0
--- /dev/null
+++ b/dev-util/mingw64-toolchain/files/binutils-2.42-c23.patch
@@ -0,0 +1,93 @@
+Needed with gcc15 due to newly defaulting to c23 (fixed in >=binutils-2.44).
+
+https://bugs.gentoo.org/943715
+https://sourceware.org/PR32372
+https://inbox.sourceware.org/binutils/cover.1731741209.git.sam@gentoo.org/
+(technically the full set of patches is not needed here, but doesn't hurt)
+--- a/binutils/bfd/elf32-ppc.c
++++ b/binutils/bfd/elf32-ppc.c
+@@ -4354,3 +4354,3 @@
+ if (!bfd_elf_link_record_dynamic_symbol (info, opt))
+- return false;
++ return NULL;
+ }
+--- a/binutils/bfd/elf32-xtensa.c
++++ b/binutils/bfd/elf32-xtensa.c
+@@ -10073,3 +10073,3 @@
+
+- removed = false;
++ removed = NULL;
+ if (is_operand_relocation (fix->src_type))
+@@ -10144,3 +10144,3 @@
+
+- removed = false;
++ removed = NULL;
+ if (is_operand_relocation (ELF32_R_TYPE (orig_rel->rela.r_info)))
+--- a/binutils/bfd/elf64-ppc.c
++++ b/binutils/bfd/elf64-ppc.c
+@@ -4666,3 +4666,3 @@
+ if (ent == NULL)
+- return false;
++ return NULL;
+ ent->next = local_got_ents[r_symndx];
+--- a/binutils/bfd/mach-o.c
++++ b/binutils/bfd/mach-o.c
+@@ -6039,3 +6039,3 @@
+ if (ncmd != 1 || uuid_cmd == NULL)
+- return false;
++ return NULL;
+ return &uuid_cmd->command.uuid;
+--- a/binutils/bfd/xsym.c
++++ b/binutils/bfd/xsym.c
+@@ -133,3 +133,3 @@
+ if (bfd_seek (abfd, table_offset, SEEK_SET) != 0)
+- return false;
++ return NULL;
+ return _bfd_alloc_and_read (abfd, table_size, table_size);
+--- a/binutils/binutils/prdbg.c
++++ b/binutils/binutils/prdbg.c
+@@ -2820,3 +2820,3 @@
+ abort ();
+- return false;
++ return NULL;
+ }
+--- a/binutils/ld/pdb.c
++++ b/binutils/ld/pdb.c
+@@ -177,3 +177,3 @@
+ bfd_close (stream);
+- return false;
++ return NULL;
+ }
+--- a/binutils/opcodes/i386-gen.c
++++ b/binutils/opcodes/i386-gen.c
+@@ -32,3 +32,5 @@
+ in preference where possible. */
++#ifndef static_assert
+ #define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
++#endif
+
+--- a/binutils/opcodes/mips-formats.h
++++ b/binutils/opcodes/mips-formats.h
+@@ -51,3 +51,3 @@
+ typedef char ATTRIBUTE_UNUSED \
+- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
++ static_assert_3[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static const struct mips_mapped_int_operand op = { \
+@@ -85,3 +85,3 @@
+ typedef char ATTRIBUTE_UNUSED \
+- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
++ static_assert_4[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static const struct mips_reg_operand op = { \
+@@ -95,3 +95,3 @@
+ typedef char ATTRIBUTE_UNUSED \
+- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
++ static_assert_5[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
+ static const struct mips_reg_operand op = { \
+--- a/binutils/opcodes/s390-opc.c
++++ b/binutils/opcodes/s390-opc.c
+@@ -38,3 +38,5 @@
+ in preference where possible. */
++#ifndef static_assert
+ #define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
++#endif
+
diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-12.0.0.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-12.0.0.ebuild
index ee5e4abfb62e..1a927aed674b 100644
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-12.0.0.ebuild
+++ b/dev-util/mingw64-toolchain/mingw64-toolchain-12.0.0.ebuild
@@ -69,6 +69,7 @@ QA_CONFIG_IMPL_DECL_SKIP=(
PATCHES=(
"${FILESDIR}"/gcc-12.2.0-drop-cflags-sed.patch
"${FILESDIR}"/gcc-14.1.0-no-omit-fp-ice.patch
+ "${FILESDIR}"/binutils-2.42-c23.patch
)
pkg_pretend() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-11-18 9:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-27 8:38 [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/, dev-util/mingw64-toolchain/files/ Ionen Wolkens
-- strict thread matches above, loose matches on Subject: below --
2024-11-18 9:59 Ionen Wolkens
2023-09-23 18:30 Ionen Wolkens
2023-09-12 16:15 Ionen Wolkens
2023-04-19 4:10 Ionen Wolkens
2022-09-27 8:38 Ionen Wolkens
2022-06-29 17:22 Ionen Wolkens
2022-05-13 7:20 Ionen Wolkens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox