public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/
Date: Thu, 11 May 2023 17:01:25 +0000 (UTC)	[thread overview]
Message-ID: <1683824410.7d7cbaccd18980dd47f652ce80a745d289b0c352.ionen@gentoo> (raw)

commit:     7d7cbaccd18980dd47f652ce80a745d289b0c352
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Thu May 11 16:54:46 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Thu May 11 17:00:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d7cbacc

dev-util/mingw64-toolchain: drop 10.0.0_p4

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../mingw64-toolchain-10.0.0_p4.ebuild             | 321 ---------------------
 1 file changed, 321 deletions(-)

diff --git a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p4.ebuild b/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p4.ebuild
deleted file mode 100644
index daed2fea783e..000000000000
--- a/dev-util/mingw64-toolchain/mingw64-toolchain-10.0.0_p4.ebuild
+++ /dev/null
@@ -1,321 +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}"/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
-}


             reply	other threads:[~2023-05-11 17:01 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 17:01 Ionen Wolkens [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-09-03 12:31 [gentoo-commits] repo/gentoo:master commit in: dev-util/mingw64-toolchain/ Ionen Wolkens
2024-07-02 21:09 Jakov Smolić
2024-07-02 21:09 Jakov Smolić
2024-06-06 13:20 Ionen Wolkens
2024-06-02  3:54 Ionen Wolkens
2024-05-30  6:39 Ionen Wolkens
2024-05-22  3:32 Ionen Wolkens
2024-05-21  3:01 Ionen Wolkens
2024-05-10 10:12 Ionen Wolkens
2024-05-10  3:03 Ionen Wolkens
2024-05-07 17:49 Ionen Wolkens
2024-05-07 14:28 Ionen Wolkens
2024-05-07 14:28 Ionen Wolkens
2024-03-24 18:39 Ionen Wolkens
2024-02-22 14:27 Ionen Wolkens
2024-01-16 17:52 Ionen Wolkens
2023-12-22 17:38 Ionen Wolkens
2023-08-27 17:18 Sam James
2023-08-27  1:28 Sam James
2023-08-04  3:25 Ionen Wolkens
2023-08-04  3:25 Ionen Wolkens
2023-07-30 16:52 Ionen Wolkens
2023-07-28  5:16 Ionen Wolkens
2023-07-03 20:55 Ionen Wolkens
2023-06-26 10:12 Ionen Wolkens
2023-05-29 17:49 Arthur Zamarin
2023-05-29 15:06 Sam James
2023-05-19  1:41 Ionen Wolkens
2023-04-29  9:43 Ionen Wolkens
2023-04-26  8:37 Ionen Wolkens
2023-04-26  8:37 Ionen Wolkens
2023-02-01 21:04 Ionen Wolkens
2023-01-15  7:00 Ionen Wolkens
2022-11-12 11:33 Ionen Wolkens
2022-10-31  0:54 Ionen Wolkens
2022-10-23  7:20 Ionen Wolkens
2022-09-16 16:17 Ionen Wolkens
2022-09-16  7:54 Ionen Wolkens
2022-09-16  7:47 Ionen Wolkens
2022-09-14 23:11 Ionen Wolkens
2022-09-14 21:12 Ionen Wolkens
2022-09-14 19:39 Ionen Wolkens
2022-08-29  6:55 Ionen Wolkens
2022-08-29  6:55 Ionen Wolkens
2022-08-20 13:58 Ionen Wolkens
2022-08-20 13:45 Ionen Wolkens
2022-08-20 13:45 Ionen Wolkens
2022-07-16 17:03 Ionen Wolkens
2022-06-28  5:56 Ionen Wolkens
2022-05-28 19:26 Ionen Wolkens
2022-05-17  6:53 Jakov Smolić
2022-05-17  6:53 Jakov Smolić
2022-05-13  6:53 Ionen Wolkens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1683824410.7d7cbaccd18980dd47f652ce80a745d289b0c352.ionen@gentoo \
    --to=ionen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox