Work around ld --help change and avoid -z relro test completely if the
authordrepper <drepper>
Thu, 2 Nov 2006 18:34:30 +0000 (18:34 +0000)
committerdrepper <drepper>
Thu, 2 Nov 2006 18:34:30 +0000 (18:34 +0000)
architecture doesn't care about security.

configure.in

index 5cb3035..71ceb04 100644 (file)
@@ -1436,26 +1436,26 @@ EOF
   fi
   rm -f conftest*])
 
-  AC_CACHE_CHECK(for -z relro option,
-                libc_cv_z_relro, [dnl
+  case "$base_machine" in
+changequote(,)dnl
+    i[34567]86 | x86_64 | powerpc* | s390* | sparc* | alpha*)
+changequote([,])dnl
+      AC_CACHE_CHECK(for -z relro option,
+                    libc_cv_z_relro, [dnl
   libc_cv_z_relro=no
   if AC_TRY_COMMAND([${CC-cc} -v --help 2>&1|grep "z relro" 1>&AS_MESSAGE_LOG_FD])
   then
     if AC_TRY_COMMAND([${CC-cc} -Wl,--verbose 2>&1|grep DATA_SEGMENT_RELRO_END 1>&AS_MESSAGE_LOG_FD])
     then
       libc_cv_z_relro=yes
-    else
-changequote(,)dnl
-      case "$base_machine" in
-        i[34567]86 | x86_64 | powerpc* | s390* | sparc* | alpha*) ;;
-       *) libc_cv_z_relro="not required" ;;
-      esac
-changequote([,])dnl
     fi
   fi])
-  if test "$libc_cv_z_relro" = no; then
-    AC_MSG_ERROR(linker with -z relro support required)
-  fi
+      if test "$libc_cv_z_relro" = no; then
+        AC_MSG_ERROR(linker with -z relro support required)
+      fi
+      ;;
+    *) ;;
+   esac
 
   AC_CACHE_CHECK(for -Bgroup option,
                 libc_cv_Bgroup, [dnl