This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: PR libjava/3207: Ignore _AC_ARG_VAR_PRECIOUS


H. J. Lu wrote:
Both libstdc++ and libjava have the same kludge to ignore
_AC_ARG_VAR_PRECIOUS to make sure that CC, CFLAGS, CXX, CXXFLAGS
and LDFLAG won't be 'precious' to support multilibs. However,
the new libtool makes the kludge ineffective. As the result,
CXX and CXXFLAGS in libjava are 'precious' and libjava won't build
since the new libtool was introduced:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32078

There's another solution, which is to copy confsubdir.m4 to config and regenerate libjava's Makefile.in files. This is only needed in libjava, because it's the only directory which uses AC_CONFIG_SUBDIRS.


This is what I did with this patch. I couldn't convince aclocal to pick up confsubdir.m4 automatically, so I am including it manually.

The patch includes the regeneration of configure to show the differences between the two. Please confirm it fixes the issue and close the PR if so.

Paolo
2007-05-27  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/32078
	* configure.ac: Include confsubdir.m4.
	* configure: Regenerate.

Index: configure.ac
===================================================================
--- configure.ac	(revision 125123)
+++ configure.ac	(working copy)
@@ -450,6 +450,7 @@ AC_PROG_LIBTOOL
 AM_PROG_GCJ
 AM_PROG_CC_C_O
 
+m4_include([../config/confsubdir.m4])
 AC_CONFIG_SUBDIRS(classpath libltdl)
 
 # The -no-testsuite modules omit the test subdir.
Index: configure
===================================================================
--- configure	(revision 125123)
+++ configure	(working copy)
@@ -18291,6 +18291,19 @@ fi
 
 
 
+
+
+
+
+# _AC_OUTPUT_SUBDIRS
+# ------------------
+# This is a subroutine of AC_OUTPUT, but it does not go into
+# config.status, rather, it is called after running config.status.
+# _AC_OUTPUT_SUBDIRS
+
+
+
+
 subdirs="$subdirs classpath libltdl"
 
 
@@ -18497,7 +18510,7 @@ if test "${enable_sjlj_exceptions+set}" 
   :
 else
   cat > conftest.$ac_ext << EOF
-#line 18500 "configure"
+#line 18513 "configure"
 struct S { ~S(); };
 void bar();
 void foo()
@@ -30998,14 +31011,17 @@ if test "$no_create" != yes; then
 fi
 
 #
-# CONFIG_SUBDIRS section.
+# CONFIG_SUBDIRS section, as fixed in confsubdir.m4.
 #
 if test "$no_recursion" != yes; then
 
   # Remove --cache-file and --srcdir arguments so they do not pile up.
   ac_sub_configure_args=
   ac_prev=
-  for ac_arg in $ac_configure_args; do
+  eval "set x $ac_configure_args"
+  shift
+  for ac_arg
+  do
     if test -n "$ac_prev"; then
       ac_prev=
       continue
@@ -31028,20 +31044,28 @@ if test "$no_recursion" != yes; then
       ac_prev=prefix ;;
     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
       ;;
-    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
+    *)
+      case $ac_arg in
+      *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      esac
+      ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
     esac
   done
 
   # Always prepend --prefix to ensure using the same prefix
   # in subdir configurations.
-  ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args"
+  ac_arg="--prefix=$prefix"
+  case $ac_arg in
+  *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+  esac
+  ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
 
   ac_popdir=`pwd`
   for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
 
     # Do not complain, so a configure script can configure whichever
     # parts of a large source tree are present.
-    test -d $srcdir/$ac_dir || continue
+    test -d "$srcdir/$ac_dir" || continue
 
     { echo "$as_me:$LINENO: configuring in $ac_dir" >&5
 echo "$as_me: configuring in $ac_dir" >&6;}
@@ -31136,15 +31160,16 @@ case $ac_abs_builddir in
 esac
 
 
-    cd $ac_dir
+    cd "$ac_dir"
 
     # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_srcdir/configure.gnu; then
-      ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'"
-    elif test -f $ac_srcdir/configure; then
-      ac_sub_configure="$SHELL '$ac_srcdir/configure'"
-    elif test -f $ac_srcdir/configure.in; then
-      ac_sub_configure=$ac_configure
+    if test -f "$ac_srcdir/configure.gnu"; then
+      ac_sub_configure=$ac_srcdir/configure.gnu
+    elif test -f "$ac_srcdir/configure"; then
+      ac_sub_configure=$ac_srcdir/configure
+    elif test -f "$ac_srcdir/configure.in"; then
+      # This should be Cygnus configure.
+      ac_sub_configure=$ac_aux_dir/configure
     else
       { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5
 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
@@ -31160,17 +31185,17 @@ echo "$as_me: WARNING: no configuration 
 	ac_sub_cache_file=$ac_top_builddir$cache_file ;;
       esac
 
-      { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
-echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+      { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
       # The eval makes quoting arguments work.
-      eval $ac_sub_configure $ac_sub_configure_args \
-	   --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir ||
+      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
 	{ { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5
 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;}
    { (exit 1); exit 1; }; }
     fi
 
-    cd $ac_popdir
+    cd "$ac_popdir"
   done
 fi
 

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