gdb and binutils build broken -- Makefile.def gcc-no-bootstrap change

Michael Elizabeth Chastain mec.gnu@mindspring.com
Tue Jun 1 14:53:00 GMT 2004


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



More information about the Gdb mailing list