0009-yes-within-the-path-sets-wrong-config-variables.patch 9.5 KB

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