Cleanup old obsolete PPC_REL16 checks
[glibc.git] / sysdeps / powerpc / powerpc32 / configure.in
blob21d3f5ee5b286e738822b8d35ee129fb7209b4ad
1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/powerpc/powerpc32.
4 # See whether gas has R_PPC_REL16 relocs.
5 AC_CACHE_CHECK(for R_PPC_REL16 gas support, libc_cv_ppc_rel16, [dnl
6 cat > conftest.s <<\EOF
7         .text
8         addis 11,30,_GLOBAL_OFFSET_TABLE_-.@ha
9 EOF
10 if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then
11   libc_cv_ppc_rel16=yes
12 else
13   libc_cv_ppc_rel16=no
15 rm -f conftest*])
16 if test $libc_cv_ppc_rel16 = no; then
17   AC_MSG_ERROR(R_PPC_REL16 is not supported. Binutils is too old.)
20 # See whether GCC uses -msecure-plt.
21 AC_CACHE_CHECK(for -msecure-plt by default, libc_cv_ppc_secure_plt, [dnl
22 echo 'int foo (void) { extern int bar; return bar; }' > conftest.c
23 libc_cv_ppc_secure_plt=no
24 if AC_TRY_COMMAND(${CC-cc} -S $CFLAGS conftest.c -fpic -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
25   if grep '_GLOBAL_OFFSET_TABLE_-.*@ha' conftest.s > /dev/null 2>&1; then
26     libc_cv_ppc_secure_plt=yes
27   fi
29 rm -rf conftest*])
30 if test $libc_cv_ppc_secure_plt = yes; then
31   AC_DEFINE(HAVE_PPC_SECURE_PLT)