Remove relro configure test.
[platform/upstream/linaro-glibc.git] / configure.ac
index 589b3d0..566ecb2 100644 (file)
@@ -398,19 +398,6 @@ vendor=$config_vendor
 os=$config_os
 base_os=''
 
-# config.guess on some IBM machines says `rs6000' instead of `powerpc'.
-# Unify this here.
-if test "$machine" = rs6000; then
-  machine="powerpc"
-fi
-
-# Braindead PowerPC box with absolutely no FPU.
-case "$machine-$host_os" in
-  powerpc*-*soft)
-    with_fp=no
-    ;;
-esac
-
 submachine=
 AC_ARG_WITH([cpu],
            AS_HELP_STRING([--with-cpu=CPU], [select code for CPU variant]),
@@ -586,10 +573,6 @@ fi
 test -n "$base_machine" || base_machine=$machine
 AC_SUBST(base_machine)
 
-if test "$base_machine" = "i386"; then
-  AC_DEFINE(USE_REGPARMS)
-fi
-
 # For the multi-arch option we need support in the assembler & linker.
 AC_CACHE_CHECK([for assembler and linker STT_GNU_IFUNC support],
               libc_cv_ld_gnu_indirect_function, [dnl
@@ -1359,73 +1342,6 @@ LIBC_LINKER_FEATURE([-z initfirst], [-Wl,--enable-new-dtags,-z,initfirst],
                    [libc_cv_z_initfirst=yes],
                    [AC_MSG_ERROR(linker with -z initfirst support required)])
 
-# Add-on fragments can set these for other machines.
-libc_commonpagesize=${libc_commonpagesize:-no}
-libc_relro_required=${libc_relro_required:-no}
-case "$base_machine" in
-  i[[34567]]86 | x86_64 | powerpc* | s390*)
-    libc_commonpagesize=0x1000
-    libc_relro_required=yes
-    ;;
-  sparc*)
-    libc_commonpagesize=0x2000
-    libc_relro_required=yes
-    ;;
-esac
-
-if test $libc_commonpagesize != no; then
-  AC_CACHE_CHECK(for -z relro option,
-                libc_cv_z_relro, [dnl
-  libc_cv_z_relro=no
-  AC_LANG_CONFTEST([AC_LANG_SOURCE([[
-int _start (void) { return 42; }
-extern void _exit (int);
-/* Since these pointers are const, they should go in rodata.
-   Since they refer to functions that have to be resolved by
-   dynamic linking, they should instead go in RELRO data.  */
-const void *const relro[] = { &_start, &_exit, 0 };
-/* GNU ld fails to produce RELRO data when it's very small and there is no
-   normal writable data following it, or if only uninitialized (.bss) data
-   follows it, or only very small writable data.  */
-int data[0x10000] = { 1, };
-]])])
-  cat > conftest.awk <<\EOF
-BEGIN {
-  result = "no"
-  commonpagesize = strtonum(commonpagesize)
-}
-{ print "LINE:", $0 > "/dev/stderr" }
-$1 == "GNU_RELRO" {
-  vaddr = strtonum($3)
-  memsz = strtonum($6)
-  end = vaddr + memsz
-  printf "vaddr %#x memsz %#x end %#x commonpagesize %#x\n", \
-    vaddr, memsz, end, commonpagesize > "/dev/stderr"
-  result = (end % commonpagesize == 0) ? "yes" : "broken"
-}
-END { print result }
-EOF
-  AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-                   -fPIC -shared -o conftest.so conftest.c
-                   -nostartfiles -nostdlib
-                   -Wl,-z,relro 1>&AS_MESSAGE_LOG_FD]) &&
-  AC_TRY_COMMAND([$READELF -Wl conftest.so > conftest.ph]) &&
-  AC_TRY_COMMAND([
-      $AWK -v commonpagesize=$libc_commonpagesize -f conftest.awk
-          conftest.ph > conftest.cps
-    ]) &&
-  libc_cv_z_relro=`cat conftest.cps 2>&AS_MESSAGE_LOG_FD`
-  rm -f conftest*])
-  if { test "x$libc_relro_required" = xyes &&
-       test "x$libc_cv_z_relro" != xyes
-     }
-  then
-    AC_MSG_ERROR(linker with -z relro support required)
-  fi
-else
-  AC_MSG_WARN([missing architecture parameter to check for working -z relro])
-fi
-
 AC_CACHE_CHECK(for -Bgroup option,
               libc_cv_Bgroup, [dnl
 cat > conftest.c <<EOF
@@ -1700,30 +1616,6 @@ elif test $libc_cv_asm_weakext_directive = yes; then
   AC_DEFINE(HAVE_ASM_WEAKEXT_DIRECTIVE)
 fi
 
-AC_CACHE_CHECK(whether CFI directives are supported, libc_cv_asm_cfi_directives, [dnl
-case $machine in
-  sparc/sparc64*) cfi_offset=2047;;
-  *) cfi_offset=0;;
-esac
-cat > conftest.s <<EOF
-       .text
-       .type   func,%function
-func:
-       .cfi_startproc
-       .cfi_remember_state
-       .cfi_rel_offset 1, $cfi_offset
-       .cfi_endproc
-EOF
-if AC_TRY_COMMAND(${CC-cc} $ASFLAGS -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
-  libc_cv_asm_cfi_directives=yes
-else
-  libc_cv_asm_cfi_directives=no
-fi
-rm -f conftest*])
-if test $libc_cv_asm_cfi_directives = yes; then
-  AC_DEFINE(HAVE_ASM_CFI_DIRECTIVES)
-fi
-
 AC_CACHE_CHECK(for ld --no-whole-archive, libc_cv_ld_no_whole_archive, [dnl
 cat > conftest.c <<\EOF
 _start () {}