1 |
commit: 075774ab73e00b549b9e166f2fd76e141503c55a |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 18 02:43:45 2022 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 20 20:01:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=075774ab |
7 |
|
8 |
app-emulation/wine-staging: improve cross *FLAGS handling |
9 |
|
10 |
Given wine will switch compiler, need to ensure unsupported flags were |
11 |
stripped so that e.g. clang-specific flags won't cause a build failure. |
12 |
|
13 |
strip-unsupported-flags doesn't act on CROSSCFLAGS, so use test-* |
14 |
directly. Using := assignment so that users can override. |
15 |
|
16 |
Additionally allowing LDFLAGS, there's not much to gain from it |
17 |
but as long as unsupported is stripped it should cause no issues. |
18 |
|
19 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
20 |
|
21 |
app-emulation/wine-staging/wine-staging-7.5-r1.ebuild | 6 +++++- |
22 |
app-emulation/wine-staging/wine-staging-7.6-r1.ebuild | 6 +++++- |
23 |
app-emulation/wine-staging/wine-staging-7.7.ebuild | 6 +++++- |
24 |
app-emulation/wine-staging/wine-staging-7.8.ebuild | 6 +++++- |
25 |
app-emulation/wine-staging/wine-staging-9999.ebuild | 6 +++++- |
26 |
5 files changed, 25 insertions(+), 5 deletions(-) |
27 |
|
28 |
diff --git a/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild b/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild |
29 |
index 5a8aa3f539f4..13ce77523323 100644 |
30 |
--- a/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild |
31 |
+++ b/app-emulation/wine-staging/wine-staging-7.5-r1.ebuild |
32 |
@@ -359,7 +359,11 @@ src_configure() { |
33 |
if use mingw; then |
34 |
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} |
35 |
|
36 |
- export CROSSCFLAGS="${CFLAGS}" |
37 |
+ # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) |
38 |
+ local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} |
39 |
+ : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" |
40 |
+ : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" |
41 |
+ export CROSS{C,LD}FLAGS |
42 |
fi |
43 |
|
44 |
multilib-minimal_src_configure |
45 |
|
46 |
diff --git a/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild b/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild |
47 |
index c814bc62907c..2e0e2a06247c 100644 |
48 |
--- a/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild |
49 |
+++ b/app-emulation/wine-staging/wine-staging-7.6-r1.ebuild |
50 |
@@ -359,7 +359,11 @@ src_configure() { |
51 |
if use mingw; then |
52 |
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} |
53 |
|
54 |
- export CROSSCFLAGS="${CFLAGS}" |
55 |
+ # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) |
56 |
+ local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} |
57 |
+ : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" |
58 |
+ : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" |
59 |
+ export CROSS{C,LD}FLAGS |
60 |
fi |
61 |
|
62 |
multilib-minimal_src_configure |
63 |
|
64 |
diff --git a/app-emulation/wine-staging/wine-staging-7.7.ebuild b/app-emulation/wine-staging/wine-staging-7.7.ebuild |
65 |
index c814bc62907c..2e0e2a06247c 100644 |
66 |
--- a/app-emulation/wine-staging/wine-staging-7.7.ebuild |
67 |
+++ b/app-emulation/wine-staging/wine-staging-7.7.ebuild |
68 |
@@ -359,7 +359,11 @@ src_configure() { |
69 |
if use mingw; then |
70 |
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} |
71 |
|
72 |
- export CROSSCFLAGS="${CFLAGS}" |
73 |
+ # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) |
74 |
+ local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} |
75 |
+ : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" |
76 |
+ : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" |
77 |
+ export CROSS{C,LD}FLAGS |
78 |
fi |
79 |
|
80 |
multilib-minimal_src_configure |
81 |
|
82 |
diff --git a/app-emulation/wine-staging/wine-staging-7.8.ebuild b/app-emulation/wine-staging/wine-staging-7.8.ebuild |
83 |
index a8f7b0e6ad1c..78a3e9fb8778 100644 |
84 |
--- a/app-emulation/wine-staging/wine-staging-7.8.ebuild |
85 |
+++ b/app-emulation/wine-staging/wine-staging-7.8.ebuild |
86 |
@@ -357,7 +357,11 @@ src_configure() { |
87 |
if use mingw; then |
88 |
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} |
89 |
|
90 |
- export CROSSCFLAGS="${CFLAGS}" |
91 |
+ # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) |
92 |
+ local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} |
93 |
+ : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" |
94 |
+ : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" |
95 |
+ export CROSS{C,LD}FLAGS |
96 |
fi |
97 |
|
98 |
multilib-minimal_src_configure |
99 |
|
100 |
diff --git a/app-emulation/wine-staging/wine-staging-9999.ebuild b/app-emulation/wine-staging/wine-staging-9999.ebuild |
101 |
index a8f7b0e6ad1c..78a3e9fb8778 100644 |
102 |
--- a/app-emulation/wine-staging/wine-staging-9999.ebuild |
103 |
+++ b/app-emulation/wine-staging/wine-staging-9999.ebuild |
104 |
@@ -357,7 +357,11 @@ src_configure() { |
105 |
if use mingw; then |
106 |
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} |
107 |
|
108 |
- export CROSSCFLAGS="${CFLAGS}" |
109 |
+ # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) |
110 |
+ local mingwcc=${CROSSCC:-$(usex x86 i686 x86_64)-w64-mingw32-gcc} |
111 |
+ : "${CROSSCFLAGS:=$(CC=${mingwcc} test-flags-CC ${CFLAGS:--O2})}" |
112 |
+ : "${CROSSLDFLAGS:=$(CC=${mingwcc} test-flags-CCLD ${LDFLAGS})}" |
113 |
+ export CROSS{C,LD}FLAGS |
114 |
fi |
115 |
|
116 |
multilib-minimal_src_configure |