1 |
commit: 1da0f835568fceb6783247e174ea9dcb32bceac1 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 5 22:41:32 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 5 22:43:30 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1da0f835 |
7 |
|
8 |
dev-util/mingw64-runtime: filter LDFLAGS for hash style |
9 |
|
10 |
Normally mingw-64 does not use dynamic linker. |
11 |
One exception is at ./configure time where $LDFLAGS |
12 |
is used by default. |
13 |
|
14 |
When LDFFLAGS=-Wl,--hash-style=gnu is passed (default |
15 |
on linux) to mingw64-runtime a few things are not |
16 |
auto-detected. One of them is __CTORS_LIST__ / __DTORS_LIST__ |
17 |
support by binutils' target ld. |
18 |
|
19 |
If constructors are not provided then binaries start |
20 |
crashing at shutdown. |
21 |
|
22 |
The workaround is to filter out -Wl,--hash-style=* options. |
23 |
|
24 |
Longer-term fix will be to install mingw64-runtime into |
25 |
target: bug #642604. That wa LDFLAGS from CBUILD will not |
26 |
leak into libc packages. |
27 |
|
28 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
29 |
Package-Manager: Portage-2.3.50, Repoman-2.3.11 |
30 |
|
31 |
...64-runtime-6.0.0.ebuild => mingw64-runtime-6.0.0-r1.ebuild} | 10 ++++++++-- |
32 |
1 file changed, 8 insertions(+), 2 deletions(-) |
33 |
|
34 |
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 |
35 |
similarity index 88% |
36 |
rename from dev-util/mingw64-runtime/mingw64-runtime-6.0.0.ebuild |
37 |
rename to dev-util/mingw64-runtime/mingw64-runtime-6.0.0-r1.ebuild |
38 |
index 47cd6c8a3d1..d4bbd310bff 100644 |
39 |
--- a/dev-util/mingw64-runtime/mingw64-runtime-6.0.0.ebuild |
40 |
+++ b/dev-util/mingw64-runtime/mingw64-runtime-6.0.0-r1.ebuild |
41 |
@@ -1,4 +1,4 @@ |
42 |
-# Copyright 1999-2018 Gentoo Foundation |
43 |
+# Copyright 1999-2018 Gentoo Authors |
44 |
# Distributed under the terms of the GNU General Public License v2 |
45 |
|
46 |
EAPI=6 |
47 |
@@ -19,7 +19,7 @@ SRC_URI="mirror://sourceforge/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v$ |
48 |
|
49 |
LICENSE="BSD" |
50 |
SLOT="0" |
51 |
-KEYWORDS="" |
52 |
+KEYWORDS="~amd64 ~x86" |
53 |
IUSE="headers-only idl libraries tools" |
54 |
RESTRICT="strip" |
55 |
|
56 |
@@ -52,6 +52,12 @@ pkg_setup() { |
57 |
|
58 |
src_configure() { |
59 |
CHOST=${CTARGET} strip-unsupported-flags |
60 |
+ # Normally mingw-64 does not use dynamic linker. |
61 |
+ # But at configure time it uses $LDFLAGS. |
62 |
+ # When default -Wl,--hash-style=gnu is passed |
63 |
+ # __CTORS_LIST__ / __DTORS_LIST__ is mis-detected |
64 |
+ # for target ld and binaries crash at shutdown. |
65 |
+ filter-ldflags '-Wl,--hash-style=*' |
66 |
|
67 |
if ! just_headers; then |
68 |
mkdir "${WORKDIR}/headers" |