Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From 70199fe59c38b621ab4121d7a55719b2b29b36de Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Wed, 18 Mar 2015 00:31:06 +0000 |
| 4 | Subject: [PATCH 16/27] 'yes' within the path sets wrong config variables |
| 5 | |
| 6 | It seems that the 'AC_EGREP_CPP(yes...' example is quite popular |
| 7 | but being such a short word to grep it is likely to produce |
| 8 | false-positive matches with the path it is configured into. |
| 9 | |
| 10 | The change is to use a more elaborated string to grep for. |
| 11 | |
| 12 | Upstream-Status: Submitted [libc-alpha@sourceware.org] |
| 13 | |
| 14 | Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> |
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 16 | --- |
| 17 | sysdeps/aarch64/configure | 4 ++-- |
| 18 | sysdeps/aarch64/configure.ac | 4 ++-- |
| 19 | sysdeps/arm/configure | 4 ++-- |
| 20 | sysdeps/arm/configure.ac | 4 ++-- |
| 21 | sysdeps/mips/configure | 4 ++-- |
| 22 | sysdeps/mips/configure.ac | 4 ++-- |
| 23 | sysdeps/nios2/configure | 4 ++-- |
| 24 | sysdeps/nios2/configure.ac | 4 ++-- |
| 25 | sysdeps/unix/sysv/linux/mips/configure | 4 ++-- |
| 26 | sysdeps/unix/sysv/linux/mips/configure.ac | 4 ++-- |
| 27 | sysdeps/unix/sysv/linux/powerpc/powerpc64/configure | 8 ++++---- |
| 28 | sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac | 8 ++++---- |
| 29 | 12 files changed, 28 insertions(+), 28 deletions(-) |
| 30 | |
| 31 | diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure |
| 32 | index 5bd355a..3bc5537 100644 |
| 33 | --- a/sysdeps/aarch64/configure |
| 34 | +++ b/sysdeps/aarch64/configure |
| 35 | @@ -148,12 +148,12 @@ else |
| 36 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 37 | /* end confdefs.h. */ |
| 38 | #ifdef __AARCH64EB__ |
| 39 | - yes |
| 40 | + is_aarch64_be |
| 41 | #endif |
| 42 | |
| 43 | _ACEOF |
| 44 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 45 | - $EGREP "yes" >/dev/null 2>&1; then : |
| 46 | + $EGREP "is_aarch64_be" >/dev/null 2>&1; then : |
| 47 | libc_cv_aarch64_be=yes |
| 48 | else |
| 49 | libc_cv_aarch64_be=no |
| 50 | diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac |
| 51 | index 7851dd4..6e92381 100644 |
| 52 | --- a/sysdeps/aarch64/configure.ac |
| 53 | +++ b/sysdeps/aarch64/configure.ac |
| 54 | @@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. |
| 55 | # the dynamic linker via %ifdef. |
| 56 | AC_CACHE_CHECK([for big endian], |
| 57 | [libc_cv_aarch64_be], |
| 58 | - [AC_EGREP_CPP(yes,[#ifdef __AARCH64EB__ |
| 59 | - yes |
| 60 | + [AC_EGREP_CPP(is_aarch64_be,[#ifdef __AARCH64EB__ |
| 61 | + is_aarch64_be |
| 62 | #endif |
| 63 | ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)]) |
| 64 | if test $libc_cv_aarch64_be = yes; then |
| 65 | diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure |
| 66 | index 158116b..5eaf54e 100644 |
| 67 | --- a/sysdeps/arm/configure |
| 68 | +++ b/sysdeps/arm/configure |
| 69 | @@ -151,12 +151,12 @@ else |
| 70 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 71 | /* end confdefs.h. */ |
| 72 | #ifdef __ARM_PCS_VFP |
| 73 | - yes |
| 74 | + use_arm_pcs_vfp |
| 75 | #endif |
| 76 | |
| 77 | _ACEOF |
| 78 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 79 | - $EGREP "yes" >/dev/null 2>&1; then : |
| 80 | + $EGREP "use_arm_pcs_vfp" >/dev/null 2>&1; then : |
| 81 | libc_cv_arm_pcs_vfp=yes |
| 82 | else |
| 83 | libc_cv_arm_pcs_vfp=no |
| 84 | diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac |
| 85 | index 859c92a..2f4a6e2 100644 |
| 86 | --- a/sysdeps/arm/configure.ac |
| 87 | +++ b/sysdeps/arm/configure.ac |
| 88 | @@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN) |
| 89 | # the dynamic linker via %ifdef. |
| 90 | AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI], |
| 91 | [libc_cv_arm_pcs_vfp], |
| 92 | - [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP |
| 93 | - yes |
| 94 | + [AC_EGREP_CPP(use_arm_pcs_vfp,[#ifdef __ARM_PCS_VFP |
| 95 | + use_arm_pcs_vfp |
| 96 | #endif |
| 97 | ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)]) |
| 98 | if test $libc_cv_arm_pcs_vfp = yes; then |
| 99 | diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure |
| 100 | index 4e13248..f14af95 100644 |
| 101 | --- a/sysdeps/mips/configure |
| 102 | +++ b/sysdeps/mips/configure |
| 103 | @@ -143,11 +143,11 @@ else |
| 104 | /* end confdefs.h. */ |
| 105 | dnl |
| 106 | #ifdef __mips_nan2008 |
| 107 | -yes |
| 108 | +use_mips_nan2008 |
| 109 | #endif |
| 110 | _ACEOF |
| 111 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 112 | - $EGREP "yes" >/dev/null 2>&1; then : |
| 113 | + $EGREP "use_mips_nan2008" >/dev/null 2>&1; then : |
| 114 | libc_cv_mips_nan2008=yes |
| 115 | else |
| 116 | libc_cv_mips_nan2008=no |
| 117 | diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac |
| 118 | index bcbdaff..ad3057f 100644 |
| 119 | --- a/sysdeps/mips/configure.ac |
| 120 | +++ b/sysdeps/mips/configure.ac |
| 121 | @@ -6,9 +6,9 @@ dnl position independent way. |
| 122 | dnl AC_DEFINE(PI_STATIC_AND_HIDDEN) |
| 123 | |
| 124 | AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], |
| 125 | - libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl |
| 126 | + libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl |
| 127 | #ifdef __mips_nan2008 |
| 128 | -yes |
| 129 | +use_mips_nan2008 |
| 130 | #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) |
| 131 | if test x$libc_cv_mips_nan2008 = xyes; then |
| 132 | AC_DEFINE(HAVE_MIPS_NAN2008) |
| 133 | diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure |
| 134 | index 14c8a3a..dde3814 100644 |
| 135 | --- a/sysdeps/nios2/configure |
| 136 | +++ b/sysdeps/nios2/configure |
| 137 | @@ -142,12 +142,12 @@ else |
| 138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 139 | /* end confdefs.h. */ |
| 140 | #ifdef __nios2_big_endian__ |
| 141 | - yes |
| 142 | + is_nios2_be |
| 143 | #endif |
| 144 | |
| 145 | _ACEOF |
| 146 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 147 | - $EGREP "yes" >/dev/null 2>&1; then : |
| 148 | + $EGREP "is_nios2_be" >/dev/null 2>&1; then : |
| 149 | libc_cv_nios2_be=yes |
| 150 | else |
| 151 | libc_cv_nios2_be=no |
| 152 | diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac |
| 153 | index f05f438..dc86399 100644 |
| 154 | --- a/sysdeps/nios2/configure.ac |
| 155 | +++ b/sysdeps/nios2/configure.ac |
| 156 | @@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. |
| 157 | # Nios II big endian is not yet supported. |
| 158 | AC_CACHE_CHECK([for big endian], |
| 159 | [libc_cv_nios2_be], |
| 160 | - [AC_EGREP_CPP(yes,[#ifdef __nios2_big_endian__ |
| 161 | - yes |
| 162 | + [AC_EGREP_CPP(is_nios2_be,[#ifdef __nios2_big_endian__ |
| 163 | + is_nios2_be |
| 164 | #endif |
| 165 | ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)]) |
| 166 | if test $libc_cv_nios2_be = yes; then |
| 167 | diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure |
| 168 | index 83f8b13..2b6cbee 100644 |
| 169 | --- a/sysdeps/unix/sysv/linux/mips/configure |
| 170 | +++ b/sysdeps/unix/sysv/linux/mips/configure |
| 171 | @@ -387,11 +387,11 @@ else |
| 172 | /* end confdefs.h. */ |
| 173 | dnl |
| 174 | #ifdef __mips_nan2008 |
| 175 | -yes |
| 176 | +use_mips_nan2008 |
| 177 | #endif |
| 178 | _ACEOF |
| 179 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 180 | - $EGREP "yes" >/dev/null 2>&1; then : |
| 181 | + $EGREP "use_mips_nan2008" >/dev/null 2>&1; then : |
| 182 | libc_cv_mips_nan2008=yes |
| 183 | else |
| 184 | libc_cv_mips_nan2008=no |
| 185 | diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac |
| 186 | index 5039ec9..1035f76 100644 |
| 187 | --- a/sysdeps/unix/sysv/linux/mips/configure.ac |
| 188 | +++ b/sysdeps/unix/sysv/linux/mips/configure.ac |
| 189 | @@ -98,9 +98,9 @@ AC_COMPILE_IFELSE( |
| 190 | LIBC_CONFIG_VAR([mips-mode-switch],[${libc_mips_mode_switch}]) |
| 191 | |
| 192 | AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding], |
| 193 | - libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl |
| 194 | + libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl |
| 195 | #ifdef __mips_nan2008 |
| 196 | -yes |
| 197 | +use_mips_nan2008 |
| 198 | #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)]) |
| 199 | |
| 200 | libc_mips_nan= |
| 201 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure |
| 202 | index 70bb18a..ffd9e3e 100644 |
| 203 | --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure |
| 204 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure |
| 205 | @@ -155,12 +155,12 @@ else |
| 206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 207 | /* end confdefs.h. */ |
| 208 | #if _CALL_ELF == 2 |
| 209 | - yes |
| 210 | + use_ppc_elfv2_abi |
| 211 | #endif |
| 212 | |
| 213 | _ACEOF |
| 214 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 215 | - $EGREP "yes" >/dev/null 2>&1; then : |
| 216 | + $EGREP "use_ppc_elfv2_abi" >/dev/null 2>&1; then : |
| 217 | libc_cv_ppc64_elfv2_abi=yes |
| 218 | else |
| 219 | libc_cv_ppc64_elfv2_abi=no |
| 220 | @@ -188,12 +188,12 @@ else |
| 221 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 222 | /* end confdefs.h. */ |
| 223 | #ifdef _CALL_ELF |
| 224 | - yes |
| 225 | + is_def_call_elf |
| 226 | #endif |
| 227 | |
| 228 | _ACEOF |
| 229 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 230 | - $EGREP "yes" >/dev/null 2>&1; then : |
| 231 | + $EGREP "is_def_call_elf" >/dev/null 2>&1; then : |
| 232 | libc_cv_ppc64_def_call_elf=yes |
| 233 | else |
| 234 | libc_cv_ppc64_def_call_elf=no |
| 235 | diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac |
| 236 | index 0822915..9a32fdd 100644 |
| 237 | --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac |
| 238 | +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac |
| 239 | @@ -6,8 +6,8 @@ LIBC_SLIBDIR_RTLDDIR([lib64], [lib64]) |
| 240 | # Define default-abi according to compiler flags. |
| 241 | AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI], |
| 242 | [libc_cv_ppc64_elfv2_abi], |
| 243 | - [AC_EGREP_CPP(yes,[#if _CALL_ELF == 2 |
| 244 | - yes |
| 245 | + [AC_EGREP_CPP(use_ppc_elfv2_abi,[#if _CALL_ELF == 2 |
| 246 | + use_ppc_elfv2_abi |
| 247 | #endif |
| 248 | ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)]) |
| 249 | if test $libc_cv_ppc64_elfv2_abi = yes; then |
| 250 | @@ -19,8 +19,8 @@ else |
| 251 | # Compiler that do not support ELFv2 ABI does not define _CALL_ELF |
| 252 | AC_CACHE_CHECK([whether the compiler defines _CALL_ELF], |
| 253 | [libc_cv_ppc64_def_call_elf], |
| 254 | - [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF |
| 255 | - yes |
| 256 | + [AC_EGREP_CPP(is_def_call_elf,[#ifdef _CALL_ELF |
| 257 | + is_def_call_elf |
| 258 | #endif |
| 259 | ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)]) |
| 260 | if test $libc_cv_ppc64_def_call_elf = no; then |
| 261 | -- |
| 262 | 2.1.4 |
| 263 | |