1 |
commit: 08ac6a89ea72d4cdcb02383410b58e76e69913a4 |
2 |
Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 18 23:44:46 2019 +0000 |
4 |
Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 18 23:45:11 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08ac6a89 |
7 |
|
8 |
sys-libs/glibc: Fix headers-only cross-build for riscv |
9 |
|
10 |
Package-Manager: Portage-2.3.63, Repoman-2.3.12 |
11 |
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org> |
12 |
|
13 |
sys-libs/glibc/glibc-2.29-r2.ebuild | 37 ++++++++++++++++++------------------- |
14 |
sys-libs/glibc/glibc-9999.ebuild | 37 ++++++++++++++++++------------------- |
15 |
2 files changed, 36 insertions(+), 38 deletions(-) |
16 |
|
17 |
diff --git a/sys-libs/glibc/glibc-2.29-r2.ebuild b/sys-libs/glibc/glibc-2.29-r2.ebuild |
18 |
index 093ffc207eb..fe9feab7f75 100644 |
19 |
--- a/sys-libs/glibc/glibc-2.29-r2.ebuild |
20 |
+++ b/sys-libs/glibc/glibc-2.29-r2.ebuild |
21 |
@@ -1006,25 +1006,6 @@ glibc_headers_configure() { |
22 |
popd >/dev/null |
23 |
fi |
24 |
|
25 |
- case ${CTARGET} in |
26 |
- riscv*) |
27 |
- # RISC-V interrogates the compiler to determine which target to |
28 |
- # build. If building the headers then we don't strictly need a |
29 |
- # RISC-V compiler, so the built-in definitions that are provided |
30 |
- # along with all RISC-V compiler might not exist. This causes |
31 |
- # glibc's RISC-V preconfigure script to blow up. Since we're just |
32 |
- # building the headers any value will actually work here, so just |
33 |
- # pick the standard one (rv64g/lp64d) to make the build scripts |
34 |
- # happy for now -- the headers are all the same anyway so it |
35 |
- # doesn't matter. |
36 |
- headers_only_arch_CPPFLAGS+=( |
37 |
- -D__riscv_xlen=64 |
38 |
- -D__riscv_flen=64 |
39 |
- -D__riscv_float_abi_double=1 |
40 |
- -D__riscv_atomic=1 |
41 |
- ) ;; |
42 |
- esac |
43 |
- |
44 |
local myconf=() |
45 |
myconf+=( |
46 |
--disable-sanity-checks |
47 |
@@ -1042,6 +1023,24 @@ glibc_headers_configure() { |
48 |
# Nothing is compiled here which would affect the headers for the target. |
49 |
# So forcing CC/CFLAGS is sane. |
50 |
local headers_only_CC=$(tc-getBUILD_CC) |
51 |
+ |
52 |
+ case ${CTARGET} in |
53 |
+ riscv*) |
54 |
+ # RISC-V interrogates the compiler to determine which target to |
55 |
+ # build. If building the headers then we don't strictly need a |
56 |
+ # RISC-V compiler, so the built-in definitions that are provided |
57 |
+ # along with all RISC-V compiler might not exist. This causes |
58 |
+ # glibc's RISC-V preconfigure script to blow up. Since we're just |
59 |
+ # building the headers any value will actually work here, so just |
60 |
+ # pick the standard one (rv64g/lp64d) to make the build scripts |
61 |
+ # happy for now -- the headers are all the same anyway so it |
62 |
+ # doesn't matter. |
63 |
+ # It's not sufficient to shove the flags into CPPFLAGS, they need |
64 |
+ # to really go *everywhere*. |
65 |
+ headers_only_CC="${headers_only_CC} -D__riscv_xlen=64 -D__riscv_flen=64 -D__riscv_float_abi_double=1 -D__riscv_atomic=1" |
66 |
+ ;; |
67 |
+ esac |
68 |
+ |
69 |
local headers_only_CFLAGS="-O1 -pipe" |
70 |
local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" |
71 |
local headers_only_LDFLAGS="" |
72 |
|
73 |
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild |
74 |
index 142153734f9..20846e05faf 100644 |
75 |
--- a/sys-libs/glibc/glibc-9999.ebuild |
76 |
+++ b/sys-libs/glibc/glibc-9999.ebuild |
77 |
@@ -1007,25 +1007,6 @@ glibc_headers_configure() { |
78 |
popd >/dev/null |
79 |
fi |
80 |
|
81 |
- case ${CTARGET} in |
82 |
- riscv*) |
83 |
- # RISC-V interrogates the compiler to determine which target to |
84 |
- # build. If building the headers then we don't strictly need a |
85 |
- # RISC-V compiler, so the built-in definitions that are provided |
86 |
- # along with all RISC-V compiler might not exist. This causes |
87 |
- # glibc's RISC-V preconfigure script to blow up. Since we're just |
88 |
- # building the headers any value will actually work here, so just |
89 |
- # pick the standard one (rv64g/lp64d) to make the build scripts |
90 |
- # happy for now -- the headers are all the same anyway so it |
91 |
- # doesn't matter. |
92 |
- headers_only_arch_CPPFLAGS+=( |
93 |
- -D__riscv_xlen=64 |
94 |
- -D__riscv_flen=64 |
95 |
- -D__riscv_float_abi_double=1 |
96 |
- -D__riscv_atomic=1 |
97 |
- ) ;; |
98 |
- esac |
99 |
- |
100 |
local myconf=() |
101 |
myconf+=( |
102 |
--disable-sanity-checks |
103 |
@@ -1043,6 +1024,24 @@ glibc_headers_configure() { |
104 |
# Nothing is compiled here which would affect the headers for the target. |
105 |
# So forcing CC/CFLAGS is sane. |
106 |
local headers_only_CC=$(tc-getBUILD_CC) |
107 |
+ |
108 |
+ case ${CTARGET} in |
109 |
+ riscv*) |
110 |
+ # RISC-V interrogates the compiler to determine which target to |
111 |
+ # build. If building the headers then we don't strictly need a |
112 |
+ # RISC-V compiler, so the built-in definitions that are provided |
113 |
+ # along with all RISC-V compiler might not exist. This causes |
114 |
+ # glibc's RISC-V preconfigure script to blow up. Since we're just |
115 |
+ # building the headers any value will actually work here, so just |
116 |
+ # pick the standard one (rv64g/lp64d) to make the build scripts |
117 |
+ # happy for now -- the headers are all the same anyway so it |
118 |
+ # doesn't matter. |
119 |
+ # It's not sufficient to shove the flags into CPPFLAGS, they need |
120 |
+ # to really go *everywhere*. |
121 |
+ headers_only_CC="${headers_only_CC} -D__riscv_xlen=64 -D__riscv_flen=64 -D__riscv_float_abi_double=1 -D__riscv_atomic=1" |
122 |
+ ;; |
123 |
+ esac |
124 |
+ |
125 |
local headers_only_CFLAGS="-O1 -pipe" |
126 |
local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" |
127 |
local headers_only_LDFLAGS="" |