Move all files into ports/ subdirectory in preparation for merge with glibc
[glibc.git] / ports / sysdeps / arm / configure.in
blob64cef5f94ebb863b828c2a5a0167cba219bd2b62
1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/arm.
4 # Check for support of thread-local storage handling in assembler and
5 # linker.
6 AC_CACHE_CHECK(for ARM TLS support, libc_cv_arm_tls, [dnl
7 cat > conftest.s <<\EOF
8         .section ".tdata", "awT", %progbits
9         .globl foo
10 foo:    .long   1
11         .section ".tbss", "awT", %nobits
12         .globl bar
13 bar:    .skip   4
14         .text
15 .word   foo(tpoff)
16 .word   foo(tlsgd)
17 EOF
18 dnl
19 if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
20   libc_cv_arm_tls=yes
21 else
22   libc_cv_arm_tls=no
24 rm -f conftest*])
25 if test $libc_cv_arm_tls = no; then
26   AC_MSG_ERROR([the assembler must support TLS])
29 dnl It is always possible to access static and hidden symbols in an
30 dnl position independent way.
31 dnl NOTE: This feature was added by the GCC TLS patches.  We should test for
32 dnl it.  Until we do, don't define it.
33 #AC_DEFINE(PI_STATIC_AND_HIDDEN)
35 AC_CACHE_CHECK([whether the CFI directive .cfi_sections is supported],
36   [libc_cv_asm_cfi_directive_sections],
37   [cat > conftest.s <<EOF
38         .text
39         .cfi_sections .debug_frame, .eh_frame
40         .cfi_startproc
41         .cfi_endproc
42 EOF
43   if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
44     libc_cv_asm_cfi_directive_sections=yes
45   else
46     libc_cv_asm_cfi_directive_sections=no
47   fi
48   rm -f conftest*])
49 if test $libc_cv_asm_cfi_directive_sections != yes; then
50   AC_MSG_ERROR([need .cfi_sections in this configuration])
53 # We check to see if the compiler and flags are
54 # selecting the hard-float ABI and if they are then
55 # we set libc_cv_arm_pcs_vfp to yes which causes
56 # HAVE_ARM_PCS_VFP to be defined in config.h and
57 # in include/libc-symbols.h and thus available to
58 # shlib-versions to select the appropriate name for
59 # the dynamic linker via %ifdef.
60 AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI],
61   [libc_cv_arm_pcs_vfp],
62   [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP
63                       yes
64                      #endif
65   ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
66 if test $libc_cv_arm_pcs_vfp = yes; then
67   AC_DEFINE(HAVE_ARM_PCS_VFP)