public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Factor configure-time gcc version checks (patch 1/4 for PR 7305)
@ 2004-11-25 20:47 Richard Sandiford
  2004-11-25 20:50 ` Remove config.if (patch 2/4 " Richard Sandiford
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Richard Sandiford @ 2004-11-25 20:47 UTC (permalink / raw)
  To: gcc-patches; +Cc: java-patches, libstdc++, binutils, gdb-patches

[Sorry for the wide distribution, but this patch affects top-level stuff,
C++ and libjava.]

This patch adds a new top-level configure fragment, config/gcc-version.m4,
to work out gcc's version number.  Although it's really the first of four
patches to change where libjava installs its header files, I hope it's
worthwhile as a clean-up in its own right.

To describe the wider objective:

At the moment, libjava installs its header files into $prefix/include.
This causes two problems:

  (1) You can't install two different versions into the same tree.
      This is PR 7305: http://gcc.gnu.org/PR7305

  (2) Cross compilers (quite rightly) don't look in $prefix/include,
      so any attempt to use CNI headers will fail without an explicit
      -I option: http://gcc.gnu.org/ml/java/2003-04/msg00243.html

This was discussed at length in the thread starting here:

    http://gcc.gnu.org/ml/gcc/2003-05/msg00319.html

and it seemed that both the libstdc++ and java maintainers were happy
with installing the CNI headers into the same directory as libstdc++.
The (very few) C-compatible java headers can go into the usual
tool-specific include directory instead.

It's easy enough to change the install rules.  I think the thorny bit
isn't so much that as teaching libjava where the g++ include path is.

The easy way would be to cut-&-paste the logic that can be found in
other configure scripts.  Thing is, we already have three pieces of
code to work out the g++ include path: one in top-level ./configure,
one in gcc/configure, and one in libstdc++-v3/configure.  I didn't
really want to add a fourth.

This series of patches instead adds a new config/gxx-include-dir.m4
fragment that can be shared between configure scripts.  To avoid
getting too sidetracked, the patches will only make ./configure and
libjava/configure use this new fragment, so while there'll be no net
increase in duplication, there'll unfortunately be no net reduction
either.

Writing config/gxx-include-dir.m4 is made slightly tricky by the fact
that it needs to know the gcc version number.  At the moment, there are
lots of copies of the code to work this out, and if we're going to have
a common fragment for $gxx_include_dir, it would make sense to have a
common fragment for the version number as well.

Also, the top-level and gcc/ versions of the $gxx_include_dir logic
use config.if to work out $libstdcxx_incdir.  All config.if really
does is work out the gcc version and then tack "c++/" in front of it.
Once we have a common fragment to work out the gcc version number,
config.if will serve no useful purpose.

So... the four patches are as follows:

  (1) Provide a config/gcc-version.m4 fragment to work out
      $gcc_version_trigger, $gcc_version_full and $gcc_version.

  (2) Remove config.if.

  (3) Provide a config/gxx-include-dir.m4 fragment and use it
      in the top-level configuration file.

  (4) The main libjava patch.

Part (1) is attached below.  The logic used in the new autoconf fragment
is mostly taken from config.if.

Patch bootstrapped & regression tested (on its own) on i686-pc-linux-gnu.
I also checked that:

  - The top-level configure gets the right version and version trigger.

  - The top-level makefile still passes --with-gcc-version-trigger
    down to subconfigures.

  - The subconfigures correctly read --with-gcc-version-trigger
    and record the right version number.

  - There's no change in the version numbers for installed paths.

OK to install?

Richard

	* configure.in: Include config/gcc-version.m4.  Use TL_AC_GCC_VERSION
	to set gcc_version_trigger.  Remove some now-redundant AC_SUBSTs.
	* configure: Regenerate.

config/
	* config/gcc-version.m4: New file.

fastjar/
	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
	* configure, aclocal.m4, Makefile.in: Regenerate.

fixincludes/
	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
	* aclocal.m4: Include ../config/gcc-version.m4.
	* configure: Regenerate.

gcc/
	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.  Remove
	now-redundant AC_SUBSTs.
	* aclocal.m4: Include ../config/gcc-version.m4.
	* configure: Regenerate.

libffi/
	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
	* configure, aclocal.m4, Makefile.in: Regenerate.
	* include/Makefile.in, testsuite/Makefile.in: Regenerate.

libgfortran/
	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
	* configure, aclocal.m4, Makefile.in: Regenerate.

libjava/
	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
	* configure, aclocal.m4, Makefile.in, gcj/Makefile.in: Regenerate.
	* include/Makefile.in, testsuite/Makefile.in: Regenerate.

libmudflap/
	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
	* configure, aclocal.m4, Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libobjc/
	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
	* configure, aclocal.m4: Regenerate.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.332
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.332 configure.in
*** configure.in	12 Nov 2004 19:15:21 -0000	1.332
--- configure.in	25 Nov 2004 20:19:55 -0000
***************
*** 19,24 ****
--- 19,25 ----
  ### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
  
  sinclude(config/acx.m4)
+ sinclude(config/gcc-version.m4)
  
  AC_INIT(move-if-change)
  AC_PREREQ(2.13)
*************** fi
*** 98,122 ****
  topsrcdir=$srcpwd
  
  extra_host_args=
  # Define the trigger file to make sure configure will re-run whenever
  # the gcc version number changes.
! if test "${with_gcc_version_trigger+set}" = set ; then
!   gcc_version_trigger="$with_gcc_version_trigger"
!   gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
! else
!   # If gcc's sources are available, define the trigger file.
!   if test -f ${topsrcdir}/gcc/version.c ; then
!     gcc_version_trigger=${topsrcdir}/gcc/version.c
!     gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
!     case "$ac_configure_args" in
!       *--with-gcc-version-trigger=$gcc_version_trigger* )
!         ;;
!       * )
!         # Add to all subconfigure arguments: build, host, and target.
!         ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
!         ;;
!     esac
!   fi
  fi
  
  ### To add a new directory to the tree, first choose whether it is a target
--- 99,117 ----
  topsrcdir=$srcpwd
  
  extra_host_args=
+ 
  # Define the trigger file to make sure configure will re-run whenever
  # the gcc version number changes.
! TL_AC_GCC_VERSION([$topsrcdir])
! if test -f $gcc_version_trigger ; then
!   case "$ac_configure_args" in
!     *--with-gcc-version-trigger=$gcc_version_trigger* )
!       ;;
!     * )
!       # Add to all subconfigure arguments: build, host, and target.
!       ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
!       ;;
!   esac
  fi
  
  ### To add a new directory to the tree, first choose whether it is a target
*************** AC_SUBST(SET_LIB_PATH)
*** 2154,2161 ****
  AC_SUBST(RPATH_ENVVAR)
  AC_SUBST(BUILD_PREFIX)
  AC_SUBST(BUILD_PREFIX_1)
- AC_SUBST(gcc_version_trigger)
- AC_SUBST(gcc_version)
  AC_SUBST(tooldir)
  AC_SUBST(build_tooldir)
  AC_SUBST(GDB_TK)
--- 2149,2154 ----
Index: fastjar/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/fastjar/configure.ac,v
retrieving revision 1.5
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.5 configure.ac
*** fastjar/configure.ac	19 Jul 2004 20:08:20 -0000	1.5
--- fastjar/configure.ac	25 Nov 2004 20:19:55 -0000
*************** AC_MSG_CHECKING([whether to place genera
*** 89,104 ****
  AC_MSG_RESULT($generated_files_in_srcdir)
  AM_CONDITIONAL(GENINSRC, test x$generated_files_in_srcdir = xyes)
  
! # Get the version trigger filename from the toplevel
! if test "${with_gcc_version_trigger+set}" = set; then
!    gcc_version_trigger=$with_gcc_version_trigger
! else
!    gcc_version_trigger=${srcdir}/version.c
! fi
! changequote(,)dnl
! gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
! gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
! changequote([,])dnl
! AC_SUBST(gcc_version)
  
  AC_OUTPUT(Makefile install-defs.sh)
--- 89,94 ----
  AC_MSG_RESULT($generated_files_in_srcdir)
  AM_CONDITIONAL(GENINSRC, test x$generated_files_in_srcdir = xyes)
  
! TL_AC_GCC_VERSION([$srcdir/..])
  
  AC_OUTPUT(Makefile install-defs.sh)
Index: fixincludes/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/fixincludes/configure.ac,v
retrieving revision 1.4
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.4 configure.ac
*** fixincludes/configure.ac	5 Nov 2004 04:48:32 -0000	1.4
--- fixincludes/configure.ac	25 Nov 2004 20:19:55 -0000
*************** if test $TARGET = twoprocess; then
*** 52,62 ****
  		  [Define if testing and fixing are done by separate process])
  fi
  
! # Get GCC's version number.
! changequote(,)dnl
! gcc_version=`sed -n '/version_string/ { s/.*"\([^ "]*\)[^"]*".*/\1/p ; }' ${srcdir}/../gcc/version.c`
! changequote([,])dnl
! AC_SUBST(gcc_version)
  
  case $host in
  	vax-dec-bsd* )
--- 52,58 ----
  		  [Define if testing and fixing are done by separate process])
  fi
  
! TL_AC_GCC_VERSION([$srcdir/..])
  
  case $host in
  	vax-dec-bsd* )
Index: fixincludes/aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/fixincludes/aclocal.m4,v
retrieving revision 1.1
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.1 aclocal.m4
*** fixincludes/aclocal.m4	31 Aug 2004 09:26:05 -0000	1.1
--- fixincludes/aclocal.m4	25 Nov 2004 20:19:56 -0000
***************
*** 1,5 ****
--- 1,6 ----
  sinclude(../config/acx.m4)
  sinclude(../config/accross.m4)
+ sinclude(../config/gcc-version.m4)
  sinclude(../config/gettext.m4)
  sinclude(../config/progtest.m4)
  
Index: gcc/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.85
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r2.85 configure.ac
*** gcc/configure.ac	25 Nov 2004 01:41:20 -0000	2.85
--- gcc/configure.ac	25 Nov 2004 20:20:00 -0000
*************** xm_file="ansidecl.h ${xm_file}"
*** 1379,1394 ****
  # UNSORTED
  # --------
  
! # Get the version trigger filename from the toplevel
! if test "${with_gcc_version_trigger+set}" = set; then
! 	gcc_version_trigger=$with_gcc_version_trigger
! else
! 	gcc_version_trigger=${srcdir}/version.c
! fi
! changequote(,)dnl
! gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
! gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
  
  # Compile in configure arguments.
  if test -f configargs.h ; then
  	# Being re-configured.
--- 1379,1387 ----
  # UNSORTED
  # --------
  
! TL_AC_GCC_VERSION([$srcdir/..])
  
+ changequote(,)dnl
  # Compile in configure arguments.
  if test -f configargs.h ; then
  	# Being re-configured.
*************** AC_SUBST(float_h_file)
*** 3237,3245 ****
  AC_SUBST(gcc_config_arguments)
  AC_SUBST(gcc_gxx_include_dir)
  AC_SUBST(libstdcxx_incdir)
- AC_SUBST(gcc_version)
- AC_SUBST(gcc_version_full)
- AC_SUBST(gcc_version_trigger)
  AC_SUBST(host_exeext)
  AC_SUBST(host_xm_file_list)
  AC_SUBST(host_xm_include_list)
--- 3230,3235 ----
Index: gcc/aclocal.m4
===================================================================
RCS file: /cvs/gcc/gcc/gcc/aclocal.m4,v
retrieving revision 1.99
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.99 aclocal.m4
*** gcc/aclocal.m4	20 Oct 2004 21:36:40 -0000	1.99
--- gcc/aclocal.m4	25 Nov 2004 20:20:00 -0000
*************** m4_include([../config/accross.m4])
*** 2,7 ****
--- 2,8 ----
  m4_include([../config/acx.m4])
  m4_include([../config/gettext-sister.m4])
  m4_include([../config/gcc-lib-path.m4])
+ m4_include([../config/gcc-version.m4])
  m4_include([../config/iconv.m4])
  m4_include([../config/lcmessage.m4])
  m4_include([../config/lib-ld.m4])
Index: libffi/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libffi/configure.ac,v
retrieving revision 1.8
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.8 configure.ac
*** libffi/configure.ac	13 Oct 2004 17:20:23 -0000	1.8
--- libffi/configure.ac	25 Nov 2004 20:20:01 -0000
*************** esac
*** 226,241 ****
  AC_SUBST(toolexecdir)
  AC_SUBST(toolexeclibdir)
  
  #Figure out where generated headers like ffitarget.h get installed.
- changequote(,)dnl
- gcc_version_trigger=${srcdir}/../gcc/version.c
- gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
- gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
  tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include
- changequote([,])dnl
  AC_SUBST(tool_include_dir)
- AC_SUBST(gcc_version)
- 
  
  if test "${multilib}" = "yes"; then
    multilib_arg="--enable-multilib"
--- 226,236 ----
  AC_SUBST(toolexecdir)
  AC_SUBST(toolexeclibdir)
  
+ TL_AC_GCC_VERSION([$srcdir/..])
+ 
  #Figure out where generated headers like ffitarget.h get installed.
  tool_include_dir='$(libdir)/gcc/$(target_alias)/'${gcc_version}/include
  AC_SUBST(tool_include_dir)
  
  if test "${multilib}" = "yes"; then
    multilib_arg="--enable-multilib"
Index: libgfortran/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/configure.ac,v
retrieving revision 1.16
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.16 configure.ac
*** libgfortran/configure.ac	23 Nov 2004 02:02:37 -0000	1.16
--- libgfortran/configure.ac	25 Nov 2004 20:20:02 -0000
*************** else
*** 68,78 ****
    LIBGFOR_IS_NATIVE=true
  fi
  
! # Process the option "--enable-version-specific-runtime-libs"
! gcc_version_trigger=${srcdir}/../gcc/version.c
! gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
! gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
! AC_SUBST(gcc_version)
  
  # Calculate toolexeclibdir
  # Also toolexecdir, though it's only used in toolexeclibdir
--- 68,74 ----
    LIBGFOR_IS_NATIVE=true
  fi
  
! TL_AC_GCC_VERSION([$srcdir/..])
  
  # Calculate toolexeclibdir
  # Also toolexecdir, though it's only used in toolexeclibdir
Index: libjava/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.ac,v
retrieving revision 1.14
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.14 configure.ac
*** libjava/configure.ac	25 Nov 2004 03:46:56 -0000	1.14
--- libjava/configure.ac	25 Nov 2004 20:20:03 -0000
*************** AM_CONDITIONAL(USING_GCC, test "$GCC" = 
*** 730,742 ****
  # We're in the tree with gcc, and need to include some of its headers.
  GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
  
  # Figure out where generated headers like libgcj-config.h get installed.
- gcc_version_trigger=${libgcj_basedir}/../gcc/version.c
- gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^\"]]*\)\".*/\1/'`
- gcc_version=`echo ${gcc_version_full} | sed -e 's/\([[^ ]]*\) .*/\1/'`
  tool_include_dir='$(libdir)/gcc/$(target_noncanonical)/'${gcc_version}/include
  AC_SUBST(tool_include_dir)
- AC_SUBST(gcc_version)
  
  if test "x${with_newlib}" = "xyes"; then
     # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
--- 730,740 ----
  # We're in the tree with gcc, and need to include some of its headers.
  GCC_UNWIND_INCLUDE='-I$(libgcj_basedir)/../gcc'
  
+ TL_AC_GCC_VERSION([$srcdir/..])
+ 
  # Figure out where generated headers like libgcj-config.h get installed.
  tool_include_dir='$(libdir)/gcc/$(target_noncanonical)/'${gcc_version}/include
  AC_SUBST(tool_include_dir)
  
  if test "x${with_newlib}" = "xyes"; then
     # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
Index: libmudflap/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libmudflap/configure.ac,v
retrieving revision 1.8
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.8 configure.ac
*** libmudflap/configure.ac	1 Nov 2004 21:27:26 -0000	1.8
--- libmudflap/configure.ac	25 Nov 2004 20:20:03 -0000
*************** AC_SUBST(build_libmudflapth)
*** 132,142 ****
  
  AC_CHECK_LIB(dl, dlsym)
  
! # Process the option "--enable-version-specific-runtime-libs"
! gcc_version_trigger=${srcdir}/../gcc/version.c
! gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
! gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
! AC_SUBST(gcc_version)
  
  # Calculate toolexeclibdir
  # Also toolexecdir, though it's only used in toolexeclibdir
--- 132,138 ----
  
  AC_CHECK_LIB(dl, dlsym)
  
! TL_AC_GCC_VERSION([$srcdir/..])
  
  # Calculate toolexeclibdir
  # Also toolexecdir, though it's only used in toolexeclibdir
Index: libobjc/configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/libobjc/configure.ac,v
retrieving revision 1.11
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.11 configure.ac
*** libobjc/configure.ac	20 Oct 2004 01:26:37 -0000	1.11
--- libobjc/configure.ac	25 Nov 2004 20:20:03 -0000
*************** case $srcdir in
*** 117,127 ****
  esac
  AC_SUBST(glibcpp_srcdir)
  
! # Process the option "--enable-version-specific-runtime-libs"
! gcc_version_trigger=${srcdir}/../gcc/version.c
! gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
! gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
! AC_SUBST(gcc_version)
  
  # Calculate toolexeclibdir
  # Also toolexecdir, though it's only used in toolexeclibdir
--- 117,123 ----
  esac
  AC_SUBST(glibcpp_srcdir)
  
! TL_AC_GCC_VERSION([$srcdir/..])
  
  # Calculate toolexeclibdir
  # Also toolexecdir, though it's only used in toolexeclibdir
diff -c /dev/null config/gcc-version.m4
*** /dev/null	2004-11-05 11:37:39.608355984 +0000
--- config/gcc-version.m4	2004-11-25 15:50:09.000000000 +0000
***************
*** 0 ****
--- 1,28 ----
+ dnl Usage: TL_AC_GCC_VERSION(TOPSRCDIR)
+ dnl
+ dnl Set up the variables:
+ dnl
+ dnl     gcc_version_trigger: pathname of gcc's version.c, if available
+ dnl     gcc_version_full: full gcc version string
+ dnl     gcc_version: the first "word" in $gcc_version_full
+ dnl
+ dnl TOPSRCDIR is the top-level source directory.
+ AC_DEFUN([TL_AC_GCC_VERSION],
+ [
+ changequote(,)dnl
+ if test "${with_gcc_version_trigger+set}" = set; then
+   gcc_version_trigger=$with_gcc_version_trigger
+ else
+   gcc_version_trigger=$1/gcc/version.c
+ fi
+ if test -f "${gcc_version_trigger}"; then
+   gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
+ else
+   gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
+ fi
+ gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
+ changequote([,])dnl
+ AC_SUBST(gcc_version_trigger)
+ AC_SUBST(gcc_version_full)
+ AC_SUBST(gcc_version)
+ ])dnl

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Remove config.if (patch 2/4 for PR 7305)
  2004-11-25 20:47 Factor configure-time gcc version checks (patch 1/4 for PR 7305) Richard Sandiford
@ 2004-11-25 20:50 ` Richard Sandiford
  2004-12-02 20:07   ` Alexandre Oliva
  2004-11-25 20:54 ` Add config/gxx-include-dir.m4 (patch 3/4 " Richard Sandiford
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Richard Sandiford @ 2004-11-25 20:50 UTC (permalink / raw)
  To: gcc-patches; +Cc: java-patches, libstdc++, binutils, gdb-patches

Following up from: http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02185.html
this patch replaces the two uses of config.if with a simple assignment.
It also removes all mention of config.if from src/.

Bootstrapped & regression tested on i686-pc-linux-gnu in combination
with patch 1.  I also checked the same things as before.  OK to install?

Richard


	* config.if: Delete.
	* configure.in: Set libstdcxx_incdir directly.
	* configure: Regenerate.

	* MAINTAINERS: Remove mention of config.if.
	* src-release (DEVO_SUPPORT): Remove config.if.

gcc/
	* configure.ac: Move TL_AC_GCC_VERSION into initialization section.
	Set libstdcxx_incdir directly.
	* configure: Regenerate.

binutils/
	* MAINTAINERS: Remove mention of config.if.

gdb/
	* README: Remove config.if from directory listing.

Index: config.if
===================================================================
RCS file: /cvs/gcc/gcc/config.if,v
retrieving revision 1.10
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.10 config.if
--- config.if	16 Jul 2003 06:34:53 -0000	1.10
+++ config.if	25 Nov 2004 16:09:01 -0000
@@ -1,37 +0,0 @@
-#! /dev/null
-# Don't call it directly. This shell script fragment is called to
-# determine:
-#
-#	1. libstcxx_incdir: the interface name for libstdc++.
-#
-
-# Get the top level src dir.
-if [ -z "${topsrcdir}" -a -z "${top_srcdir}" ]
-then
-  echo "Undefined top level src dir: topsrcdir and top_srcdir are empty" >&2
-  exit 1
-fi
-
-if [ -n "${topsrcdir}" ]
-then
-  if_topsrcdir=${topsrcdir}
-else
-  if_topsrcdir=${top_srcdir}
-fi
-
-# Set libstdcxx_incdir.
-# This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4. 
-if test -z "$gcc_version"; then
-  if test -z "${gcc_version_trigger}" \
-     && test -f ${if_topsrcdir}/gcc/version.c; then
-    gcc_version_trigger=${if_topsrcdir}/gcc/version.c
-  fi    
-  if test -f "${gcc_version_trigger}"; then
-    gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
-  else
-    gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
-  fi
-  gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
-fi
-libstdcxx_incdir=c++/${gcc_version}
-
--- configure.in.1	Thu Nov 25 15:30:25 2004
+++ configure.in	Thu Nov 25 15:36:35 2004
@@ -1972,7 +1972,7 @@ case "${with_gxx_include_dir}" in
     case "${enable_version_specific_runtime_libs}" in
       yes) gxx_include_dir='${libsubdir}/include/c++' ;;
       *)
-        . ${srcdir}/config.if
+	libstdcxx_incdir=c++/${gcc_version}
         gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
     esac ;;
   *) gxx_include_dir=${with_gxx_include_dir} ;;
--- gcc/configure.ac.1	Thu Nov 25 15:30:25 2004
+++ gcc/configure.ac	Thu Nov 25 15:38:39 2004
@@ -100,6 +100,8 @@ AC_MSG_ERROR([
 *** and run configure again.])
 fi
 
+TL_AC_GCC_VERSION([$srcdir/..])
+
 # -----------
 # Directories
 # -----------
@@ -137,7 +139,7 @@ if test x${gcc_gxx_include_dir} = x; the
   if test x${enable_version_specific_runtime_libs} = xyes; then
     gcc_gxx_include_dir='${libsubdir}/include/c++'
   else
-    topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
+    libstdcxx_incdir=c++/${gcc_version}
 changequote(<<, >>)dnl
     gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/"${libstdcxx_incdir}
 changequote([, ])dnl
@@ -1378,8 +1380,6 @@ xm_file="ansidecl.h ${xm_file}"
 # --------
 # UNSORTED
 # --------
-
-TL_AC_GCC_VERSION([$srcdir/..])
 
 changequote(,)dnl
 # Compile in configure arguments.
Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/MAINTAINERS,v
retrieving revision 1.26
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.26 MAINTAINERS
--- MAINTAINERS	9 Jun 2004 22:48:28 -0000	1.26
+++ MAINTAINERS	25 Nov 2004 16:09:04 -0000
@@ -96,7 +96,7 @@ winsup/
 	See also winsup/MAINTAINERS.
 
 config-ml.in; setup.com; missing; makefile.vms; utils/; config/;
-config.if; makefile.vms; missing; ylwrap; mkdep; etc/; install-sh; intl/
+makefile.vms; missing; ylwrap; mkdep; etc/; install-sh; intl/
 	Ask DJ Delorie <dj@redhat.com> after reading the libiberty entry.
 
 modules file
Index: src-release
===================================================================
RCS file: /cvs/src/src/src-release,v
retrieving revision 1.15
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.15 src-release
--- src-release	19 Oct 2004 18:52:04 -0000	1.15
+++ src-release	25 Nov 2004 16:09:05 -0000
@@ -44,7 +44,7 @@ PWD = $${PWDCMD-pwd}
 # ChangeLog omitted because it may refer to files which are not in this
 # distribution (perhaps it would be better to include it anyway).
 DEVO_SUPPORT= README Makefile.in configure configure.in \
-	config.guess config.if config.sub config move-if-change \
+	config.guess config.sub config move-if-change \
 	COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
 	mkinstalldirs ltconfig ltmain.sh missing ylwrap \
 	libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh \
Index: binutils/MAINTAINERS
===================================================================
RCS file: /cvs/src/src/binutils/MAINTAINERS,v
retrieving revision 1.76
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.76 MAINTAINERS
--- binutils/MAINTAINERS	2 Sep 2004 08:25:06 -0000	1.76
+++ binutils/MAINTAINERS	25 Nov 2004 16:09:05 -0000
@@ -22,8 +22,8 @@ top level config.guess and config.sub sc
   config-patches@gnu.org
 
 and not to the binutils lists.  Patches to the other top level
-configure files (configure, configure.in, config-if, config-ml.in)
-should be sent to the binutils lists, and copied to the gcc and gdb
+configure files (configure, configure.in, config-ml.in) should
+be sent to the binutils lists, and copied to the gcc and gdb
 lists as well (gcc-patches@gcc.gnu.org and
 gdb-patches@sources.redhat.com).
 
Index: gdb/README
===================================================================
RCS file: /cvs/src/src/gdb/README,v
retrieving revision 1.33
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.33 README
--- gdb/README	8 Nov 2004 15:55:49 -0000	1.33
+++ gdb/README	25 Nov 2004 16:09:05 -0000
@@ -32,14 +32,14 @@ order.
    When you unpack the gdb-6.3.tar.gz file, you'll find a directory
 called `gdb-6.3', which contains:
 
-  COPYING       config-ml.in  gdb          ltcf-gcj.sh     readline
-  COPYING.LIB   config.guess  gettext.m4   ltconfig        sim
-  Makefile.def  config.if     include      ltmain.sh       src-release
-  Makefile.in   config.sub    install-sh   md5.sum         symlink-tree
-  Makefile.tpl  configure     libiberty    missing         texinfo
-  README        configure.in  libtool.m4   mkinstalldirs   ylwrap
-  bfd           djunpack.bat  ltcf-c.sh    move-if-change
-  config        etc           ltcf-cxx.sh  opcodes
+  COPYING       config-ml.in  gettext.m4   ltconfig        sim
+  COPYING.LIB   config.guess  include      ltmain.sh       src-release
+  Makefile.def  config.sub    install-sh   md5.sum         symlink-tree
+  Makefile.in   configure     libiberty    missing         texinfo
+  Makefile.tpl  configure.in  libtool.m4   mkinstalldirs   ylwrap
+  README        djunpack.bat  ltcf-c.sh    move-if-change
+  bfd           etc           ltcf-cxx.sh  opcodes
+  config        gdb           ltcf-gcj.sh  readline
 
 You can build GDB right in the source directory:
 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Add config/gxx-include-dir.m4 (patch 3/4 for PR 7305)
  2004-11-25 20:47 Factor configure-time gcc version checks (patch 1/4 for PR 7305) Richard Sandiford
  2004-11-25 20:50 ` Remove config.if (patch 2/4 " Richard Sandiford
@ 2004-11-25 20:54 ` Richard Sandiford
  2004-12-02 20:07   ` Alexandre Oliva
  2004-11-25 21:05 ` Factor configure-time gcc version checks (patch 1/4 " Zack Weinberg
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 14+ messages in thread
From: Richard Sandiford @ 2004-11-25 20:54 UTC (permalink / raw)
  To: gcc-patches; +Cc: java-patches, libstdc++, binutils, gdb-patches

Following up from: http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02185.
this patch adds a new config/gxx-include-dir.m4 autoconf fragment
and uses it in the top-level configure script.

Bootstrapped & regression tested on i686-pc-linux-gnu in combination
with patches 1 and 2.  I also checked the same things as before.
OK to install?

Richard


	* configure.in: Include config/gxx-include-dir.m4.  Use
	TL_AC_GXX_INCLUDE_DIR.  Remove some now-redundant AC_SUBSTs.
	* configure: Regenerate.

config/
	* gxx-include-dir.m4: New file.

--- configure.in.2	Thu Nov 25 15:36:35 2004
+++ configure.in	Thu Nov 25 17:02:39 2004
@@ -20,6 +20,7 @@
 
 sinclude(config/acx.m4)
 sinclude(config/gcc-version.m4)
+sinclude(config/gxx-include-dir.m4)
 
 AC_INIT(move-if-change)
 AC_PREREQ(2.13)
@@ -1961,22 +1962,7 @@ fi
 target_configargs="--cache-file=./config.cache --host=${target_alias} --build=${build_alias} ${target_configargs}"
 
 # provide a proper gxx_include_dir.
-# Note, if you change the default, make sure to fix both here and in
-# the gcc and libstdc++-v3 subdirectories.
-# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
-case "${with_gxx_include_dir}" in
-  yes)
-    AC_MSG_ERROR([--with-gxx-include-dir=[[dir]] requires a directory])
-    ;;
-  no | "")
-    case "${enable_version_specific_runtime_libs}" in
-      yes) gxx_include_dir='${libsubdir}/include/c++' ;;
-      *)
-	libstdcxx_incdir=c++/${gcc_version}
-        gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
-    esac ;;
-  *) gxx_include_dir=${with_gxx_include_dir} ;;
-esac
+TL_AC_GXX_INCLUDE_DIR
 
 FLAGS_FOR_TARGET=
 case " $target_configdirs " in
@@ -2154,8 +2140,6 @@ AC_SUBST(gcc_version)
 AC_SUBST(tooldir)
 AC_SUBST(build_tooldir)
 AC_SUBST(GDB_TK)
-AC_SUBST(gxx_include_dir)
-AC_SUBST(libstdcxx_incdir)
 
 # Build module lists & subconfigure args.
 AC_SUBST(build_configargs)
diff -u /dev/null config/gxx-include-dir.m4
--- /dev/null	Fri Apr 23 00:21:55 2004
+++ config/gxx-include-dir.m4	Thu Nov 25 17:02:22 2004
@@ -0,0 +1,26 @@
+dnl Usage: TL_AC_GXX_INCLUDE_DIR
+dnl
+dnl Set $gxx_include_dir to the location of the installed C++ include
+dnl directory.  The value depends on $gcc_version and the configuration
+dnl options --with-gxx-include-dir and --enable-version-specific-runtime-libs.
+dnl
+dnl If you change the default here, you'll need to change the gcc and
+dnl libstdc++-v3 subdirectories too.
+AC_DEFUN([TL_AC_GXX_INCLUDE_DIR],
+[
+case "${with_gxx_include_dir}" in
+  yes)
+    AC_MSG_ERROR([--with-gxx-include-dir=[[dir]] requires a directory])
+    ;;
+  no | "")
+    case "${enable_version_specific_runtime_libs}" in
+      yes) gxx_include_dir='${libsubdir}/include/c++' ;;
+      *)
+	libstdcxx_incdir=c++/${gcc_version}
+	gxx_include_dir='${prefix}/include/'${libstdcxx_incdir} ;;
+    esac ;;
+  *) gxx_include_dir=${with_gxx_include_dir} ;;
+esac
+AC_SUBST(gxx_include_dir)
+AC_SUBST(libstdcxx_incdir)
+])

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Factor configure-time gcc version checks (patch 1/4 for PR 7305)
  2004-11-25 20:47 Factor configure-time gcc version checks (patch 1/4 for PR 7305) Richard Sandiford
  2004-11-25 20:50 ` Remove config.if (patch 2/4 " Richard Sandiford
  2004-11-25 20:54 ` Add config/gxx-include-dir.m4 (patch 3/4 " Richard Sandiford
@ 2004-11-25 21:05 ` Zack Weinberg
  2004-11-25 21:28   ` Joseph S. Myers
  2004-11-26  9:06   ` Richard Sandiford
  2004-11-26 10:37 ` Andrew Haley
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 14+ messages in thread
From: Zack Weinberg @ 2004-11-25 21:05 UTC (permalink / raw)
  To: Richard Sandiford
  Cc: gcc-patches, java-patches, libstdc++, binutils, gdb-patches


I think this is a fine idea (though I cannot approve it) and I would
like to encourage you also to break the version number proper and the
date stamp out of gcc/version.c.  If we could have two syntax-free
files somewhere (suggest config/gcc-version, config/gcc-datestamp)
that were parsed by everything that cares, then we could eliminate all
the remaining copies of those numbers, and people maintaining modified
versions of GCC wouldn't have merge conflicts in version.c every time
they updated from the official sources.  Oh, and it would be one fewer
reason for gcc/Makefile to rebuild everything after a cvs update.

By syntax-free I mean that these files should contain the literal text
3.4.2 and 20041124 (respectively, for example) and nothing else, so
that using them is as simple as

gcc version.c -c ... other flags ... \
  -DVERSION=`cat /path/to/source/config/gcc-version` \
  -DDATESTAMP=`cat /path/to/source/config/gcc-datestamp`

quotation being handled by macros inside version.c.

zw

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Factor configure-time gcc version checks (patch 1/4 for PR 7305)
  2004-11-25 21:05 ` Factor configure-time gcc version checks (patch 1/4 " Zack Weinberg
@ 2004-11-25 21:28   ` Joseph S. Myers
  2004-11-26 21:48     ` Zack Weinberg
  2004-11-26  9:06   ` Richard Sandiford
  1 sibling, 1 reply; 14+ messages in thread
From: Joseph S. Myers @ 2004-11-25 21:28 UTC (permalink / raw)
  To: Zack Weinberg
  Cc: Richard Sandiford, gcc-patches, java-patches, libstdc++,
	binutils, gdb-patches

On Thu, 25 Nov 2004, Zack Weinberg wrote:

> I think this is a fine idea (though I cannot approve it) and I would
> like to encourage you also to break the version number proper and the
> date stamp out of gcc/version.c.  If we could have two syntax-free
> files somewhere (suggest config/gcc-version, config/gcc-datestamp)
> that were parsed by everything that cares, then we could eliminate all
> the remaining copies of those numbers, and people maintaining modified
> versions of GCC wouldn't have merge conflicts in version.c every time
> they updated from the official sources.  Oh, and it would be one fewer
> reason for gcc/Makefile to rebuild everything after a cvs update.

Note that doing this will involve changing update-web-docs, as the version 
number will then be in a generated .texi file included from 
gcc-common.texi; updating branching.html and releasing.html (remembering 
that releasing.html may be referred to by the RMs for older active 
branches as well, so needs to cover both cases); and updating gcc_release.

It would be possible to have a third file gcc-status containing "release", 
"prerelease" or "experimental" to determine the type of version and 
whether the datestamp goes in the version number, which would then change 
"prerelease" -> "release" in the release process and be parsed to 
determine the setting of DEVELOPMENT presently in gcc-common.texi, and a 
fourth file gcc-type that contains "FSF" for FSF mainline and release 
branches, or some other string for other branches and local modifications.

> By syntax-free I mean that these files should contain the literal text
> 3.4.2 and 20041124 (respectively, for example) and nothing else, so
> that using them is as simple as

I'd suggest the inclusion of a trailing newline after the version 
number/date.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Factor configure-time gcc version checks (patch 1/4 for PR 7305)
  2004-11-25 21:05 ` Factor configure-time gcc version checks (patch 1/4 " Zack Weinberg
  2004-11-25 21:28   ` Joseph S. Myers
@ 2004-11-26  9:06   ` Richard Sandiford
  1 sibling, 0 replies; 14+ messages in thread
From: Richard Sandiford @ 2004-11-26  9:06 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: gcc-patches, java-patches, libstdc++, binutils, gdb-patches

Zack Weinberg <zack@codesourcery.com> writes:
> I think this is a fine idea (though I cannot approve it) and I would
> like to encourage you also to break the version number proper and the
> date stamp out of gcc/version.c.

Yeah, a separate version file is probably a good idea, but I'm afraid
it's not something I'm likely to tackle myself, sorry.

Richard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Factor configure-time gcc version checks (patch 1/4 for PR 7305)
  2004-11-25 20:47 Factor configure-time gcc version checks (patch 1/4 for PR 7305) Richard Sandiford
                   ` (2 preceding siblings ...)
  2004-11-25 21:05 ` Factor configure-time gcc version checks (patch 1/4 " Zack Weinberg
@ 2004-11-26 10:37 ` Andrew Haley
  2004-12-01 23:08 ` DJ Delorie
  2004-12-02 14:15 ` Richard Sandiford
  5 siblings, 0 replies; 14+ messages in thread
From: Andrew Haley @ 2004-11-26 10:37 UTC (permalink / raw)
  To: Richard Sandiford
  Cc: gcc-patches, java-patches, libstdc++, binutils, gdb-patches

Richard Sandiford writes:
 > So... the four patches are as follows:
 > 
 >   (1) Provide a config/gcc-version.m4 fragment to work out
 >       $gcc_version_trigger, $gcc_version_full and $gcc_version.
 > 
 >   (2) Remove config.if.
 > 
 >   (3) Provide a config/gxx-include-dir.m4 fragment and use it
 >       in the top-level configuration file.
 > 
 >   (4) The main libjava patch.
 > 
 > Part (1) is attached below.  The logic used in the new autoconf fragment
 > is mostly taken from config.if.
 > 
 > Patch bootstrapped & regression tested (on its own) on i686-pc-linux-gnu.
 > I also checked that:
 > 
 >   - The top-level configure gets the right version and version trigger.
 > 
 >   - The top-level makefile still passes --with-gcc-version-trigger
 >     down to subconfigures.
 > 
 >   - The subconfigures correctly read --with-gcc-version-trigger
 >     and record the right version number.
 > 
 >   - There's no change in the version numbers for installed paths.
 > 
 > OK to install?

Fine by me.

Andrew.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Factor configure-time gcc version checks (patch 1/4 for PR 7305)
  2004-11-25 21:28   ` Joseph S. Myers
@ 2004-11-26 21:48     ` Zack Weinberg
  0 siblings, 0 replies; 14+ messages in thread
From: Zack Weinberg @ 2004-11-26 21:48 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: Richard Sandiford, gcc-patches, java-patches, libstdc++,
	binutils, gdb-patches

"Joseph S. Myers" <joseph@codesourcery.com> writes:

> On Thu, 25 Nov 2004, Zack Weinberg wrote:
>
>> I think this is a fine idea (though I cannot approve it) and I would
>> like to encourage you also to break the version number proper and the
>> date stamp out of gcc/version.c.  If we could have two syntax-free
>> files somewhere (suggest config/gcc-version, config/gcc-datestamp)
>> that were parsed by everything that cares, then we could eliminate all
>> the remaining copies of those numbers, and people maintaining modified
>> versions of GCC wouldn't have merge conflicts in version.c every time
>> they updated from the official sources.  Oh, and it would be one fewer
>> reason for gcc/Makefile to rebuild everything after a cvs update.
>
> Note that doing this will involve changing update-web-docs, as the
> version number will then be in a generated .texi file included from
> gcc-common.texi; updating branching.html and releasing.html
> (remembering that releasing.html may be referred to by the RMs for
> older active branches as well, so needs to cover both cases); and
> updating gcc_release.

And the cron job that bumps version.c.

> It would be possible to have a third file gcc-status containing
> "release", "prerelease" or "experimental" to determine the type of
> version and whether the datestamp goes in the version number, which
> would then change "prerelease" -> "release" in the release process
> and be parsed to determine the setting of DEVELOPMENT presently in
> gcc-common.texi, and a fourth file gcc-type that contains "FSF" for
> FSF mainline and release branches, or some other string for other
> branches and local modifications.

I'm undecided on whether this would help all that much.  I don't want
a proliferation of weird little files in the top level config/.

>> By syntax-free I mean that these files should contain the literal text
>> 3.4.2 and 20041124 (respectively, for example) and nothing else, so
>> that using them is as simple as
>
> I'd suggest the inclusion of a trailing newline after the version 
> number/date.

Um, yeah.

zw

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Factor configure-time gcc version checks (patch 1/4 for PR 7305)
  2004-11-25 20:47 Factor configure-time gcc version checks (patch 1/4 for PR 7305) Richard Sandiford
                   ` (3 preceding siblings ...)
  2004-11-26 10:37 ` Andrew Haley
@ 2004-12-01 23:08 ` DJ Delorie
  2004-12-02 11:22   ` Richard Sandiford
  2004-12-02 14:15 ` Richard Sandiford
  5 siblings, 1 reply; 14+ messages in thread
From: DJ Delorie @ 2004-12-01 23:08 UTC (permalink / raw)
  To: rsandifo; +Cc: gcc-patches, java-patches, libstdc++, binutils, gdb-patches


> OK to install?

Sorry for missing this.  This is OK with me.  Please make sure both
src and gcc are updated, for those files that are common (TL and
config).

At some future time, it might be useful to handle the case where an
in-tree gcc is not available, and it may use $(CC) somehow.  But
that's just food for thought.

> Richard
> 
> 	* configure.in: Include config/gcc-version.m4.  Use TL_AC_GCC_VERSION
> 	to set gcc_version_trigger.  Remove some now-redundant AC_SUBSTs.
> 	* configure: Regenerate.
> 
> config/
> 	* config/gcc-version.m4: New file.
> 
> fastjar/
> 	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
> 	* configure, aclocal.m4, Makefile.in: Regenerate.
> 
> fixincludes/
> 	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
> 	* aclocal.m4: Include ../config/gcc-version.m4.
> 	* configure: Regenerate.
> 
> gcc/
> 	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.  Remove
> 	now-redundant AC_SUBSTs.
> 	* aclocal.m4: Include ../config/gcc-version.m4.
> 	* configure: Regenerate.
> 
> libffi/
> 	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
> 	* configure, aclocal.m4, Makefile.in: Regenerate.
> 	* include/Makefile.in, testsuite/Makefile.in: Regenerate.
> 
> libgfortran/
> 	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
> 	* configure, aclocal.m4, Makefile.in: Regenerate.
> 
> libjava/
> 	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
> 	* configure, aclocal.m4, Makefile.in, gcj/Makefile.in: Regenerate.
> 	* include/Makefile.in, testsuite/Makefile.in: Regenerate.
> 
> libmudflap/
> 	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
> 	* configure, aclocal.m4, Makefile.in: Regenerate.
> 	* testsuite/Makefile.in: Regenerate.
> 
> libobjc/
> 	* configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
> 	* configure, aclocal.m4: Regenerate.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Factor configure-time gcc version checks (patch 1/4 for PR 7305)
  2004-12-01 23:08 ` DJ Delorie
@ 2004-12-02 11:22   ` Richard Sandiford
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Sandiford @ 2004-12-02 11:22 UTC (permalink / raw)
  To: DJ Delorie; +Cc: gcc-patches, java-patches, libstdc++, binutils, gdb-patches

DJ Delorie <dj@redhat.com> writes:
> Sorry for missing this.  This is OK with me.  Please make sure both
> src and gcc are updated, for those files that are common (TL and
> config).

Thanks, installed to src/ and gcc/.  If you have time, could you
look at the two follow-up patches as well?

    http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02186.html
    http://gcc.gnu.org/ml/gcc-patches/2004-11/msg02188.html

TIA.

> At some future time, it might be useful to handle the case where an
> in-tree gcc is not available, and it may use $(CC) somehow.

FWIW, the version check in gcc-version.m4 does have a stab,
but I don't know how effective it is:

> + if test -f "${gcc_version_trigger}"; then
> +   gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'`
> + else
> +   gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'`
> + fi

(That bit was copied verbatim from config.if, which the first patch
above deletes.)

Richard

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Factor configure-time gcc version checks (patch 1/4 for PR 7305)
  2004-11-25 20:47 Factor configure-time gcc version checks (patch 1/4 for PR 7305) Richard Sandiford
                   ` (4 preceding siblings ...)
  2004-12-01 23:08 ` DJ Delorie
@ 2004-12-02 14:15 ` Richard Sandiford
  5 siblings, 0 replies; 14+ messages in thread
From: Richard Sandiford @ 2004-12-02 14:15 UTC (permalink / raw)
  To: gcc-patches; +Cc: binutils, gdb-patches

Richard Sandiford <rsandifo@redhat.com> writes:
> 	* configure.in: Include config/gcc-version.m4.  Use TL_AC_GCC_VERSION
> 	to set gcc_version_trigger.  Remove some now-redundant AC_SUBSTs.

Argh!  This bit broke src/ because of the config.status dependency on
$(gcc_version_trigger) in the top-level Makefile.  I've installed the
patch below as obvious.  Sorry all for breakage.

Richard


	* configure.in: Clear gcc_version_trigger if the file doesn't exist.
	* configure: Regenerate.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/configure.in,v
retrieving revision 1.252
retrieving revision 1.253
diff -u -d -p -r1.252 -r1.253
--- configure.in	2 Dec 2004 11:09:33 -0000	1.252
+++ configure.in	2 Dec 2004 14:08:00 -0000	1.253
@@ -112,6 +112,8 @@ if test -f $gcc_version_trigger ; then
       ac_configure_args="$ac_configure_args --with-gcc-version-trigger=$gcc_version_trigger"
       ;;
   esac
+else
+  gcc_version_trigger=
 fi
 
 ### To add a new directory to the tree, first choose whether it is a target

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Remove config.if (patch 2/4 for PR 7305)
  2004-11-25 20:50 ` Remove config.if (patch 2/4 " Richard Sandiford
@ 2004-12-02 20:07   ` Alexandre Oliva
  0 siblings, 0 replies; 14+ messages in thread
From: Alexandre Oliva @ 2004-12-02 20:07 UTC (permalink / raw)
  To: Richard Sandiford
  Cc: gcc-patches, java-patches, libstdc++, binutils, gdb-patches

On Nov 25, 2004, Richard Sandiford <rsandifo@redhat.com> wrote:

> 	* config.if: Delete.
> 	* configure.in: Set libstdcxx_incdir directly.
> 	* configure: Regenerate.

> 	* MAINTAINERS: Remove mention of config.if.
> 	* src-release (DEVO_SUPPORT): Remove config.if.

> gcc/
> 	* configure.ac: Move TL_AC_GCC_VERSION into initialization section.
> 	Set libstdcxx_incdir directly.
> 	* configure: Regenerate.

> binutils/
> 	* MAINTAINERS: Remove mention of config.if.

> gdb/
> 	* README: Remove config.if from directory listing.

Ok, thanks.

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Add config/gxx-include-dir.m4 (patch 3/4 for PR 7305)
  2004-11-25 20:54 ` Add config/gxx-include-dir.m4 (patch 3/4 " Richard Sandiford
@ 2004-12-02 20:07   ` Alexandre Oliva
  2004-12-03 10:55     ` Richard Sandiford
  0 siblings, 1 reply; 14+ messages in thread
From: Alexandre Oliva @ 2004-12-02 20:07 UTC (permalink / raw)
  To: Richard Sandiford
  Cc: gcc-patches, java-patches, libstdc++, binutils, gdb-patches

On Nov 25, 2004, Richard Sandiford <rsandifo@redhat.com> wrote:

> 	* configure.in: Include config/gxx-include-dir.m4.  Use
> 	TL_AC_GXX_INCLUDE_DIR.  Remove some now-redundant AC_SUBSTs.
> 	* configure: Regenerate.

> config/
> 	* gxx-include-dir.m4: New file.

Looks good, but shouldn't gcc/ and libstdc++-v3/ use it as well?  Or
was this for 4/4, that I seem to not have received?

In case it wasn't clear: ok, please check it in :-)

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Add config/gxx-include-dir.m4 (patch 3/4 for PR 7305)
  2004-12-02 20:07   ` Alexandre Oliva
@ 2004-12-03 10:55     ` Richard Sandiford
  0 siblings, 0 replies; 14+ messages in thread
From: Richard Sandiford @ 2004-12-03 10:55 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: gcc-patches, java-patches, libstdc++, binutils, gdb-patches

Alexandre Oliva <aoliva@redhat.com> writes:
> On Nov 25, 2004, Richard Sandiford <rsandifo@redhat.com> wrote:
>
>> 	* configure.in: Include config/gxx-include-dir.m4.  Use
>> 	TL_AC_GXX_INCLUDE_DIR.  Remove some now-redundant AC_SUBSTs.
>> 	* configure: Regenerate.
>
>> config/
>> 	* gxx-include-dir.m4: New file.
>
> Looks good, but shouldn't gcc/ and libstdc++-v3/ use it as well?

FWIW, I touched on this in the 1/4 message, but (unhelpfully)
not in the one above the patch itself:

> This series of patches instead adds a new config/gxx-include-dir.m4
> fragment that can be shared between configure scripts.  To avoid
> getting too sidetracked, the patches will only make ./configure and
> libjava/configure use this new fragment, so while there'll be no net
> increase in duplication, there'll unfortunately be no net reduction
> either.

The problem is that gcc/ wants to do something slightly different
and the libstdc++ code is bound up with other things.  The changes
didn't look entirely mechanical.

> Or was this for 4/4, that I seem to not have received?

In case anyone else is wondering about that, 4/4 only affected
libjava, so I only posted it to libjava-patches.  I should have
made that clearer, sorry.

> In case it wasn't clear: ok, please check it in :-)

Done, thanks.

Richard

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-12-03 10:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-25 20:47 Factor configure-time gcc version checks (patch 1/4 for PR 7305) Richard Sandiford
2004-11-25 20:50 ` Remove config.if (patch 2/4 " Richard Sandiford
2004-12-02 20:07   ` Alexandre Oliva
2004-11-25 20:54 ` Add config/gxx-include-dir.m4 (patch 3/4 " Richard Sandiford
2004-12-02 20:07   ` Alexandre Oliva
2004-12-03 10:55     ` Richard Sandiford
2004-11-25 21:05 ` Factor configure-time gcc version checks (patch 1/4 " Zack Weinberg
2004-11-25 21:28   ` Joseph S. Myers
2004-11-26 21:48     ` Zack Weinberg
2004-11-26  9:06   ` Richard Sandiford
2004-11-26 10:37 ` Andrew Haley
2004-12-01 23:08 ` DJ Delorie
2004-12-02 11:22   ` Richard Sandiford
2004-12-02 14:15 ` Richard Sandiford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).