summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glibc/glibc/0009-yes-within-the-path-sets-wrong-config-variables.patch
blob: 61fdcb0816734c486d7ec8011081fa4a0a58d4c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
From 70e721856c3ebf6ae0ea84b828396bd2af090acf Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Mar 2015 00:31:06 +0000
Subject: [PATCH] 'yes' within the path sets wrong config variables

It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
but being such a short word to grep it is likely to produce
false-positive matches with the path it is configured into.

The change is to use a more elaborated string to grep for.

Upstream-Status: Submitted [libc-alpha@sourceware.org]

Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 sysdeps/aarch64/configure                              | 4 ++--
 sysdeps/aarch64/configure.ac                           | 4 ++--
 sysdeps/arm/configure                                  | 4 ++--
 sysdeps/arm/configure.ac                               | 4 ++--
 sysdeps/mips/configure                                 | 4 ++--
 sysdeps/mips/configure.ac                              | 4 ++--
 sysdeps/nios2/configure                                | 4 ++--
 sysdeps/nios2/configure.ac                             | 4 ++--
 sysdeps/unix/sysv/linux/mips/configure                 | 4 ++--
 sysdeps/unix/sysv/linux/mips/configure.ac              | 4 ++--
 sysdeps/unix/sysv/linux/powerpc/powerpc64/configure    | 8 ++++----
 sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac | 8 ++++----
 12 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
index ca57edce47..5e91fab023 100644
--- a/sysdeps/aarch64/configure
+++ b/sysdeps/aarch64/configure
@@ -165,12 +165,12 @@ else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __AARCH64EB__
-                      yes
+                      is_aarch64_be
                      #endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1
+  $EGREP "is_aarch64_be" >/dev/null 2>&1
 then :
   libc_cv_aarch64_be=yes
 else $as_nop
diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
index 27874eceb4..8a708f2ef4 100644
--- a/sysdeps/aarch64/configure.ac
+++ b/sysdeps/aarch64/configure.ac
@@ -13,8 +13,8 @@ AC_DEFINE(SUPPORT_STATIC_PIE)
 # the dynamic linker via %ifdef.
 AC_CACHE_CHECK([for big endian],
   [libc_cv_aarch64_be],
-  [AC_EGREP_CPP(yes,[#ifdef __AARCH64EB__
-                      yes
+  [AC_EGREP_CPP(is_aarch64_be,[#ifdef __AARCH64EB__
+                      is_aarch64_be
                      #endif
   ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)])
 if test $libc_cv_aarch64_be = yes; then
diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure
index 35e2918922..94d7fbe8bb 100644
--- a/sysdeps/arm/configure
+++ b/sysdeps/arm/configure
@@ -161,12 +161,12 @@ else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __ARM_PCS_VFP
-		      yes
+		      use_arm_pcs_vfp
 		     #endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1
+  $EGREP "use_arm_pcs_vfp" >/dev/null 2>&1
 then :
   libc_cv_arm_pcs_vfp=yes
 else $as_nop
diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac
index 5172e30bbe..f06dedd7c5 100644
--- a/sysdeps/arm/configure.ac
+++ b/sysdeps/arm/configure.ac
@@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # the dynamic linker via %ifdef.
 AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI],
   [libc_cv_arm_pcs_vfp],
-  [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP
-		      yes
+  [AC_EGREP_CPP(use_arm_pcs_vfp,[#ifdef __ARM_PCS_VFP
+		      use_arm_pcs_vfp
 		     #endif
   ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
 if test $libc_cv_arm_pcs_vfp = yes; then
diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure
index 1e8c6711e6..ae52ccd929 100644
--- a/sysdeps/mips/configure
+++ b/sysdeps/mips/configure
@@ -158,11 +158,11 @@ else $as_nop
 /* end confdefs.h.  */
 dnl
 #ifdef __mips_nan2008
-yes
+use_mips_nan2008
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1
+  $EGREP "use_mips_nan2008" >/dev/null 2>&1
 then :
   libc_cv_mips_nan2008=yes
 else $as_nop
diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac
index d3cd780d78..250223d206 100644
--- a/sysdeps/mips/configure.ac
+++ b/sysdeps/mips/configure.ac
@@ -6,9 +6,9 @@ dnl position independent way.
 AC_DEFINE(HIDDEN_VAR_NEEDS_DYNAMIC_RELOC)
 
 AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding],
-  libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl
+  libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl
 #ifdef __mips_nan2008
-yes
+use_mips_nan2008
 #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)])
 if test x$libc_cv_mips_nan2008 = xyes; then
   AC_DEFINE(HAVE_MIPS_NAN2008)
diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure
index 2fb230cbaa..1959d0a444 100644
--- a/sysdeps/nios2/configure
+++ b/sysdeps/nios2/configure
@@ -155,12 +155,12 @@ else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __nios2_big_endian__
-                      yes
+                      is_nios2_be
                      #endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1
+  $EGREP "is_nios2_be" >/dev/null 2>&1
 then :
   libc_cv_nios2_be=yes
 else $as_nop
diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac
index f738e9a7ed..4085851cbc 100644
--- a/sysdeps/nios2/configure.ac
+++ b/sysdeps/nios2/configure.ac
@@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
 # Nios II big endian is not yet supported.
 AC_CACHE_CHECK([for big endian],
   [libc_cv_nios2_be],
-  [AC_EGREP_CPP(yes,[#ifdef __nios2_big_endian__
-                      yes
+  [AC_EGREP_CPP(is_nios2_be,[#ifdef __nios2_big_endian__
+                      is_nios2_be
                      #endif
   ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)])
 if test $libc_cv_nios2_be = yes; then
diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
index a060901de4..0ac7019438 100644
--- a/sysdeps/unix/sysv/linux/mips/configure
+++ b/sysdeps/unix/sysv/linux/mips/configure
@@ -441,11 +441,11 @@ else $as_nop
 /* end confdefs.h.  */
 dnl
 #ifdef __mips_nan2008
-yes
+use_mips_nan2008
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1
+  $EGREP "use_mips_nan2008" >/dev/null 2>&1
 then :
   libc_cv_mips_nan2008=yes
 else $as_nop
diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac
index 049a0f4bdf..005526d4e8 100644
--- a/sysdeps/unix/sysv/linux/mips/configure.ac
+++ b/sysdeps/unix/sysv/linux/mips/configure.ac
@@ -105,9 +105,9 @@ AC_COMPILE_IFELSE(
 LIBC_CONFIG_VAR([mips-mode-switch],[${libc_mips_mode_switch}])
 
 AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding],
-  libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl
+  libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl
 #ifdef __mips_nan2008
-yes
+use_mips_nan2008
 #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)])
 
 libc_mips_nan=
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
index cf1b70c745..0dccf6cd76 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
@@ -168,12 +168,12 @@ else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #if _CALL_ELF == 2
-                      yes
+                      use_ppc_elfv2_abi
                      #endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1
+  $EGREP "use_ppc_elfv2_abi" >/dev/null 2>&1
 then :
   libc_cv_ppc64_elfv2_abi=yes
 else $as_nop
@@ -203,12 +203,12 @@ else $as_nop
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef _CALL_ELF
-                         yes
+                         is_def_call_elf
                        #endif
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1
+  $EGREP "is_def_call_elf" >/dev/null 2>&1
 then :
   libc_cv_ppc64_def_call_elf=yes
 else $as_nop
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
index f9cba6e15d..b21f72f1e4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
@@ -6,8 +6,8 @@ LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
 # Define default-abi according to compiler flags.
 AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI],
   [libc_cv_ppc64_elfv2_abi],
-  [AC_EGREP_CPP(yes,[#if _CALL_ELF == 2
-                      yes
+  [AC_EGREP_CPP(use_ppc_elfv2_abi,[#if _CALL_ELF == 2
+                      use_ppc_elfv2_abi
                      #endif
   ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)])
 if test $libc_cv_ppc64_elfv2_abi = yes; then
@@ -19,8 +19,8 @@ else
   # Compiler that do not support ELFv2 ABI does not define _CALL_ELF
   AC_CACHE_CHECK([whether the compiler defines _CALL_ELF],
     [libc_cv_ppc64_def_call_elf],
-    [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF
-                         yes
+    [AC_EGREP_CPP(is_def_call_elf,[#ifdef _CALL_ELF
+                         is_def_call_elf
                        #endif
     ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
   if test $libc_cv_ppc64_def_call_elf = no; then