From e169149b84bc9ff33d3286d60dfab754d2e0e4be Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 29 Apr 2023 17:15:23 +0100 Subject: gentoo auto-resync : 29:04:2023 - 17:15:23 --- dev-util/mingw64-runtime/Manifest | 8 +- .../files/mingw64-runtime-8.0.0-__rdtsc.patch | 25 ---- .../files/mingw64-runtime-8.0.0-udivmod.patch | 26 ---- .../mingw64-runtime/mingw64-runtime-11.0.0.ebuild | 141 ++++++++++++++++++++ .../mingw64-runtime-8.0.0-r3.ebuild | 146 --------------------- .../mingw64-runtime-9.0.0-r2.ebuild | 144 -------------------- 6 files changed, 143 insertions(+), 347 deletions(-) delete mode 100644 dev-util/mingw64-runtime/files/mingw64-runtime-8.0.0-__rdtsc.patch delete mode 100644 dev-util/mingw64-runtime/files/mingw64-runtime-8.0.0-udivmod.patch create mode 100644 dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild delete mode 100644 dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild delete mode 100644 dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild (limited to 'dev-util/mingw64-runtime') diff --git a/dev-util/mingw64-runtime/Manifest b/dev-util/mingw64-runtime/Manifest index af277aa28e7c..50dbdcbee6cc 100644 --- a/dev-util/mingw64-runtime/Manifest +++ b/dev-util/mingw64-runtime/Manifest @@ -1,11 +1,7 @@ AUX mingw64-runtime-10.0.0-msvcr-extra-race.patch 1971 BLAKE2B 1c8d6371cfb7f5ebdaadc1f04ee4497b494108ead0daa3ed05c1f533d9e52d551bc94bbde7050885a723fa2423b86cb6eedc7df1584ca01834b61f17c177165e SHA512 3763b103f3d7927dbc84c9cb1a3836cb4af943dfc6a335ef904c8f66da06486751fe29465cdbcecc2bf0d7312f623d3fb5ac91e8dcfe1b20cb6657cadd2b6fad AUX mingw64-runtime-7.0.0-fortify-only-ssp.patch 637 BLAKE2B 3a8eff14b3150446da51354324a3b29e327982fd586339e5f8df4309de2bbdb2722773e0d145d87363183ff70fd02fcdcbc46c560bef9a5111dc33ee8105bede SHA512 991d4294d81a05bfa86d2bed102b3f5bf58435ef02b0a38abe905cc4a0416896b01ffc3a2fe64e78d44e78c9c65051428426b7d19561bd337a229bf7281c7040 -AUX mingw64-runtime-8.0.0-__rdtsc.patch 773 BLAKE2B 8ec970049ee9d1003caed099a6eb0301f066cd3f0986895f08b2912b14248d3c41c87558a1df40b7f452e73d382da73215942827f4e5e551df65d779eda23eef SHA512 df986f2b24ea1e4db7babad2a837a55a59e1abd20f41ef03f438907477829561238a69fa8e8891ede1a45eef6dca36deb82c6be61293ce0f39e7f94f82483cad -AUX mingw64-runtime-8.0.0-udivmod.patch 865 BLAKE2B 848b45fb68c775baa5b285293df0a986a11f98e1768f4a55e7c22bd870f1df12d60fd03c378d1fe24e5049886a48527aee894e1f0d58555cc686a807815a3a7b SHA512 0d5c27e8b30efd8b0e938f66f0fd8ddc2a279c79a1ae99d776fc2b1595f97489083f8cc2caa6c3d78ed7a0394e707efe6e6792fec768e90dc170ac6c9fc84146 DIST mingw-w64-v10.0.0.tar.bz2 9620291 BLAKE2B 451372403289c492ca939d65bb4d9f6e9fa6bdd6b32d79d6438d858e106e8cc291712ada1f3f7b951a4c6908e7d0385d485ca76920af39bcf86effa48408e330 SHA512 3c0827af7c40809a867758f6cd9ef3ff0c988b43082345bf725e03949af95968d634ace99a7ffae323189549221dcb5d861de9e801f1fbc7904e446641b60516 -DIST mingw-w64-v8.0.0.tar.bz2 9370799 BLAKE2B ec65191722f6f2ddbb93488ea4c4c21e22fb5ef777ef293d65d13de1057d96c9105a4a4936999d4babbd8fdfc52ed14675f1c5fbc630524df28805e0f66b1a2b SHA512 cefcc86ac3e6337c88ed224ab4692abbd5eb543ce78fb6c5462198a85f36c9274a0a1df0a0bebd182137fd527c15831f9237c782711a85f32e77d9104b28359e -DIST mingw-w64-v9.0.0.tar.bz2 9537758 BLAKE2B 298b97f50c7632972aee2c75e90de0776f64c1dd5aaeb52d4e4be10a8e0365efee82c93179990cc090cc7b9f83525a7abf51a5d069b7a3e39abb37fdb733a70c SHA512 6691331a2ab521d22c1d32bebe0ed049bd62a7a7722cff38e7792b4e42c6b8df4356084afff6c916b487b3ebddc4372b398ab7cd0c7f4ff6991a70fe64177386 +DIST mingw-w64-v11.0.0.tar.bz2 10058657 BLAKE2B 3f7637bcc7c3f25b2141d35105ea086eab74e228d7275725ffb4f07e283fd75169dbe0900a9c29494fba9ddb2ea03bdd6ae26f06048311e9c93ae3e317c4c060 SHA512 bc1c9fd9d8593ead9375fcbe40950f06cf7616b94dc676db2793ac9b496fe3a6cc94b5793effda3b752942be0d7d01a1c37a8f221aaf178df0d4eeb0aa6d1f8d EBUILD mingw64-runtime-10.0.0-r1.ebuild 4156 BLAKE2B 463e887c1c14c93222997399af7764e65c0fdd723d0f7893ca960d42cebd214805206ba3e255d8f4be586e0fb302025e65c28b4341073c4ce1ebf6212fe30fc3 SHA512 e5463dd1ff2312bcdcb120c5719a70d1ac01d5374f5f10d81a99142a96ad9f3419e5072cbc29efc6ef3f97eb470ae0ed8a43448a6c2723b1dee59ca6ba4904eb -EBUILD mingw64-runtime-8.0.0-r3.ebuild 4118 BLAKE2B 567d0363b56bf4c981b06533ccd91542748e958784fea43882a7f91b74f0ba470c8eb60e1f392ff9749603d38981e64e0875cdcc9f74c2db31c431f8ea1cf159 SHA512 f395b256b5366cead108cce7eb3bf8b0106f74263f4f461e2bbb0122fe89b47f82362323df908797706ae5fdd5b9c315dea5daf92141d2215b41929b4d1d05f2 -EBUILD mingw64-runtime-9.0.0-r2.ebuild 4050 BLAKE2B 6d053ffe4e6adb1e4acb599ecc46daa91ca300ef758ee093307638115ee1ddbca35e812a3fa1702fbe9fa8fd6244420d9fe0ff200885682f933c6c6a12c59ad5 SHA512 287ea98d74134ebb97cdded333588aa9487cd4bf11b7d4dbaa116811bd83c28d359ca8ef6d7f189d281be6a96c3fe9a6ddf307a728465e4743e1a68ff28eaae4 +EBUILD mingw64-runtime-11.0.0.ebuild 4281 BLAKE2B 7ace99fb8541dc5310f30cff1aa7604330de4285252c91b96b8773cb50eb537dde2a892029e1b2f7576ac906a3965aedf7e197d6d0795b8926f71da36be0b8dc SHA512 54acd494289fbc5bc16f83ec9b1ad47f4e41189cfb9f2bfbb91587f33a0f894822a1c784d5afba7fa3a925f184b5a50a6e691b2e36475cfbfff9b7a6a522d210 MISC metadata.xml 904 BLAKE2B b7b42242ff7a39ba87ec4889295bb1229122bd20f34c163499423d989120569d5b6c69ed9490f328aa1af8a9dd3ff2ec0f07b85910e7d2eb401f40dbd670d366 SHA512 80bb5c58cf80d7233599e772a1e615ec4b4f16bd9387539a684d11e0b7196e7a3d21f1b56d18271b9a4b0544253e3fec4130ff70702ba4cf5684941ff8d49a51 diff --git a/dev-util/mingw64-runtime/files/mingw64-runtime-8.0.0-__rdtsc.patch b/dev-util/mingw64-runtime/files/mingw64-runtime-8.0.0-__rdtsc.patch deleted file mode 100644 index df06f041c8c2..000000000000 --- a/dev-util/mingw64-runtime/files/mingw64-runtime-8.0.0-__rdtsc.patch +++ /dev/null @@ -1,25 +0,0 @@ -https://bugs.gentoo.org/786549 - -gcc-11 defines __rdtsc as a macro: - // include/ia32intrin.h:110 - #define __rdtsc() __builtin_ia32_rdtsc () -and causes build failure: - intrincs/rdtsc.c:15:30: error: macro "__rdtsc" passed 1 arguments, but takes just 0 - 15 | unsigned __int64 __rdtsc(void) - | ^ - -Let's avoid __rdtsc definition on systems with #define __rdtsc present. - -There is still a chance that it might be a '#define __rdtsc __rdtsc'. -We'll revisit it then. ---- a/mingw-w64-crt/intrincs/rdtsc.c -+++ b/mingw-w64-crt/intrincs/rdtsc.c -@@ -11,7 +11,7 @@ - #define __has_builtin(x) 0 - #endif - --#if !__has_builtin(__rdtsc) -+#if !__has_builtin(__rdtsc) && !defined(__rdtsc) - unsigned __int64 __rdtsc(void) - { - #ifdef _WIN64 diff --git a/dev-util/mingw64-runtime/files/mingw64-runtime-8.0.0-udivmod.patch b/dev-util/mingw64-runtime/files/mingw64-runtime-8.0.0-udivmod.patch deleted file mode 100644 index dcbe99878f05..000000000000 --- a/dev-util/mingw64-runtime/files/mingw64-runtime-8.0.0-udivmod.patch +++ /dev/null @@ -1,26 +0,0 @@ -https://bugs.gentoo.org/787662 -https://sourceforge.net/p/mingw-w64/mingw-w64/ci/ab0fa5ad3c67d634fd7754d9473d1bb7051f9bf0/tree/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c?diff=6a0e9165008f731bccadfc41a59719cf7c8efc02 ---- a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -+++ b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -@@ -121,6 +121,7 @@ - u_quad_t __umoddi3(u_quad_t a, u_quad_t b); - int __ucmpdi2(u_quad_t a, u_quad_t b); - quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem); -+u_quad_t __udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *rem); - - #endif /* !_LIBKERN_QUAD_H_ */ - -@@ -573,6 +574,12 @@ - return (negq ? -uq : uq); - } - -+u_quad_t -+__udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *rem) -+{ -+ return __qdivrem(a, b, rem); -+} -+ - #else - static int __attribute__((unused)) dummy; - #endif /*deined (_X86_) && !defined (__x86_64__)*/ - diff --git a/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild new file mode 100644 index 000000000000..e9b21a93f78c --- /dev/null +++ b/dev-util/mingw64-runtime/mingw64-runtime-11.0.0.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Free Win64 runtime and import library definitions" +HOMEPAGE="https://www.mingw-w64.org/" +SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2" +S="${WORKDIR}/mingw-w64-v${PV}" + +LICENSE="ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain tools? ( GPL-3+ )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +# default-ucrt: enabling requires to be done during the bootstrap process +# or else will cause e.g. undefined reference to __intrinsic_setjmpex +# libraries: needs working stage2 compiler (bug #665512) +IUSE="default-ucrt headers-only idl libraries tools" +RESTRICT="strip" # portage would use the wrong strip executable + +pkg_setup() { + : "${CBUILD:=${CHOST}}" + : "${CTARGET:=${CHOST}}" + [[ ${CTARGET} == ${CHOST} && ${CATEGORY} == cross-* ]] && + CTARGET=${CATEGORY#cross-} + + [[ ${CHOST} != ${CTARGET} ]] && MW_CROSS=true || MW_CROSS=false + + [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] && + die "Invalid configuration, please see: https://wiki.gentoo.org/wiki/Mingw" +} + +mingw-foreach_tool() { + use !tools || use headers-only && return + + local tool=widl + if use !amd64 && use !x86 && use !arm64 && use !arm; then + einfo "Skipping widl due to unsupported platform" #853250 + tool= + fi + + for tool in gendef genidl ${tool}; do + # not using top-level --with-tools given it skips widl + pushd mingw-w64-tools/${tool} >/dev/null || die + "${@}" + popd >/dev/null || die + done +} + +src_configure() { + # native tools, see #644556 + local toolsconf=() + # normally only widl is prefixed, but avoids clash with other targets + ${MW_CROSS} && toolsconf+=( --program-prefix=${CTARGET}- ) + + mingw-foreach_tool econf "${toolsconf[@]}" + + MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it + + # likely cross-compiling from here, update toolchain variables + if ${MW_CROSS} && [[ ! -v MINGW_BYPASS ]]; then + unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP + filter-flags '-fuse-ld=*' + filter-flags '-mfunction-return=thunk*' #878849 + fi + local CHOST=${CTARGET} + strip-unsupported-flags + + # Normally mingw64 does not use dynamic linker, but at configure time it + # uses LDFLAGS. When -Wl,--hash-style=gnu is passed __CTORS_LIST__ / + # __DTORS_LIST__ is misdetected for target and binaries crash at shutdown. + # Note: typically also stripped by strip-unsupported-flags, but not during + # USE=headers-only and potentially other configurations (kept as safety). + filter-ldflags '-Wl,--hash-style=*' + + local prefix=${EPREFIX}/usr + ${MW_CROSS} && prefix+=/${CTARGET}/usr + + local conf=( + --prefix="${prefix}" + --libdir="${prefix}"/lib + $(use_with !headers-only crt) + $(usev default-ucrt --with-default-msvcrt=ucrt) + + # By default configure tries to set --sysroot=${prefix}. We disable + # this behaviour with --with-sysroot=no to use gcc's sysroot default. + # That way we can cross-build mingw64-runtime with cross-emerge. + --with-sysroot=no + ) + + if use !headers-only; then + conf+=( + $(use_enable idl) + $(use_with libraries) + ) + + # prefer tuple to determine if should do 32 or 64bits, but fall + # back to cpp test if missing (bug #584858, see also #840662) + local b32=true + case ${CHOST} in + x86_64-*) b32=false;; + i*86-*) ;; + *) [[ $($(tc-getCPP) -dM - <<<'') =~ __MINGW64__ ]] && b32=false;; + esac + ${b32} && + conf+=( --enable-lib32 --disable-lib64 ) || + conf+=( --disable-lib32 --enable-lib64 ) + + # prepare temporary headers install to build against same-version + mkdir ../headers || die + pushd ../headers >/dev/null || die + ECONF_SOURCE=${S} econf --prefix="${T}"/root --without-crt + popd >/dev/null || die + + append-cppflags "-I${T}/root/include" + fi + + econf "${conf[@]}" +} + +src_compile() { + use headers-only || emake -C ../headers install + emake + mingw-foreach_tool emake LDFLAGS="${MW_LDFLAGS}" +} + +src_install() { + default + + mingw-foreach_tool emake DESTDIR="${D}" install + + if ${MW_CROSS}; then + # gcc is configured to look at specific hard-coded paths for mingw #419601 + dosym usr /usr/${CTARGET}/mingw + dosym usr /usr/${CTARGET}/${CTARGET} + dosym usr/include /usr/${CTARGET}/sys-include + fi + + rm -r "${ED}"/usr/share || die +} diff --git a/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild deleted file mode 100644 index caa50883a838..000000000000 --- a/dev-util/mingw64-runtime/mingw64-runtime-8.0.0-r3.ebuild +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic toolchain-funcs - -DESCRIPTION="Free Win64 runtime and import library definitions" -HOMEPAGE="https://www.mingw-w64.org/" -SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2" -S="${WORKDIR}/mingw-w64-v${PV}" - -LICENSE="ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain tools? ( GPL-3+ )" -SLOT="0" -KEYWORDS="~amd64 ~x86" -# USE=libraries needs working stage2 compiler: bug #665512 -IUSE="headers-only idl libraries tools" -RESTRICT="strip" - -PATCHES=( - "${FILESDIR}"/${PN}-7.0.0-fortify-only-ssp.patch - "${FILESDIR}"/${P}-__rdtsc.patch - "${FILESDIR}"/${P}-udivmod.patch -) - -pkg_setup() { - : ${CBUILD:=${CHOST}} - : ${CTARGET:=${CHOST}} - [[ ${CTARGET} == ${CHOST} && ${CATEGORY} == cross-* ]] && - CTARGET=${CATEGORY#cross-} - - [[ ${CHOST} != ${CTARGET} ]] && MW_CROSS=true || MW_CROSS=false - - [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] && - die "Invalid configuration, please see: https://wiki.gentoo.org/wiki/Mingw" -} - -mingw-foreach_tool() { - use !tools || use headers-only && return - - local tool=widl - if use !amd64 && use !x86 && use !arm64 && use !arm; then - einfo "Skipping widl due to unsupported platform" #853250 - tool= - fi - - for tool in gendef genidl ${tool}; do - # not using top-level --with-tools given it skips widl - pushd mingw-w64-tools/${tool} >/dev/null || die - "${@}" - popd >/dev/null || die - done -} - -src_configure() { - # native tools, see #644556 - local toolsconf=() - # normally only widl is prefixed, but avoids clash with other targets - ${MW_CROSS} && toolsconf+=( --program-prefix=${CTARGET}- ) - - mingw-foreach_tool econf "${toolsconf[@]}" - - MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it - - # likely cross-compiling from here, update toolchain variables - if ${MW_CROSS} && [[ ! -v MINGW_BYPASS ]]; then - unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP - filter-flags '-fstack-clash-protection' #758914 - filter-flags '-fstack-protector*' #870136 - filter-flags '-fuse-ld=*' - filter-flags '-mfunction-return=thunk*' #878849 - fi - local CHOST=${CTARGET} - strip-unsupported-flags - - # Normally mingw64 does not use dynamic linker. - # But at configure time it uses $LDFLAGS. - # When default -Wl,--hash-style=gnu is passed - # __CTORS_LIST__ / __DTORS_LIST__ is mis-detected - # for target ld and binaries crash at shutdown. - filter-ldflags '-Wl,--hash-style=*' - - local prefix=${EPREFIX}/usr - ${MW_CROSS} && prefix+=/${CTARGET}/usr - - local conf=( - --prefix="${prefix}" - --libdir="${prefix}"/lib - $(use_with !headers-only crt) - - # By default configure tries to set --sysroot=${prefix}. We disable - # this behaviour with --with-sysroot=no to use gcc's sysroot default. - # That way we can cross-build mingw64-runtime with cross-emerge. - --with-sysroot=no - ) - - if use !headers-only; then - conf+=( - $(use_enable idl) - $(use_with libraries) - ) - - # prefer tuple to determine if should do 32 or 64bits, but fall - # back to cpp test if missing (bug #584858, see also #840662) - local b32=true - case ${CHOST} in - x86_64-*) b32=false;; - i*86-*) ;; - *) [[ $($(tc-getCPP) -dM - <<<'') =~ __MINGW64__ ]] && b32=false;; - esac - ${b32} && - conf+=( --enable-lib32 --disable-lib64 ) || - conf+=( --disable-lib32 --enable-lib64 ) - - # prepare temporary headers install to build against same-version - mkdir ../headers || die - pushd ../headers >/dev/null || die - ECONF_SOURCE=${S} econf --prefix="${T}"/root --without-crt - popd >/dev/null || die - - append-cppflags "-I${T}/root/include" - fi - - econf "${conf[@]}" -} - -src_compile() { - use headers-only || emake -C ../headers install - emake - mingw-foreach_tool emake LDFLAGS="${MW_LDFLAGS}" -} - -src_install() { - default - - mingw-foreach_tool emake DESTDIR="${D}" install - - if ${MW_CROSS}; then - # gcc is configured to look at specific hard-coded paths for mingw #419601 - dosym usr /usr/${CTARGET}/mingw - dosym usr /usr/${CTARGET}/${CTARGET} - dosym usr/include /usr/${CTARGET}/sys-include - fi - - rm -r "${ED}"/usr/share || die -} diff --git a/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild deleted file mode 100644 index 7f9b3697a13d..000000000000 --- a/dev-util/mingw64-runtime/mingw64-runtime-9.0.0-r2.ebuild +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit flag-o-matic toolchain-funcs - -DESCRIPTION="Free Win64 runtime and import library definitions" -HOMEPAGE="https://www.mingw-w64.org/" -SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2" -S="${WORKDIR}/mingw-w64-v${PV}" - -LICENSE="ZPL BSD BSD-2 ISC LGPL-2+ LGPL-2.1+ MIT public-domain tools? ( GPL-3+ )" -SLOT="0" -KEYWORDS="~amd64 ~x86" -# USE=libraries needs working stage2 compiler: bug #665512 -IUSE="headers-only idl libraries tools" -RESTRICT="strip" - -PATCHES=( - "${FILESDIR}"/${PN}-7.0.0-fortify-only-ssp.patch -) - -pkg_setup() { - : ${CBUILD:=${CHOST}} - : ${CTARGET:=${CHOST}} - [[ ${CTARGET} == ${CHOST} && ${CATEGORY} == cross-* ]] && - CTARGET=${CATEGORY#cross-} - - [[ ${CHOST} != ${CTARGET} ]] && MW_CROSS=true || MW_CROSS=false - - [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] && - die "Invalid configuration, please see: https://wiki.gentoo.org/wiki/Mingw" -} - -mingw-foreach_tool() { - use !tools || use headers-only && return - - local tool=widl - if use !amd64 && use !x86 && use !arm64 && use !arm; then - einfo "Skipping widl due to unsupported platform" #853250 - tool= - fi - - for tool in gendef genidl ${tool}; do - # not using top-level --with-tools given it skips widl - pushd mingw-w64-tools/${tool} >/dev/null || die - "${@}" - popd >/dev/null || die - done -} - -src_configure() { - # native tools, see #644556 - local toolsconf=() - # normally only widl is prefixed, but avoids clash with other targets - ${MW_CROSS} && toolsconf+=( --program-prefix=${CTARGET}- ) - - mingw-foreach_tool econf "${toolsconf[@]}" - - MW_LDFLAGS=${LDFLAGS} # keep non-stripped for gendef not respecting it - - # likely cross-compiling from here, update toolchain variables - if ${MW_CROSS} && [[ ! -v MINGW_BYPASS ]]; then - unset AR AS CC CPP CXX LD NM OBJCOPY OBJDUMP RANLIB RC STRIP - filter-flags '-fstack-clash-protection' #758914 - filter-flags '-fstack-protector*' #870136 - filter-flags '-fuse-ld=*' - filter-flags '-mfunction-return=thunk*' #878849 - fi - local CHOST=${CTARGET} - strip-unsupported-flags - - # Normally mingw64 does not use dynamic linker. - # But at configure time it uses $LDFLAGS. - # When default -Wl,--hash-style=gnu is passed - # __CTORS_LIST__ / __DTORS_LIST__ is mis-detected - # for target ld and binaries crash at shutdown. - filter-ldflags '-Wl,--hash-style=*' - - local prefix=${EPREFIX}/usr - ${MW_CROSS} && prefix+=/${CTARGET}/usr - - local conf=( - --prefix="${prefix}" - --libdir="${prefix}"/lib - $(use_with !headers-only crt) - - # By default configure tries to set --sysroot=${prefix}. We disable - # this behaviour with --with-sysroot=no to use gcc's sysroot default. - # That way we can cross-build mingw64-runtime with cross-emerge. - --with-sysroot=no - ) - - if use !headers-only; then - conf+=( - $(use_enable idl) - $(use_with libraries) - ) - - # prefer tuple to determine if should do 32 or 64bits, but fall - # back to cpp test if missing (bug #584858, see also #840662) - local b32=true - case ${CHOST} in - x86_64-*) b32=false;; - i*86-*) ;; - *) [[ $($(tc-getCPP) -dM - <<<'') =~ __MINGW64__ ]] && b32=false;; - esac - ${b32} && - conf+=( --enable-lib32 --disable-lib64 ) || - conf+=( --disable-lib32 --enable-lib64 ) - - # prepare temporary headers install to build against same-version - mkdir ../headers || die - pushd ../headers >/dev/null || die - ECONF_SOURCE=${S} econf --prefix="${T}"/root --without-crt - popd >/dev/null || die - - append-cppflags "-I${T}/root/include" - fi - - econf "${conf[@]}" -} - -src_compile() { - use headers-only || emake -C ../headers install - emake - mingw-foreach_tool emake LDFLAGS="${MW_LDFLAGS}" -} - -src_install() { - default - - mingw-foreach_tool emake DESTDIR="${D}" install - - if ${MW_CROSS}; then - # gcc is configured to look at specific hard-coded paths for mingw #419601 - dosym usr /usr/${CTARGET}/mingw - dosym usr /usr/${CTARGET}/${CTARGET} - dosym usr/include /usr/${CTARGET}/sys-include - fi - - rm -r "${ED}"/usr/share || die -} -- cgit v1.2.3