This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [PATCH] Report LTO phase in lto1 process name v2

On Thu, Oct 07, 2010 at 02:40:20AM -0400, DJ Delorie wrote:
> > Can someone with more autoconf experience please suggest a way
> > to fix this?
> Try a link test instead of a run test.
> Note that the cross compile check will also check for cross-building a
> native.

Ok that seems to work here.  Ryan, can you please confirm that the patch fixes 
your problem?



Subject: [PATCH] Turn PR_SET_NAME check into link check

Fixes cross compilation for libiberty after my change


2010-10-07  Andi Kleen <>

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

diff --git a/libiberty/configure b/libiberty/configure
index 7ff7792..7579000 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -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; }
-  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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/prctl.h>
@@ -5723,15 +5720,13 @@ int main()
-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
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 case "${host}" in
   *-*-cygwin* | *-*-mingw*)
diff --git a/libiberty/ b/libiberty/
index 8b7be18..73ea6c9 100644
--- a/libiberty/
+++ b/libiberty/
@@ -536,7 +536,7 @@ AC_SUBST(CHECK)
 # check for prctl PR_SET_NAME
 #include <sys/prctl.h>
 int main()

-- -- Speaking for myself only.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]