This is the mail archive of the gcc-patches@gcc.gnu.org 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]

tilde in libtool arguments


This merges in part of a patch that's in libtool-1.5.2.  It permits
you to build GCC without libjava in a directory that has a tilde in
its name.

To make this work for libjava, you need to:

- Convert everything that uses libtool to autoconf 2.57, since 
  later libtools don't support earlier autoconf.
- Upgrade everything, especially including libltdl, to an
  as-yet-unreleased version of libtool (probably 1.5.3).

I've already checked that this does work in a directory with ~ and
with --enable-languages=c,c++,objc.  Now I'm checking a full bootstrap
in a directory without ~; if that works, I'll commit.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-libtooltilde-2.patch==================
2004-02-04  Geoffrey Keating  <geoffk@apple.com>

	Partial merge from upstream:
	* ltmain.in: When setting IFS to '~', be careful about user
	arguments that contain '~'.

Index: ltmain.sh
===================================================================
RCS file: /cvs/gcc/gcc/ltmain.sh,v
retrieving revision 1.22
diff -u -p -u -p -r1.22 ltmain.sh
--- ltmain.sh	19 Nov 2003 05:29:32 -0000	1.22
+++ ltmain.sh	4 Feb 2004 23:09:47 -0000
@@ -2106,9 +2106,10 @@ EOF
 	    else
 	      $show "extracting exported symbol list from \`$soname'"
 	      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	      eval cmds=\"$extract_expsyms_cmds\"
+	      cmds=$extract_expsyms_cmds
 	      for cmd in $cmds; do
 		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
 		$show "$cmd"
 		$run eval "$cmd" || exit $?
 	      done
@@ -2119,9 +2120,10 @@ EOF
 	    if test -f "$output_objdir/$newlib"; then :; else
 	      $show "generating import library for \`$soname'"
 	      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
-	      eval cmds=\"$old_archive_from_expsyms_cmds\"
+	      cmds=$old_archive_from_expsyms_cmds
 	      for cmd in $cmds; do
 		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
 		$show "$cmd"
 		$run eval "$cmd" || exit $?
 	      done
@@ -3249,11 +3251,13 @@ EOF
 
 	# Do each of the archive commands.
 	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	  eval cmds=\"$archive_expsym_cmds\"
+	  eval test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
 	else
-	  eval cmds=\"$archive_cmds\"
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
 	fi
-        if len=`expr "X$cmds" : ".*"` &&
+        if len=`expr "X$test_cmds" : ".*"` &&
            test $len -le $max_cmd_len; then
           :
         else
@@ -3329,6 +3333,7 @@ EOF
           IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
           for cmd in $concat_cmds; do
             IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
             $show "$cmd"
             $run eval "$cmd" || exit $?
           done
@@ -3346,9 +3351,9 @@ EOF
 
 	  # Do each of the archive commands.
           if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-            eval cmds=\"$archive_expsym_cmds\"
-          else
-            eval cmds=\"$archive_cmds\"
+	    cmds=$archive_expsym_cmds
+	  else
+	    cmds=$archive_cmds
           fi
 
 	  # Append the command to remove the reloadable object files
@@ -3358,6 +3363,7 @@ EOF
         IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
         for cmd in $cmds; do
           IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
           $show "$cmd"
           $run eval "$cmd" || exit $?
         done
============================================================


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