Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb and binutils build broken -- Makefile.def gcc-no-bootstrap change
@ 2004-06-01 14:53 Michael Elizabeth Chastain
  2004-06-01 16:09 ` Paolo Bonzini
  2004-06-01 16:30 ` Paolo Bonzini
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2004-06-01 14:53 UTC (permalink / raw)
  To: bonzini; +Cc: binutils, gdb

Hello Paolo,

This change to Makefile.tpl has broken the gdb build:

  @@ -1203,19 +1203,17 @@
   @if gcc
   maybe-all-gcc: all-gcc
   all-gcc: configure-gcc
  +@endif gcc
  +@if gcc-no-bootstrap
	  r=`${PWD_COMMAND}`; export r; \
	  s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
  +	$(SET_LIB_PATH) \
	  $(GCC_HOST_EXPORTS) \
  -	if [ -f stage_last ] ; then \
  -	  true ; \
  -	elif [ -f gcc/stage_last ] ; then \
  -	  $(SET_LIB_PATH) \
  +	if [ -f gcc/stage_last ] ; then \
	    (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
	  else \
  -	  $(SET_LIB_PATH) \
	    (cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
	  fi
  -@endif gcc

The problem is that 'gcc' is not defined when I build gdb.
In the old code, the whole maybe-all-gcc was wrapped in "@if gcc".
In your new code, the maybe-all-gcc is getting all the rules
that are supposed to be defined only for all-gcc.

I've appended a build log showing the problem.

A standalone binutils build is similarly broken.

Michael C

===

r=`${PWDCMD-pwd}`; export r; \
s=`cd /berman/fsf/_today_/source/gdb/HEAD/src; ${PWDCMD-pwd}`; export s; \
 \
CC="gcc"; export CC; CFLAGS="-g -O2"; export CFLAGS; CONFIG_SHELL="/bin/sh"; export CONFIG_SHELL; CXX="c++"; export CXX; CXXFLAGS="-g -O2"; export CXXFLAGS; AR="ar"; export AR; AS="as"; export AS; CC_FOR_BUILD="gcc"; export CC_FOR_BUILD; DLLTOOL="dlltool"; export DLLTOOL; LD="/berman/migchain/install/host/binutils-baseline/bin/ld"; export LD; LDFLAGS=""; export LDFLAGS; NM="nm"; export NM; RANLIB="ranlib"; export RANLIB; WINDRES="windres"; export WINDRES; OBJCOPY=""; export OBJCOPY; OBJDUMP=""; export OBJDUMP; TOPLEVEL_CONFIGURE_ARGUMENTS="/berman/fsf/_today_/source/gdb/HEAD/src/configure --prefix=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD"; export TOPLEVEL_CONFIGURE_ARGUMENTS; GMPLIBS="-lgmp"; export GMPLIBS; GMPINC=""; export GMPINC; \
if [ -f gcc/stage_last ] ; then \
  (cd gcc && make "DESTDIR=" "RPATH_ENVVAR=LD_LIBRARY_PATH" "TARGET_SUBDIR=i686-pc-linux-gnu" "bindir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/bin" "datadir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/share" "exec_prefix=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD" "includedir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/include" "infodir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/info" "libdir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/lib" "libexecdir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/libexec" "lispdir=" "libstdcxx_incdir=c++/3.3.3" "libsubdir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/lib/gcc/i686-pc-linux-gnu/3.3.3" "localstatedir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/var" "mandir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/man" "oldincludedir=/usr/include" "prefix=/berman/fsf/_today_/berman/install/target/native/
 gdb/HEAD" "sbindir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/sbin" "sharedstatedir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/com" "sysconfdir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/etc" "tooldir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/i686-pc-linux-gnu" "build_tooldir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/i686-pc-linux-gnu" "gxx_include_dir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/include/c++/3.3.3" "gcc_version=3.3.3" "gcc_version_trigger=" "target_alias=i686-pc-linux-gnu" "BISON=`if [ -f $r/bison/bison ] ; then echo $r/bison/bison -L $s/bison/ ; else echo bison ; fi`" "CC_FOR_BUILD=gcc" "CXX_FOR_BUILD=c++" "EXPECT=`if [ -f $r/expect/expect ] ; then echo $r/expect/expect ; else echo expect ; fi`" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LEX=`if [ -f $r/flex/flex ] 
 ; then echo $r/flex/flex ; else echo flex ; fi`" "M4=`if [ -f $r/m4/m4 ] ; then echo $r/m4/m4 ; else echo m4 ; fi`" "MAKE=make" "RUNTEST=`if [ -f $s/dejagnu/runtest ] ; then echo $s/dejagnu/runtest ; else echo runtest ; fi`" "RUNTESTFLAGS=" "SHELL=/bin/sh" "YACC=`if [ -f $r/bison/bison ] ; then echo $r/bison/bison -y -L $s/bison/ ; elif [ -f $r/byacc/byacc ] ; then echo $r/byacc/byacc ; else echo bison -y ; fi`" "AR_FLAGS=rc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCXXFLAGS=-g -O2 -fno-implicit-templates" "AR_FOR_TARGET=` if [ -f $r/binutils/ar ] ; then echo $r/binutils/ar ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo ar; else echo ar ; fi; fi`" "AS_FOR_TARGET=` if [ -f $r/gas/as-new ] ; then echo $r/gas/as-new ; elif [ -f $r/gcc/xgcc ]; then  gcc  -print-prog-name=as ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo as; else echo as ; fi; fi`" "CC_FOR_TARGET= gcc " "CFLAGS_FOR_TARGET=-O2 -g -O2" "CXX_FOR_TA
 RGET= c++ " "CXXFLAGS_FOR_TARGET=-g -O2 -D_GNU_SOURCE" "DLLTOOL_FOR_TARGET=` if [ -f $r/binutils/dlltool ] ; then echo $r/binutils/dlltool ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo dlltool; else echo dlltool ; fi; fi`" "GCJ_FOR_TARGET= gcj " "GFORTRAN_FOR_TARGET= gfortran " "LD_FOR_TARGET=` if [ -f $r/ld/ld-new ] ; then echo $r/ld/ld-new ; elif [ -f $r/gcc/xgcc ]; then  gcc  -print-prog-name=ld ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo /berman/migchain/install/host/binutils-baseline/bin/ld; else echo ld ; fi; fi`" "LIBCFLAGS_FOR_TARGET=-O2 -g -O2" "LIBCXXFLAGS_FOR_TARGET=-g -O2 -D_GNU_SOURCE -fno-implicit-templates" "NM_FOR_TARGET=` if [ -f $r/binutils/nm-new ] ; then echo $r/binutils/nm-new ; elif [ -f $r/gcc/xgcc ]; then  gcc  -print-prog-name=nm ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo nm; else echo nm ; fi; fi`" "RANLIB_FOR_TARGET=` if [ -f $r/binutils/ranlib ] ; then echo $r/binutils/ranlib ;
  else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then if [ x'ranlib' != x ]; then echo ranlib; else echo ranlib; fi; else echo ranlib ; fi; fi`" "WINDRES_FOR_TARGET=` if [ -f $r/binutils/windres ] ; then echo $r/binutils/windres ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo windres; else echo windres ; fi; fi`" "CONFIG_SHELL=/bin/sh" "MAKEINFO=`if [ -f $r/texinfo/makeinfo/makeinfo ] ; then echo $r/texinfo/makeinfo/makeinfo ; else if (makeinfo --version | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; then echo makeinfo; else echo $s/missing makeinfo; fi; fi` --split-size=5000000"  'AR=ar' 'AS=as' 'CC=gcc' 'CXX=c++' 'DLLTOOL=dlltool' 'LD=/berman/migchain/install/host/binutils-baseline/bin/ld' 'NM=nm' 'RANLIB=ranlib' 'WINDRES=windres' 'BUILD_PREFIX=' 'BUILD_PREFIX_1=loser-' "GCC_FOR_TARGET= $r/gcc/xgcc -B$r/gcc/ " "CFLAGS_FOR_BUILD=-g -O2" "`echo 'LANGUAGES=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'STMP_FIXPROTO=' | sed -e s
 '/[^=][^=]*=$/XFOO=/'`" "`echo 'LIMITS_H_TEST=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'LIBGCC2_CFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'LIBGCC2_DEBUG_CFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'LIBGCC2_INCLUDES=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'STAGE1_CFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'BOOT_CFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'BOOT_ADAFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" quickstrap); \
else \
  (cd gcc && make "DESTDIR=" "RPATH_ENVVAR=LD_LIBRARY_PATH" "TARGET_SUBDIR=i686-pc-linux-gnu" "bindir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/bin" "datadir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/share" "exec_prefix=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD" "includedir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/include" "infodir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/info" "libdir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/lib" "libexecdir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/libexec" "lispdir=" "libstdcxx_incdir=c++/3.3.3" "libsubdir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/lib/gcc/i686-pc-linux-gnu/3.3.3" "localstatedir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/var" "mandir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/man" "oldincludedir=/usr/include" "prefix=/berman/fsf/_today_/berman/install/target/native/
 gdb/HEAD" "sbindir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/sbin" "sharedstatedir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/com" "sysconfdir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/etc" "tooldir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/i686-pc-linux-gnu" "build_tooldir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/i686-pc-linux-gnu" "gxx_include_dir=/berman/fsf/_today_/berman/install/target/native/gdb/HEAD/include/c++/3.3.3" "gcc_version=3.3.3" "gcc_version_trigger=" "target_alias=i686-pc-linux-gnu" "BISON=`if [ -f $r/bison/bison ] ; then echo $r/bison/bison -L $s/bison/ ; else echo bison ; fi`" "CC_FOR_BUILD=gcc" "CXX_FOR_BUILD=c++" "EXPECT=`if [ -f $r/expect/expect ] ; then echo $r/expect/expect ; else echo expect ; fi`" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LEX=`if [ -f $r/flex/flex ] 
 ; then echo $r/flex/flex ; else echo flex ; fi`" "M4=`if [ -f $r/m4/m4 ] ; then echo $r/m4/m4 ; else echo m4 ; fi`" "MAKE=make" "RUNTEST=`if [ -f $s/dejagnu/runtest ] ; then echo $s/dejagnu/runtest ; else echo runtest ; fi`" "RUNTESTFLAGS=" "SHELL=/bin/sh" "YACC=`if [ -f $r/bison/bison ] ; then echo $r/bison/bison -y -L $s/bison/ ; elif [ -f $r/byacc/byacc ] ; then echo $r/byacc/byacc ; else echo bison -y ; fi`" "AR_FLAGS=rc" "CFLAGS=-g -O2" "CXXFLAGS=-g -O2" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCXXFLAGS=-g -O2 -fno-implicit-templates" "AR_FOR_TARGET=` if [ -f $r/binutils/ar ] ; then echo $r/binutils/ar ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo ar; else echo ar ; fi; fi`" "AS_FOR_TARGET=` if [ -f $r/gas/as-new ] ; then echo $r/gas/as-new ; elif [ -f $r/gcc/xgcc ]; then  gcc  -print-prog-name=as ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo as; else echo as ; fi; fi`" "CC_FOR_TARGET= gcc " "CFLAGS_FOR_TARGET=-O2 -g -O2" "CXX_FOR_TA
 RGET= c++ " "CXXFLAGS_FOR_TARGET=-g -O2 -D_GNU_SOURCE" "DLLTOOL_FOR_TARGET=` if [ -f $r/binutils/dlltool ] ; then echo $r/binutils/dlltool ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo dlltool; else echo dlltool ; fi; fi`" "GCJ_FOR_TARGET= gcj " "GFORTRAN_FOR_TARGET= gfortran " "LD_FOR_TARGET=` if [ -f $r/ld/ld-new ] ; then echo $r/ld/ld-new ; elif [ -f $r/gcc/xgcc ]; then  gcc  -print-prog-name=ld ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo /berman/migchain/install/host/binutils-baseline/bin/ld; else echo ld ; fi; fi`" "LIBCFLAGS_FOR_TARGET=-O2 -g -O2" "LIBCXXFLAGS_FOR_TARGET=-g -O2 -D_GNU_SOURCE -fno-implicit-templates" "NM_FOR_TARGET=` if [ -f $r/binutils/nm-new ] ; then echo $r/binutils/nm-new ; elif [ -f $r/gcc/xgcc ]; then  gcc  -print-prog-name=nm ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo nm; else echo nm ; fi; fi`" "RANLIB_FOR_TARGET=` if [ -f $r/binutils/ranlib ] ; then echo $r/binutils/ranlib ;
  else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then if [ x'ranlib' != x ]; then echo ranlib; else echo ranlib; fi; else echo ranlib ; fi; fi`" "WINDRES_FOR_TARGET=` if [ -f $r/binutils/windres ] ; then echo $r/binutils/windres ; else if [ 'i686-pc-linux-gnu' = 'i686-pc-linux-gnu' ] ; then echo windres; else echo windres ; fi; fi`" "CONFIG_SHELL=/bin/sh" "MAKEINFO=`if [ -f $r/texinfo/makeinfo/makeinfo ] ; then echo $r/texinfo/makeinfo/makeinfo ; else if (makeinfo --version | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; then echo makeinfo; else echo $s/missing makeinfo; fi; fi` --split-size=5000000"  'AR=ar' 'AS=as' 'CC=gcc' 'CXX=c++' 'DLLTOOL=dlltool' 'LD=/berman/migchain/install/host/binutils-baseline/bin/ld' 'NM=nm' 'RANLIB=ranlib' 'WINDRES=windres' 'BUILD_PREFIX=' 'BUILD_PREFIX_1=loser-' "GCC_FOR_TARGET= $r/gcc/xgcc -B$r/gcc/ " "CFLAGS_FOR_BUILD=-g -O2" "`echo 'LANGUAGES=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'STMP_FIXPROTO=' | sed -e s
 '/[^=][^=]*=$/XFOO=/'`" "`echo 'LIMITS_H_TEST=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'LIBGCC2_CFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'LIBGCC2_DEBUG_CFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'LIBGCC2_INCLUDES=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'STAGE1_CFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'BOOT_CFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" "`echo 'BOOT_ADAFLAGS=' | sed -e s'/[^=][^=]*=$/XFOO=/'`" all); \
fi
/bin/sh: line 1: cd: gcc: No such file or directory
make: *** [maybe-all-gcc] Error 1


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

* Re: gdb and binutils build broken -- Makefile.def gcc-no-bootstrap change
  2004-06-01 14:53 gdb and binutils build broken -- Makefile.def gcc-no-bootstrap change Michael Elizabeth Chastain
@ 2004-06-01 16:09 ` Paolo Bonzini
  2004-06-01 16:30 ` Paolo Bonzini
  1 sibling, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2004-06-01 16:09 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: bonzini, binutils, gdb

I'm trying a patch.  I'll let you know in a few minutes.

Paolo


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

* Re: gdb and binutils build broken -- Makefile.def gcc-no-bootstrap change
  2004-06-01 14:53 gdb and binutils build broken -- Makefile.def gcc-no-bootstrap change Michael Elizabeth Chastain
  2004-06-01 16:09 ` Paolo Bonzini
@ 2004-06-01 16:30 ` Paolo Bonzini
  2004-06-03  5:00   ` Christopher Faylor
  1 sibling, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2004-06-01 16:30 UTC (permalink / raw)
  To: Michael Elizabeth Chastain; +Cc: bonzini, binutils, gdb

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

Here is the least invasive patch I could do to fix the problem.  It is 
actually better than the previous solution also because it limits the 
number of interacting sed passes to resolve @if's, and it allows 
conditionals like "@if as-bootstrap".

I think it qualifies as an obvious fix but I don't have CVS available 
right now, would you please commit it for me to both gcc and src?

Thank you very much, I apologize.

Paolo

[-- Attachment #2: fix-gdb-build.patch --]
[-- Type: text/plain, Size: 3039 bytes --]

2004-06-01  Paolo Bonzini  <bonzini@gnu.org>

	* configure.in: Fix --enable-bootstrap breakage
	introduced in trees without gcc.
	* configure: Regenerate.

Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/configure.in,v
retrieving revision 1.293
diff -u -r1.293 configure.in
--- configure.in	1 Jun 2004 07:54:44 -0000	1.293
+++ configure.in	1 Jun 2004 16:28:30 -0000
@@ -1730,6 +1730,31 @@
 # to maintain later.  In this particular case, you just have to be careful
 # not to nest @if/@endif pairs, because configure will not warn you at all.
 
+AC_ARG_ENABLE([bootstrap],
+[  --enable-bootstrap     Enable bootstrapping [no]],,
+enable_bootstrap=no)
+if test -d ${srcdir}/gcc; then
+  case "$host:$target:$enable_bootstrap" in
+    $build:$build:yes | *:no) ;;
+    *:yes) AC_MSG_ERROR([cannot bootstrap a cross-compiler]) ;;
+    *) AC_MSG_ERROR([invalid option for --enable-bootstrap]) ;;
+  esac
+else
+  if test $enable_bootstrap = yes; then
+    AC_MSG_ERROR([cannot bootstrap without a compiler])
+  fi
+fi
+
+case "$enable_bootstrap" in
+  yes)
+    default_target=bootstrap
+    bootstrap_suffix=bootstrap ;;
+  no)
+    default_target=all
+    bootstrap_suffix=no-bootstrap ;;
+esac
+AC_SUBST(default_target)
+
 for module in ${build_modules} ; do
   if test -z "${no_recursion}" \
      && test -f ${build_subdir}/${module}/Makefile; then
@@ -1738,7 +1763,9 @@
   fi
   extrasub="$extrasub
 /^@if build-$module\$/d
-/^@endif build-$module\$/d"
+/^@endif build-$module\$/d
+/^@if build-$module-$bootstrap_suffix\$/d
+/^@endif build-$module-$bootstrap_suffix\$/d"
 done
 for module in ${configdirs} ; do
   if test -z "${no_recursion}" \
@@ -1748,7 +1775,9 @@
   fi
   extrasub="$extrasub
 /^@if $module\$/d
-/^@endif $module\$/d"
+/^@endif $module\$/d
+/^@if $module-$bootstrap_suffix\$/d
+/^@endif $module-$bootstrap_suffix\$/d"
 done
 for module in ${target_configdirs} ; do
   if test -z "${no_recursion}" \
@@ -1758,38 +1787,11 @@
   fi
   extrasub="$extrasub
 /^@if target-$module\$/d
-/^@endif target-$module\$/d"
+/^@endif target-$module\$/d
+/^@if target-$module-$bootstrap_suffix\$/d
+/^@endif target-$module-$bootstrap_suffix\$/d"
 done
 
-AC_ARG_ENABLE([bootstrap],
-[  --enable-bootstrap     Enable bootstrapping [no]],,
-enable_bootstrap=no)
-if test -d ${srcdir}/gcc; then
-  case "$host:$target:$enable_bootstrap" in
-    $build:$build:yes | *:no) ;;
-    *:yes) AC_MSG_ERROR([cannot bootstrap a cross-compiler]) ;;
-    *) AC_MSG_ERROR([invalid option for --enable-bootstrap]) ;;
-  esac
-else
-  if test $enable_bootstrap = yes; then
-    AC_MSG_ERROR([cannot bootstrap without a compiler])
-  fi
-fi
-
-case "$enable_bootstrap" in
-  yes)
-    default_target=bootstrap
-    extrasub="$extrasub
-/^@if gcc-bootstrap\$/d
-/^@endif gcc-bootstrap\$/d" ;;
-  no)
-    default_target=all
-    extrasub="$extrasub
-/^@if gcc-no-bootstrap\$/d
-/^@endif gcc-no-bootstrap\$/d" ;;
-esac
-AC_SUBST(default_target)
-
 extrasub="$extrasub
 /^@if /,/^@endif /d"
 

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

* Re: gdb and binutils build broken -- Makefile.def gcc-no-bootstrap change
  2004-06-01 16:30 ` Paolo Bonzini
@ 2004-06-03  5:00   ` Christopher Faylor
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2004-06-03  5:00 UTC (permalink / raw)
  To: binutils, gdb, gcc-patches

On Tue, Jun 01, 2004 at 06:32:53PM +0200, Paolo Bonzini wrote:
>Here is the least invasive patch I could do to fix the problem.  It is 
>actually better than the previous solution also because it limits the 
>number of interacting sed passes to resolve @if's, and it allows 
>conditionals like "@if as-bootstrap".
>
>I think it qualifies as an obvious fix but I don't have CVS available 
>right now, would you please commit it for me to both gcc and src?
>
>Thank you very much, I apologize.

I've taken the liberty of checking this into gcc and src.  It affects
cygwin builds too, FWIW.

This patch is infinitely better than the one I posted on gcc-patches
so that one is withdrawn.

cgf

>2004-06-01  Paolo Bonzini  <bonzini@gnu.org>
>
>	* configure.in: Fix --enable-bootstrap breakage
>	introduced in trees without gcc.
>	* configure: Regenerate.
>
>Index: configure.in
>===================================================================
>RCS file: /cvs/gcc/gcc/configure.in,v
>retrieving revision 1.293
>diff -u -r1.293 configure.in
>--- configure.in	1 Jun 2004 07:54:44 -0000	1.293
>+++ configure.in	1 Jun 2004 16:28:30 -0000
>@@ -1730,6 +1730,31 @@
> # to maintain later.  In this particular case, you just have to be careful
> # not to nest @if/@endif pairs, because configure will not warn you at all.
> 
>+AC_ARG_ENABLE([bootstrap],
>+[  --enable-bootstrap     Enable bootstrapping [no]],,
>+enable_bootstrap=no)
>+if test -d ${srcdir}/gcc; then
>+  case "$host:$target:$enable_bootstrap" in
>+    $build:$build:yes | *:no) ;;
>+    *:yes) AC_MSG_ERROR([cannot bootstrap a cross-compiler]) ;;
>+    *) AC_MSG_ERROR([invalid option for --enable-bootstrap]) ;;
>+  esac
>+else
>+  if test $enable_bootstrap = yes; then
>+    AC_MSG_ERROR([cannot bootstrap without a compiler])
>+  fi
>+fi
>+
>+case "$enable_bootstrap" in
>+  yes)
>+    default_target=bootstrap
>+    bootstrap_suffix=bootstrap ;;
>+  no)
>+    default_target=all
>+    bootstrap_suffix=no-bootstrap ;;
>+esac
>+AC_SUBST(default_target)
>+
> for module in ${build_modules} ; do
>   if test -z "${no_recursion}" \
>      && test -f ${build_subdir}/${module}/Makefile; then
>@@ -1738,7 +1763,9 @@
>   fi
>   extrasub="$extrasub
> /^@if build-$module\$/d
>-/^@endif build-$module\$/d"
>+/^@endif build-$module\$/d
>+/^@if build-$module-$bootstrap_suffix\$/d
>+/^@endif build-$module-$bootstrap_suffix\$/d"
> done
> for module in ${configdirs} ; do
>   if test -z "${no_recursion}" \
>@@ -1748,7 +1775,9 @@
>   fi
>   extrasub="$extrasub
> /^@if $module\$/d
>-/^@endif $module\$/d"
>+/^@endif $module\$/d
>+/^@if $module-$bootstrap_suffix\$/d
>+/^@endif $module-$bootstrap_suffix\$/d"
> done
> for module in ${target_configdirs} ; do
>   if test -z "${no_recursion}" \
>@@ -1758,38 +1787,11 @@
>   fi
>   extrasub="$extrasub
> /^@if target-$module\$/d
>-/^@endif target-$module\$/d"
>+/^@endif target-$module\$/d
>+/^@if target-$module-$bootstrap_suffix\$/d
>+/^@endif target-$module-$bootstrap_suffix\$/d"
> done
> 
>-AC_ARG_ENABLE([bootstrap],
>-[  --enable-bootstrap     Enable bootstrapping [no]],,
>-enable_bootstrap=no)
>-if test -d ${srcdir}/gcc; then
>-  case "$host:$target:$enable_bootstrap" in
>-    $build:$build:yes | *:no) ;;
>-    *:yes) AC_MSG_ERROR([cannot bootstrap a cross-compiler]) ;;
>-    *) AC_MSG_ERROR([invalid option for --enable-bootstrap]) ;;
>-  esac
>-else
>-  if test $enable_bootstrap = yes; then
>-    AC_MSG_ERROR([cannot bootstrap without a compiler])
>-  fi
>-fi
>-
>-case "$enable_bootstrap" in
>-  yes)
>-    default_target=bootstrap
>-    extrasub="$extrasub
>-/^@if gcc-bootstrap\$/d
>-/^@endif gcc-bootstrap\$/d" ;;
>-  no)
>-    default_target=all
>-    extrasub="$extrasub
>-/^@if gcc-no-bootstrap\$/d
>-/^@endif gcc-no-bootstrap\$/d" ;;
>-esac
>-AC_SUBST(default_target)
>-
> extrasub="$extrasub
> /^@if /,/^@endif /d"
> 


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

* Re: gdb and binutils build broken -- Makefile.def gcc-no-bootstrap change
@ 2004-06-01 17:59 Michael Elizabeth Chastain
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Elizabeth Chastain @ 2004-06-01 17:59 UTC (permalink / raw)
  To: paolo.bonzini; +Cc: binutils, gdb

It works for me!  I tested both binutils and gdb (downloaded
separately).

> I think it qualifies as an obvious fix but I don't have CVS available 
> right now, would you please commit it for me to both gcc and src?

I don't feel comfortable enough with this code to do this.  Maybe
someone else can check it in, or we can wait until you get back
to a CVS connection?

Michael C

2004-06-01  Paolo Bonzini  <bonzini@gnu.org>

	* configure.in: Fix --enable-bootstrap breakage
	introduced in trees without gcc.
	* configure: Regenerate.


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

end of thread, other threads:[~2004-06-03  5:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-01 14:53 gdb and binutils build broken -- Makefile.def gcc-no-bootstrap change Michael Elizabeth Chastain
2004-06-01 16:09 ` Paolo Bonzini
2004-06-01 16:30 ` Paolo Bonzini
2004-06-03  5:00   ` Christopher Faylor
2004-06-01 17:59 Michael Elizabeth Chastain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox