]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Turn PR_SET_NAME check into link check
authorAndi Kleen <ak@linux.intel.com>
Thu, 7 Oct 2010 09:34:50 +0000 (09:34 +0000)
committerAndi Kleen <ak@gcc.gnu.org>
Thu, 7 Oct 2010 09:34:50 +0000 (09:34 +0000)
Fixes cross compilation for libiberty after my change

libiberty/

2010-10-07  Andi Kleen <ak@linux.intel.com>

* configure: Regenerate.
* configure.ac: Turn PR_SET_NAME check into link check.

From-SVN: r165086

libiberty/ChangeLog
libiberty/configure
libiberty/configure.ac

index 931697500e7075e2be80443a8ca15779c0787146..8c9a79f87c32baf892ff1612a9c545795fde99a1 100644 (file)
@@ -1,3 +1,8 @@
+2010-10-07  Andi Kleen <ak@linux.intel.com>
+
+       * configure: Regenerate.
+       * configure.ac: Turn PR_SET_NAME check into link check.
+
 2010-10-06  Andi Kleen <ak@linux.intel.com>
 
        * Makefile.in (CFILES): Add setproctitle.
index 7ff7792440e50a504c765498e77eac9bc8bd69a9..7579000f96e3bae29ed107fcfab2b32cdd14344e 100755 (executable)
@@ -5707,13 +5707,10 @@ fi
 
 
 # check for prctl PR_SET_NAME
-if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+if test x$gcc_no_link = xyes; then
+  as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+fi
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/prctl.h>
@@ -5723,15 +5720,13 @@ int main()
 }
 
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
 
 $as_echo "#define HAVE_PRCTL_SET_NAME 1" >>confdefs.h
 
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
 case "${host}" in
   *-*-cygwin* | *-*-mingw*)
index 8b7be1835f4e7b114fff19dad72d273ece609c92..73ea6c96fcce441828bafe8cd7b6f0b4f39112ce 100644 (file)
@@ -536,7 +536,7 @@ AC_SUBST(CHECK)
 AC_SUBST(target_header_dir)
 
 # check for prctl PR_SET_NAME
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
 #include <sys/prctl.h>
 int main()
 {