[PATCH/RFC] Convert gcc subdir to autoconf 2.5x, now!

Nathanael Nerode neroden@twcny.rr.com
Thu Dec 4 20:27:00 GMT 2003


This updates the GCC directory to use autoconf 2.57 (or 2.58 for that matter;
I welcome advice as to the most appropriate prerequisite version).

I've got this giving precisely the same results as the old 2.13-based
scripts on i686-pc-linux-gnu, barring autogenerated comments.
(I believe that cross, canadian cross, crossback, cross-built natives should
suffer no special regressions because I dealt with those problems months ago.)

However, that isn't the only platform, of course.  :-)  If other people
could please try doing this on their platforms, and report back any
regressions in the contents of auto-host.h or any other output files, it
would be much appreciated.  (I'm only looking for specific configurations
where the 2.13-built scripts and the 2.5x built scripts give substantaively
different outputs.)

This is potentially dangerous.  But I think it's fairly safe at this point,
given the level of testing and debugging which has gone into it; and it
will enable the cleanup of various other things, including more than a few
bug fixes.  So I'd like to propose it for 3.4.


These changes are absolutely necessary for 2.5x, and are 2.13 incompatible;
I have already made all the changes I could find which are OK both ways.

	* configure.in: Make minimum necessary changes for autoconf 2.5x.
	* aclocal.m4: Make minimum necessary changes for autoconf 2.5x.
	* configure: Regenerate with autoconf 2.58.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.754
diff -u -r1.754 configure.in
--- configure.in	4 Dec 2003 20:09:13 -0000	1.754
+++ configure.in	4 Dec 2003 20:16:52 -0000
@@ -25,7 +25,7 @@
 # Initialization and sanity checks
 # --------------------------------
 
-AC_PREREQ(2.13)
+AC_PREREQ(2.57)
 AC_INIT(tree.c)
 AC_CONFIG_HEADER(auto-host.h:config.in)
 
@@ -1959,15 +1959,16 @@
 	.byte	0x4
 	.4byte	.L1-.LFB1
 .LEFDE1:],
-[  cat > conftest.lit <<EOF
+[  dnl # For autoconf 2.5x, must protect trailing spaces with @&t@.
+cat > conftest.lit <<EOF
  0000 10000000 00000000 017a0001 781a0004  .........z..x...
  0010 01000000 12000000 18000000 00000000  ................
- 0020 08000000 04080000 0044               .........D      
+ 0020 08000000 04080000 0044               .........D      @&t@
 EOF
-  cat > conftest.big <<EOF
+cat > conftest.big <<EOF
  0000 00000010 00000000 017a0001 781a0004  .........z..x...
  0010 00000001 00000012 00000018 00000000  ................
- 0020 00000008 04000000 0844               .........D      
+ 0020 00000008 04000000 0844               .........D      @&t@
 EOF
   # If the assembler didn't choke, and we can objdump,
   # and we got the correct data, then succeed.
Index: aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/gcc/aclocal.m4,v
retrieving revision 1.83
diff -u -r1.83 aclocal.m4
--- aclocal.m4	3 Dec 2003 16:48:08 -0000	1.83
+++ aclocal.m4	4 Dec 2003 20:16:53 -0000
@@ -753,7 +753,7 @@
   if test $in_tree_gas = yes; then
     gcc_GAS_VERSION_GTE_IFELSE($3, [[$2]=yes])
   el])if test x$gcc_cv_as != x; then
-    echo ifelse(substr([$5],0,1),[$], "[$5]", '[$5]') > conftest.s
+    echo ifelse(m4_substr([$5],0,1),[$], "[$5]", '[$5]') > conftest.s
     if AC_TRY_COMMAND([$gcc_cv_as $4 -o conftest.o conftest.s >&AC_FD_CC])
     then
 	ifelse([$6],, [$2]=yes, [$6])

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html



More information about the Gcc-patches mailing list