Patchwork libgo patch committed: Don't use AC_PREPROC_IFELSE

login
register
mail settings
Submitter Ian Taylor
Date Feb. 10, 2011, 11:43 p.m.
Message ID <mcrzkq3h2vi.fsf@google.com>
Download mbox | patch
Permalink /patch/82695/
State New
Headers show

Comments

Ian Taylor - Feb. 10, 2011, 11:43 p.m.
It turns out that target library configure scripts can not reliably use
AC_PREPROC_IFELSE, because it uses CPP and the top level gcc Makefile
does not pass down CPP as required in a cross-compiler configuration.
This isn't a big deal as AC_PREPROC_IFELSE is rarely useful.  I fixed
the libgo configure script to use AC_COMPILE_IFELSE instead.
Bootstrapped on x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

Patch

diff -r 237ed2271926 libgo/configure.ac
--- a/libgo/configure.ac	Thu Feb 10 15:36:52 2011 -0800
+++ b/libgo/configure.ac	Thu Feb 10 15:40:31 2011 -0800
@@ -152,7 +152,7 @@ 
 changequote(,)dnl
   i[34567]86-*-* | x86_64-*-*)
 changequote([,])dnl
-    AC_PREPROC_IFELSE([
+    AC_COMPILE_IFELSE([
 #ifdef __x86_64__
 #error 64-bit
 #endif],
@@ -168,7 +168,7 @@ 
     GOARCH=m68k
     ;;
   mips*-*-*)
-    AC_PREPROC_IFELSE([
+    AC_COMPILE_IFELSE([
 #ifdef __mips64
 #error 64-bit
 #endif],
@@ -180,7 +180,7 @@ 
     fi
     ;;
   rs6000*-*-* | powerpc*-*-*)
-    AC_PREPROC_IFELSE([
+    AC_COMPILE_IFELSE([
 #ifdef _ARCH_PPC64
 #error 64-bit
 #endif],
@@ -192,7 +192,7 @@ 
     fi
     ;;
   sparc*-*-*)
-    AC_PREPROC_IFELSE([
+    AC_COMPILE_IFELSE([
 #if defined(__sparcv9) || defined(__arch64__)
 #error 64-bit
 #endif],