summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-10-05 23:41:32 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-10-05 23:43:30 +0100
commit1da0f835568fceb6783247e174ea9dcb32bceac1 (patch)
tree9bc68f6957e902972e09cbdede119426fa2346da /dev-util
parentkde-apps/kblog: Fix build with kde-frameworks/syndication (diff)
downloadgentoo-1da0f835568fceb6783247e174ea9dcb32bceac1.tar.gz
gentoo-1da0f835568fceb6783247e174ea9dcb32bceac1.tar.bz2
gentoo-1da0f835568fceb6783247e174ea9dcb32bceac1.zip
dev-util/mingw64-runtime: filter LDFLAGS for hash style
Normally mingw-64 does not use dynamic linker. One exception is at ./configure time where $LDFLAGS is used by default. When LDFFLAGS=-Wl,--hash-style=gnu is passed (default on linux) to mingw64-runtime a few things are not auto-detected. One of them is __CTORS_LIST__ / __DTORS_LIST__ support by binutils' target ld. If constructors are not provided then binaries start crashing at shutdown. The workaround is to filter out -Wl,--hash-style=* options. Longer-term fix will be to install mingw64-runtime into target: bug #642604. That wa LDFLAGS from CBUILD will not leak into libc packages. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Package-Manager: Portage-2.3.50, Repoman-2.3.11
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/mingw64-runtime/mingw64-runtime-6.0.0-r1.ebuild (renamed from dev-util/mingw64-runtime/mingw64-runtime-6.0.0.ebuild)10
1 files changed, 8 insertions, 2 deletions
diff --git a/dev-util/mingw64-runtime/mingw64-runtime-6.0.0.ebuild b/dev-util/mingw64-runtime/mingw64-runtime-6.0.0-r1.ebuild
index 47cd6c8a3d10..d4bbd310bffe 100644
--- a/dev-util/mingw64-runtime/mingw64-runtime-6.0.0.ebuild
+++ b/dev-util/mingw64-runtime/mingw64-runtime-6.0.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -19,7 +19,7 @@ SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v$
LICENSE="BSD"
SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64 ~x86"
IUSE="headers-only idl libraries tools"
RESTRICT="strip"
@@ -52,6 +52,12 @@ pkg_setup() {
src_configure() {
CHOST=${CTARGET} strip-unsupported-flags
+ # Normally mingw-64 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=*'
if ! just_headers; then
mkdir "${WORKDIR}/headers"