configure 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
  2. # Local configure fragment for sysdeps/arm.
  3. # We check to see if the compiler and flags are
  4. # selecting the hard-float ABI and if they are then
  5. # we set libc_cv_arm_pcs_vfp to yes which causes
  6. # HAVE_ARM_PCS_VFP to be defined in config.h and
  7. # in include/libc-symbols.h and thus available to
  8. # shlib-versions to select the appropriate name for
  9. # the dynamic linker via %ifdef.
  10. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
  11. printf %s "checking for egrep -e... " >&6; }
  12. if test ${ac_cv_path_EGREP_TRADITIONAL+y}
  13. then :
  14. printf %s "(cached) " >&6
  15. else case e in #(
  16. e) if test -z "$EGREP_TRADITIONAL"; then
  17. ac_path_EGREP_TRADITIONAL_found=false
  18. # Loop through the user's path and test for each of PROGNAME-LIST
  19. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  20. for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
  21. do
  22. IFS=$as_save_IFS
  23. case $as_dir in #(((
  24. '') as_dir=./ ;;
  25. */) ;;
  26. *) as_dir=$as_dir/ ;;
  27. esac
  28. for ac_prog in grep ggrep
  29. do
  30. for ac_exec_ext in '' $ac_executable_extensions; do
  31. ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
  32. as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
  33. # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
  34. # Check for GNU $ac_path_EGREP_TRADITIONAL
  35. case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
  36. *GNU*)
  37. ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
  38. #(
  39. *)
  40. ac_count=0
  41. printf %s 0123456789 >"conftest.in"
  42. while :
  43. do
  44. cat "conftest.in" "conftest.in" >"conftest.tmp"
  45. mv "conftest.tmp" "conftest.in"
  46. cp "conftest.in" "conftest.nl"
  47. printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
  48. "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
  49. diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  50. as_fn_arith $ac_count + 1 && ac_count=$as_val
  51. if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
  52. # Best one so far, save it but keep looking for a better one
  53. ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
  54. ac_path_EGREP_TRADITIONAL_max=$ac_count
  55. fi
  56. # 10*(2^10) chars as input seems more than enough
  57. test $ac_count -gt 10 && break
  58. done
  59. rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  60. esac
  61. $ac_path_EGREP_TRADITIONAL_found && break 3
  62. done
  63. done
  64. done
  65. IFS=$as_save_IFS
  66. if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
  67. :
  68. fi
  69. else
  70. ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
  71. fi
  72. if test "$ac_cv_path_EGREP_TRADITIONAL"
  73. then :
  74. ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
  75. else case e in #(
  76. e) if test -z "$EGREP_TRADITIONAL"; then
  77. ac_path_EGREP_TRADITIONAL_found=false
  78. # Loop through the user's path and test for each of PROGNAME-LIST
  79. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  80. for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
  81. do
  82. IFS=$as_save_IFS
  83. case $as_dir in #(((
  84. '') as_dir=./ ;;
  85. */) ;;
  86. *) as_dir=$as_dir/ ;;
  87. esac
  88. for ac_prog in egrep
  89. do
  90. for ac_exec_ext in '' $ac_executable_extensions; do
  91. ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
  92. as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
  93. # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
  94. # Check for GNU $ac_path_EGREP_TRADITIONAL
  95. case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
  96. *GNU*)
  97. ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
  98. #(
  99. *)
  100. ac_count=0
  101. printf %s 0123456789 >"conftest.in"
  102. while :
  103. do
  104. cat "conftest.in" "conftest.in" >"conftest.tmp"
  105. mv "conftest.tmp" "conftest.in"
  106. cp "conftest.in" "conftest.nl"
  107. printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
  108. "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
  109. diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
  110. as_fn_arith $ac_count + 1 && ac_count=$as_val
  111. if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
  112. # Best one so far, save it but keep looking for a better one
  113. ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
  114. ac_path_EGREP_TRADITIONAL_max=$ac_count
  115. fi
  116. # 10*(2^10) chars as input seems more than enough
  117. test $ac_count -gt 10 && break
  118. done
  119. rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
  120. esac
  121. $ac_path_EGREP_TRADITIONAL_found && break 3
  122. done
  123. done
  124. done
  125. IFS=$as_save_IFS
  126. if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
  127. as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
  128. fi
  129. else
  130. ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
  131. fi
  132. ;;
  133. esac
  134. fi ;;
  135. esac
  136. fi
  137. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
  138. printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
  139. EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
  140. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the ARM hard-float ABI" >&5
  141. printf %s "checking whether the compiler is using the ARM hard-float ABI... " >&6; }
  142. if test ${libc_cv_arm_pcs_vfp+y}
  143. then :
  144. printf %s "(cached) " >&6
  145. else case e in #(
  146. e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  147. /* end confdefs.h. */
  148. #ifdef __ARM_PCS_VFP
  149. yes
  150. #endif
  151. _ACEOF
  152. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  153. $EGREP_TRADITIONAL "yes" >/dev/null 2>&1
  154. then :
  155. libc_cv_arm_pcs_vfp=yes
  156. else case e in #(
  157. e) libc_cv_arm_pcs_vfp=no ;;
  158. esac
  159. fi
  160. rm -rf conftest*
  161. ;;
  162. esac
  163. fi
  164. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcs_vfp" >&5
  165. printf "%s\n" "$libc_cv_arm_pcs_vfp" >&6; }
  166. if test $libc_cv_arm_pcs_vfp = yes; then
  167. printf "%s\n" "#define HAVE_ARM_PCS_VFP 1" >>confdefs.h
  168. config_vars="$config_vars
  169. default-abi = hard"
  170. else
  171. config_vars="$config_vars
  172. default-abi = soft"
  173. fi
  174. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether VFP supports 32 registers" >&5
  175. printf %s "checking whether VFP supports 32 registers... " >&6; }
  176. if test ${libc_cv_arm_pcs_vfp_d32+y}
  177. then :
  178. printf %s "(cached) " >&6
  179. else case e in #(
  180. e)
  181. cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  182. /* end confdefs.h. */
  183. void foo (void)
  184. {
  185. asm volatile ("vldr d16,=17" : : : "d16");
  186. }
  187. _ACEOF
  188. if ac_fn_c_try_compile "$LINENO"
  189. then :
  190. libc_cv_arm_pcs_vfp_d32=yes
  191. else case e in #(
  192. e) libc_cv_arm_pcs_vfp_d32=no ;;
  193. esac
  194. fi
  195. rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
  196. esac
  197. fi
  198. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcs_vfp_d32" >&5
  199. printf "%s\n" "$libc_cv_arm_pcs_vfp_d32" >&6; }
  200. if test "$libc_cv_arm_pcs_vfp_d32" = yes ;
  201. then
  202. printf "%s\n" "#define HAVE_ARM_PCS_VFP_D32 1" >>confdefs.h
  203. fi
  204. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether PC-relative relocs in movw/movt work properly" >&5
  205. printf %s "checking whether PC-relative relocs in movw/movt work properly... " >&6; }
  206. if test ${libc_cv_arm_pcrel_movw+y}
  207. then :
  208. printf %s "(cached) " >&6
  209. else case e in #(
  210. e)
  211. cat > conftest.s <<\EOF
  212. .syntax unified
  213. .arm
  214. .arch armv7-a
  215. .text
  216. .globl foo
  217. .type foo,%function
  218. foo: movw r0, #:lower16:symbol - 1f - 8
  219. movt r0, #:upper16:symbol - 1f - 8
  220. 1: add r0, pc
  221. @ And now a case with a local symbol.
  222. movw r0, #:lower16:3f - 2f - 8
  223. movt r0, #:upper16:3f - 2f - 8
  224. 2: add r0, pc
  225. bx lr
  226. .data
  227. .globl symbol
  228. .hidden symbol
  229. symbol: .long 23
  230. 3: .long 17
  231. EOF
  232. libc_cv_arm_pcrel_movw=no
  233. ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \
  234. -nostartfiles -nostdlib -shared \
  235. -o conftest.so conftest.s 1>&5 2>&5 &&
  236. LC_ALL=C $READELF -dr conftest.so > conftest.dr 2>&5 &&
  237. {
  238. cat conftest.dr 1>&5
  239. grep -F 'TEXTREL
  240. R_ARM_NONE' conftest.dr > /dev/null || libc_cv_arm_pcrel_movw=yes
  241. }
  242. rm -f conftest* ;;
  243. esac
  244. fi
  245. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcrel_movw" >&5
  246. printf "%s\n" "$libc_cv_arm_pcrel_movw" >&6; }
  247. if test $libc_cv_arm_pcrel_movw = yes; then
  248. printf "%s\n" "#define ARM_PCREL_MOVW_OK 1" >>confdefs.h
  249. fi
  250. # This was buggy in assemblers from GNU binutils versions before 2.25.1
  251. # (it's known to be broken in 2.24 and 2.25; see
  252. # https://sourceware.org/bugzilla/show_bug.cgi?id=18383).
  253. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether TPOFF relocs with addends are assembled correctly" >&5
  254. printf %s "checking whether TPOFF relocs with addends are assembled correctly... " >&6; }
  255. if test ${libc_cv_arm_tpoff_addend+y}
  256. then :
  257. printf %s "(cached) " >&6
  258. else case e in #(
  259. e)
  260. cat > conftest.s <<\EOF
  261. .syntax unified
  262. .arm
  263. .arch armv7-a
  264. .text
  265. foo:
  266. .word tbase(tpoff)+4
  267. .section .tdata,"awT",%progbits
  268. .word -4
  269. tbase: .word 0
  270. .word 4
  271. EOF
  272. libc_cv_arm_tpoff_addend=no
  273. ${CC-cc} -c $CFLAGS $CPPFLAGS \
  274. -o conftest.o conftest.s 1>&5 2>&5 &&
  275. LC_ALL=C $READELF -x.text conftest.o > conftest.x 2>&5 &&
  276. {
  277. cat conftest.x 1>&5
  278. $AWK 'BEGIN { result = 2 }
  279. $1 ~ /0x0+/ && $2 ~ /[0-9a-f]+/ {
  280. # Check for little-endian or big-endian encoding of 4 in the in-place addend.
  281. result = ($2 == "04000000" || $2 == "00000004") ? 0 : 1
  282. }
  283. END { exit(result) }
  284. ' conftest.x 2>&5 && libc_cv_arm_tpoff_addend=yes
  285. }
  286. rm -f conftest* ;;
  287. esac
  288. fi
  289. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_tpoff_addend" >&5
  290. printf "%s\n" "$libc_cv_arm_tpoff_addend" >&6; }
  291. if test $libc_cv_arm_tpoff_addend = no; then
  292. config_vars="$config_vars
  293. test-xfail-tst-tlsalign = yes"
  294. config_vars="$config_vars
  295. test-xfail-tst-tlsalign-static = yes"
  296. fi
  297. libc_cv_gcc_unwind_find_fde=no
  298. # Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.ac.
  299. CFLAGS=${CFLAGS% -fno-unwind-tables}