1 |
commit: 7a505aed3d730685006abdeb6c0ca4f1698bfb76 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Mar 30 11:17:25 2018 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 30 11:43:08 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a505aed |
7 |
|
8 |
sys-libs/glibc: log when ebuild overrides CC/CFLAGS |
9 |
|
10 |
Package-Manager: Portage-2.3.26, Repoman-2.3.7 |
11 |
|
12 |
sys-libs/glibc/glibc-2.26-r6.ebuild | 17 +++++++++++++---- |
13 |
sys-libs/glibc/glibc-2.27-r1.ebuild | 19 +++++++++++++++---- |
14 |
sys-libs/glibc/glibc-9999.ebuild | 19 +++++++++++++++---- |
15 |
3 files changed, 43 insertions(+), 12 deletions(-) |
16 |
|
17 |
diff --git a/sys-libs/glibc/glibc-2.26-r6.ebuild b/sys-libs/glibc/glibc-2.26-r6.ebuild |
18 |
index 2729cf8d6eb..0922ffb404f 100644 |
19 |
--- a/sys-libs/glibc/glibc-2.26-r6.ebuild |
20 |
+++ b/sys-libs/glibc/glibc-2.26-r6.ebuild |
21 |
@@ -532,11 +532,20 @@ glibc_headers_configure() { |
22 |
|
23 |
# Nothing is compiled here which would affect the headers for the target. |
24 |
# So forcing CC/CFLAGS is sane. |
25 |
+ local headers_only_CC=$(tc-getBUILD_CC) |
26 |
+ local headers_only_CFLAGS="-O1 -pipe" |
27 |
+ local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE" |
28 |
+ local headers_only_LDFLAGS="" |
29 |
set -- "${S}"/configure "${myconf[@]}" |
30 |
- echo "$@" |
31 |
- CC="$(tc-getBUILD_CC)" \ |
32 |
- CFLAGS="-O1 -pipe" \ |
33 |
- CPPFLAGS="-U_FORTIFY_SOURCE" \ |
34 |
+ echo \ |
35 |
+ "CC=${headers_only_CC}" \ |
36 |
+ "CFLAGS=${headers_only_CFLAGS}" \ |
37 |
+ "CPPFLAGS=${headers_only_CPPFLAGS}" \ |
38 |
+ "LDFLAGS=${headers_only_LDFLAGS}" \ |
39 |
+ "$@" |
40 |
+ CC=${headers_only_CC} \ |
41 |
+ CFLAGS=${headers_only_CFLAGS} \ |
42 |
+ CPPFLAGS=${headers_only_CPPFLAGS} \ |
43 |
LDFLAGS="" \ |
44 |
"$@" || die "failed to configure glibc" |
45 |
} |
46 |
|
47 |
diff --git a/sys-libs/glibc/glibc-2.27-r1.ebuild b/sys-libs/glibc/glibc-2.27-r1.ebuild |
48 |
index aa1b179ab4b..a175b225e18 100644 |
49 |
--- a/sys-libs/glibc/glibc-2.27-r1.ebuild |
50 |
+++ b/sys-libs/glibc/glibc-2.27-r1.ebuild |
51 |
@@ -450,6 +450,7 @@ setup_env() { |
52 |
# and fall back on CFLAGS. |
53 |
local VAR=CFLAGS_${CTARGET//[-.]/_} |
54 |
CFLAGS=${!VAR-${CFLAGS}} |
55 |
+ einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" |
56 |
fi |
57 |
|
58 |
setup_flags |
59 |
@@ -463,6 +464,7 @@ setup_env() { |
60 |
# top of each other. |
61 |
: ${__GLIBC_CC:=$(tc-getCC ${CTARGET_OPT:-${CTARGET}})} |
62 |
export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}" |
63 |
+ einfo " $(printf '%15s' 'Manual CC:') ${CC}" |
64 |
} |
65 |
|
66 |
foreach_abi() { |
67 |
@@ -1022,11 +1024,20 @@ glibc_headers_configure() { |
68 |
|
69 |
# Nothing is compiled here which would affect the headers for the target. |
70 |
# So forcing CC/CFLAGS is sane. |
71 |
+ local headers_only_CC=$(tc-getBUILD_CC) |
72 |
+ local headers_only_CFLAGS="-O1 -pipe" |
73 |
+ local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE" |
74 |
+ local headers_only_LDFLAGS="" |
75 |
set -- "${S}"/configure "${myconf[@]}" |
76 |
- echo "$@" |
77 |
- CC="$(tc-getBUILD_CC)" \ |
78 |
- CFLAGS="-O1 -pipe" \ |
79 |
- CPPFLAGS="-U_FORTIFY_SOURCE" \ |
80 |
+ echo \ |
81 |
+ "CC=${headers_only_CC}" \ |
82 |
+ "CFLAGS=${headers_only_CFLAGS}" \ |
83 |
+ "CPPFLAGS=${headers_only_CPPFLAGS}" \ |
84 |
+ "LDFLAGS=${headers_only_LDFLAGS}" \ |
85 |
+ "$@" |
86 |
+ CC=${headers_only_CC} \ |
87 |
+ CFLAGS=${headers_only_CFLAGS} \ |
88 |
+ CPPFLAGS=${headers_only_CPPFLAGS} \ |
89 |
LDFLAGS="" \ |
90 |
"$@" || die "failed to configure glibc" |
91 |
} |
92 |
|
93 |
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild |
94 |
index a978eaf1970..52fe095e5fd 100644 |
95 |
--- a/sys-libs/glibc/glibc-9999.ebuild |
96 |
+++ b/sys-libs/glibc/glibc-9999.ebuild |
97 |
@@ -450,6 +450,7 @@ setup_env() { |
98 |
# and fall back on CFLAGS. |
99 |
local VAR=CFLAGS_${CTARGET//[-.]/_} |
100 |
CFLAGS=${!VAR-${CFLAGS}} |
101 |
+ einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}" |
102 |
fi |
103 |
|
104 |
setup_flags |
105 |
@@ -463,6 +464,7 @@ setup_env() { |
106 |
# top of each other. |
107 |
: ${__GLIBC_CC:=$(tc-getCC ${CTARGET_OPT:-${CTARGET}})} |
108 |
export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}" |
109 |
+ einfo " $(printf '%15s' 'Manual CC:') ${CC}" |
110 |
} |
111 |
|
112 |
foreach_abi() { |
113 |
@@ -1022,11 +1024,20 @@ glibc_headers_configure() { |
114 |
|
115 |
# Nothing is compiled here which would affect the headers for the target. |
116 |
# So forcing CC/CFLAGS is sane. |
117 |
+ local headers_only_CC=$(tc-getBUILD_CC) |
118 |
+ local headers_only_CFLAGS="-O1 -pipe" |
119 |
+ local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE" |
120 |
+ local headers_only_LDFLAGS="" |
121 |
set -- "${S}"/configure "${myconf[@]}" |
122 |
- echo "$@" |
123 |
- CC="$(tc-getBUILD_CC)" \ |
124 |
- CFLAGS="-O1 -pipe" \ |
125 |
- CPPFLAGS="-U_FORTIFY_SOURCE" \ |
126 |
+ echo \ |
127 |
+ "CC=${headers_only_CC}" \ |
128 |
+ "CFLAGS=${headers_only_CFLAGS}" \ |
129 |
+ "CPPFLAGS=${headers_only_CPPFLAGS}" \ |
130 |
+ "LDFLAGS=${headers_only_LDFLAGS}" \ |
131 |
+ "$@" |
132 |
+ CC=${headers_only_CC} \ |
133 |
+ CFLAGS=${headers_only_CFLAGS} \ |
134 |
+ CPPFLAGS=${headers_only_CPPFLAGS} \ |
135 |
LDFLAGS="" \ |
136 |
"$@" || die "failed to configure glibc" |
137 |
} |