diff mbox

Commit: BFIN: Fix use of VEC_last macro in bfin.c

Message ID 87393nrwte.fsf@redhat.com
State New
Headers show

Commit Message

Nick Clifton Aug. 16, 2012, 9:49 a.m. UTC
Hi Bernd, Hi Jie,

  I am applying the patch below as an obvious fix for this problem
  whilst compiling the BFIN port of GCC:
  
gcc/config/bfin/bfin.c: In function 'bool hwloop_optimize(hwloop_info)':
gcc/config/bfin/bfin.c:3481:41: error: request for member 'flags' in 'VEC_last_1<edge_def*>(loop->hwloop_info_d::incoming, ((const char*)"/work/sources/gcc/current/gcc/config/bfin/bfin.c"), 3481u, ((const char*)(& __FUNCTION__)))', which is of pointer type 'edge_def*' (maybe you meant to use '->' ?)
gcc/config/bfin/bfin.c:3750:41: error: request for member 'flags' in 'VEC_last_1<edge_def*>(loop->hwloop_info_d::incoming, ((const char*)"/work/sources/gcc/current/gcc/config/bfin/bfin.c"), 3750u, ((const char*)(& __FUNCTION__)))', which is of pointer type 'edge_def*' (maybe you meant to use '->' ?)

  With this patch applied the bfin port now compiles correctly.

  Cheers
    Nick

gcc/ChangeLog
2012-08-16  Nick Clifton  <nickc@redhat.com>

	* config/bfin/bfin.c (hwloop_optimize): Fix use of VEC_last macro.

Comments

Diego Novillo Aug. 16, 2012, 12:15 p.m. UTC | #1
On 12-08-16 05:49 , Nick Clifton wrote:

> gcc/ChangeLog
> 2012-08-16  Nick Clifton  <nickc@redhat.com>
>
> 	* config/bfin/bfin.c (hwloop_optimize): Fix use of VEC_last macro.

Thanks Nick.  I made the wrong fix here, sorry about that.  I will be 
making more changes to VEC_ shortly.  What's a good way for me to test them?


Diego.
Nick Clifton Aug. 17, 2012, 7:10 a.m. UTC | #2
Hi Diego,
> Thanks Nick.  I made the wrong fix here, sorry about that.  I will be
> making more changes to VEC_ shortly.  What's a good way for me to test
> them?

All I was doing was building a variety of targets, just to make sure 
that a local, generic patch of my own did not break anything.  If you 
have the disk space then you could try doing the same yourself.  With 
the two attached makefiles (and a little editing to suit your 
environment), I work like this:

   % make dirs
   % make config
    [These two are only needed the first time]

   % make

That will build:

	i686-pc-linux-gnu \
	x86_64-pc-linux-gnu \
	am33_2.0-linux \
	hppa-linux-gnu \
	powerpc64-linux-gnu \
	ppc-linux \
	s390-linux \
	alpha-netbsd \
         frv-uclinux \
	i686-pc-cygwin \
	mingw32-pe \
	vax-netbsdelf \
	fr30-elf \
	iq2000-elf \
	lm32-elf \
	mcore-elf \
	spu-elf \
	avr-elf \
	sh64-elf \
	xstormy16-elf \
	epiphany-elf \
	arm-eabi \
	bfin-elf \
	cris-elf \
	frv-elf \
	h8300-elf \
	i386-elf \
	ia64-elf \
	m32c-elf \
	m32r-elf \
	mep-elf \
	mips64vr-elf \
	mipsisa32-elf \
	mipsisa64-elf \
	mmix-mmixware \
	mn10300-elf \
	powerpc-eabispe \
	powerpc-elf \
	rl78-elf \
	rx-elf \
	sh-elf \
	tx39-elf \
	v850e-elf


Cheers
   Nick
# These are a set of rules for building and testing devo toolchains.

# You may need to edit some of these variables before they will
# work in your environment.

BUILD_DIR       = /work/builds/gcc/current
SOURCE_DIR	= /work/sources/gcc/current

BIN_DIRS = \
	arc-elf \
	cr16-elf \
	crx-elf \
	dlx-elf \
        fido-elf \
        i386-darwin \
	i386-netware \
	lm32-rtems4.0 \
	m68hc12-elf \
        microblaze-elf \
	mcore-pe \
	moxie-elf \
	msp430-elf \
	mt-elf \
	openrisc-elf \
	or32-elf \
	s390x-ibm-tpf \
        tic6x-elf \
        x86_64-pc-mingw64 \
	z8k-coff

GCC_AND_LIBGCC_DIRS = \
	i686-pc-linux-gnu \
	x86_64-pc-linux-gnu \
	\
	am33_2.0-linux \
	hppa-linux-gnu \
	powerpc64-linux-gnu \
	ppc-linux \
	s390-linux \
        \
	alpha-netbsd \
        frv-uclinux \
	i686-pc-cygwin \
	mingw32-pe \
	vax-netbsdelf \

ALL_DIRS = \
	fr30-elf \
	iq2000-elf \
	lm32-elf \
	mcore-elf \
	spu-elf \
	\
	avr-elf \
	sh64-elf \
	xstormy16-elf \
	\
	epiphany-elf \
	\
	arm-eabi \
	bfin-elf \
	cris-elf \
	frv-elf \
	h8300-elf \
	i386-elf \
	ia64-elf \
	m32c-elf \
	m32r-elf \
	mep-elf \
	mips64vr-elf \
	mipsisa32-elf \
	mipsisa64-elf \
	mmix-mmixware \
	mn10300-elf \
	powerpc-eabispe \
	powerpc-elf \
	rl78-elf \
	rx-elf \
	sh-elf \
	tx39-elf \
	v850e-elf

# Obsolete:
#	arm-elf \
#	arm-wince-pe \

all:              gcc-builds-noretry all-target-libgcc all-target-newlib
checks   check:   gcc-checks
rebuilds rebuild: gcc-rebuilds

include /home/nickc/bin/scripts/builds-makefile
# ============ Tools =====================================================

COUNT_FAILURES = /home/nickc/bin/scripts/count-failures
CHECK_FOR_REGRESSIONS = /home/nickc/bin/scripts/check-for-regressions
# TIMELIMIT      = /home/nickc/bin/scripts/timelimit

SIMPLE_MAKE   = nice -3 make -s 
PARALLEL_MAKE = nice -3 make -s -j3
NOSTOP_MAKE   = make -s -k

# ============ Build Rules ================================================

BIN_CLEAN_RULES = echo -n "Cleaning all of binutils in:" `basename $$PWD` "... " ; \
		  $(NOSTOP_MAKE) clean-gold &> /dev/null ; \
		  $(NOSTOP_MAKE) clean-gas clean-ld clean-binutils &> /dev/null \
		   && echo "success" || echo "FAILURE"

BIN_BUILD_NO_RETRY_RULES = echo -n "Building Binutils in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-binutils all-gas all-ld all-gold &> ./make.out \
		   && echo "success" || echo "FAILURE"

BIN_BUILD_RULES = echo -n "Building Binutils in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-binutils all-gas all-ld all-gold &> ./make.out \
		   && echo "success" \
		   || (echo -n "fail ... (removing cache files) ... " ; \
		       cd bfd ; ./config.status > /dev/null ; cd .. ; \
		       rm -f ld/e*.c `basename $$PWD`/newlib/config.cache ld/config.cache libiberty/config.cache bfd/config.cache gas/config.cache opcodes/config.cache; \
		       cd libiberty ; $(SIMPLE_MAKE) clean > /dev/null ; ./config.status > /dev/null ; cd .. \
		       test -d ld && ( cd ld ; ./config.status > /dev/null ; cd .. ) ; \
		       echo -n "retry ... " ; \
		       $(SIMPLE_MAKE) all-binutils all-gas all-ld all-gold &> ./make.out \
		       && echo "success" || echo "FAILURE")

OPCODES_BUILD_RULES = echo -n "Building opcodes in:" `basename $$PWD` "... " ; \
		      rm -f opcodes/stamp* ; \
		      $(SIMPLE_MAKE) all-opcodes &> ./make.out && echo "success" || echo "FAILURE"

SIM_BUILD_RULES = echo -n "Building Simulator in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-sim &> ./make.out \
		   && echo "success" || echo "FAILURE"

GCC_CLEAN_RULES = echo -n "Cleaning gcc in:" `basename $$PWD` "... " ; \
		  $(NOSTOP_MAKE) clean-gcc &> /dev/null \
		   && echo "success" || echo "FAILURE"

GCC_BUILD_NO_RETRY_RULES = echo -n "Building GCC in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-gcc &>  ./make.out \
		   && echo "success" || echo "FAILURE"

GCC_BUILD_RULES = echo -n "Building GCC in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-gcc &>  ./make.out \
		   && echo "success" \
		   || (echo -n "fail ... " ; \
		       rm -f gcc/config.cache libiberty/config.cache build-*/config.cache ; \
		       echo -n "retry ... " ; \
		       $(SIMPLE_MAKE) all-binutils all-gcc &> ./make.out \
		       && echo "success" || echo "FAILURE")

LIBGCC_BUILD_RULES = echo -n "Building LIBGCC in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-target-libgcc &>  ./make.out \
		   && echo "success" || echo "FAILURE"

MULTI_BUILD_GDB_RULES = \
		echo -n "Building in:" `basename $$PWD` "... " ; \
		$(SIMPLE_MAKE) -f ../makefile multi-build-stage1

multi-build-stage3:
		$(PARALLEL_MAKE) all-gas &>  ./make.out \
		  && $(SIMPLE_MAKE) -f ../makefile multi-build-stage2  || echo "GAS build failed"
multi-build-stage2:					       
		$(PARALLEL_MAKE) all-ld all-gold >> ./make.out 2>&1 \
		  && $(SIMPLE_MAKE) -f ../makefile multi-build-stage3  || echo "LD build failed"
multi-build-stage1:					       
		$(PARALLEL_MAKE) all-binutils >>  ./make.out 2>&1 \
		  && $(SIMPLE_MAKE) -f ../makefile multi-build-stage4  || echo "BINUTILS build failed"
multi-build-stage4:					       
		$(PARALLEL_MAKE) all-gcc >>  ./make.out 2>&1 \
		  && $(SIMPLE_MAKE) -f ../makefile multi-build-stage5  || echo "GCC build failed"
multi-build-stage5:
		$(PARALLEL_MAKE) all-gdb >>  ./make.out 2>&1 \
		  && echo "GCC & GDB built OK" || echo "GDB build failed"


GCC_REBUILD_RULES = echo -n "Rebuilding GCC in:" `basename $$PWD` "... " ; \
		    cd bfd ; ./config.status &> /dev/null ; cd .. ; \
		    cd gcc ; ./config.status --recheck &> /dev/null ; cd .. ; \
		    $(PARALLEL_MAKE) all-gcc &>  ./make.out \
		      && echo "success" || echo "FAILURE"

LIB_BUILD_RULES = echo -n "Building target LIBRARIES in:" `basename $$PWD` "... " ; \
		   $(PARALLEL_MAKE) all-target-libgcc &> ./make.out && ( echo -n "libgcc..." ; \
                   $(PARALLEL_MAKE) all-target-newlib &> ./make.out && ( echo -n "newlib..." ; \
                   $(PARALLEL_MAKE) all-target-libgloss &> ./make.out && ( echo -n "libgloss..." ; \
		   $(PARALLEL_MAKE) all-target-libstdc++-v3 &> ./make.out && echo "libstdc++-v3...success" \
		   || echo "FAILURE (libstdc++-v3)" ) \
		   || echo "FAILURE (libgloss)" ) \
		   || echo "FAILURE (newlib)" ) \
                   || echo "FAILURE (libgcc)"

LIB_CLEAN_RULES = echo -n "Cleaning target LIBRARIES in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) clean-target &> ./make.out \
		   && echo "success" || echo "FAILURE"

NEWLIB_BUILD_RULES = echo -n "Building NEWLIB in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-target-newlib &>  ./make.out \
		   && echo "success" \
		   || (echo -n "fail ... (removing cache files) ... " ; \
		       find `basename $$PWD` -name config.cache -exec rm {} \; ; \
		       echo -n "retry ... " ; \
		       $(SIMPLE_MAKE) all-target-newlib &> ./make.out \
		       && echo "success" || echo "FAILURE")

LIBGLOSS_BUILD_RULES = echo -n "Building LIBGLOSS in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-target-libgloss &>  ./make.out \
		   && echo "success" || echo "FAILURE"

# find . -name config.cache -exec rm \{\} \\;
LIBSTDCXX_V3_BUILD_RULES = echo -n "Building LIBSTDC++-v3 in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-target-libstdc++-v3 &>  ./make.out \
		   && echo "success" || echo "FAILURE"

LIBSSP_BUILD_RULES = echo -n "Building LIBSSP in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-target-libssp &>  ./make.out \
		   && echo "success" \
		   || (echo -n "fail ... (removing cache files) ... " ; \
		       find . -name config.cache -exec rm \{\} \; ; \
		       echo -n "retry ... " ; \
		       $(SIMPLE_MAKE) all-target-libssp &> ./make.out \
		       && echo "success" || echo "FAILURE")

GDB_BUILD_RULES = echo -n "Building GDB in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-gdb &>  ./make.out \
		   && echo "success" \
		   || (echo -n "fail ... (removing ada-lex.c) ... " ; \
		       rm -f gdb/ada-lex.c ; \
		       echo -n "retry ... " ; \
		       $(SIMPLE_MAKE) -C gdb &> ../make.out \
		       && echo "success" || echo "FAILURE")

GDB_CLEAN_RULES = echo -n "Cleaning GDB in:" `basename $$PWD` "... " ; \
		  $(NOSTOP_MAKE) clean-gdb clean-sim clean-readline &> /dev/null \
		   && echo "success" || echo "FAILURE"

ALL_BUILD_RULES = echo -n "Building ALL in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) >&  ./make.out \
		   && echo "success" || echo "FAILURE"

MUDFLAP_BUILD_RULES = echo -n "Building MUDFLAP in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-target-libmudflap &>  ./make.out \
		   && echo "success" || echo "FAILURE"

GPROF_BUILD_RULES = echo -n "Building GPROF in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-gprof &>  ./make.out \
		   && echo "success" || echo "FAILURE"

INSTALL_INFO_RULES = echo -n "Installing Info files from:" `basename $$PWD` "... " ; \
		  $(SIMPLE_MAKE) prefix=/dev/shm/installs install-info &>  ./make.out \
		   && echo "success" || echo "FAILURE"

SIM_BUILD_RULES = echo -n "Building sim in:" `basename $$PWD` "... " ; \
		  $(PARALLEL_MAKE) all-sim &> ./make.out \
		      && echo "success" || echo "FAILURE"

GAS_CLEAN_RULES = echo -n "Cleaning gas in:" `basename $$PWD` "... " ; \
		  $(NOSTOP_MAKE) clean-gas &> /dev/null \
		   && echo "success" || echo "FAILURE"

SIM_CLEAN_RULES = echo -n "Cleaning sim in:" `basename $$PWD` "... " ; \
		  $(NOSTOP_MAKE) clean-sim &> /dev/null \
		   && echo "success" || echo "FAILURE"

# ============ Check Rules ================================================
BIN_CHECK_REGRESSIONS_3 = \
		  test -f ./checks/check-gas.out3 && \
		  test -f ./checks/check-gas.out0 && \
		    (diff  ./checks/check-gas.out3 ./checks/check-gas.out0 > /dev/shm/.gas.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=GAS /dev/shm/.gas.diff.out) ; \
		  \
		  test -f ./checks/check-ld.out3 && \
		  test -f ./checks/check-ld.out0 && \
		    (diff  ./checks/check-ld.out3 ./checks/check-ld.out0 > /dev/shm/.ld.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=LD /dev/shm/.ld.diff.out) ; \
		  \
		  test -f ./checks/check-bin.out3 && \
		  test -f ./checks/check-bin.out0 && \
		    (diff  ./checks/check-bin.out3 ./checks/check-bin.out0 > /dev/shm/.bin.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=BIN /dev/shm/.bin.diff.out)

BIN_CHECK_REGRESSIONS_2 = \
		  test -f ./checks/check-gas.out2 && \
		  test -f ./checks/check-gas.out0 && \
		    (diff  ./checks/check-gas.out2 ./checks/check-gas.out0 > /dev/shm/.gas.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=GAS /dev/shm/.gas.diff.out) ; \
		  \
		  test -f ./checks/check-ld.out2 && \
		  test -f ./checks/check-ld.out0 && \
		    (diff  ./checks/check-ld.out2 ./checks/check-ld.out0 > /dev/shm/.ld.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=LD /dev/shm/.ld.diff.out) ; \
		  \
		  test -f ./checks/check-bin.out2 && \
		  test -f ./checks/check-bin.out0 && \
		    (diff  ./checks/check-bin.out2 ./checks/check-bin.out0 > /dev/shm/.bin.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=BIN /dev/shm/.bin.diff.out)

BIN_CHECK_REGRESSIONS = \
		  test -f ./checks/check-gas.out1 && \
		  test -f ./checks/check-gas.out0 && \
		    (diff  ./checks/check-gas.out1 ./checks/check-gas.out0 > /dev/shm/.gas.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=GAS /dev/shm/.gas.diff.out) ; \
		  \
		  test -f ./checks/check-ld.out1 && \
		  test -f ./checks/check-ld.out0 && \
		    (diff  ./checks/check-ld.out1 ./checks/check-ld.out0 > /dev/shm/.ld.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=LD /dev/shm/.ld.diff.out) ; \
		  \
		  test -f ./checks/check-bin.out1 && \
		  test -f ./checks/check-bin.out0 && \
		    (diff  ./checks/check-bin.out1 ./checks/check-bin.out0 > /dev/shm/.bin.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=BIN /dev/shm/.bin.diff.out)

BIN_CYCLE_OLD_RESULTS = \
		mkdir -p checks ; \
		xx=9 ; \
		for x in 8 7 6 5 4 3 2 1 0 ; \
		do \
		  test -f ./checks/check-gas.out$$x && mv -f ./checks/check-gas.out$$x ./checks/check-gas.out$$xx ; \
		  test -f ./checks/check-ld.out$$x  && mv -f ./checks/check-ld.out$$x  ./checks/check-ld.out$$xx ; \
		  test -f ./checks/check-bin.out$$x && mv -f ./checks/check-bin.out$$x ./checks/check-bin.out$$xx ; \
		  xx=$$x ; \
		done 

BIN_GENERATE_NEW_RESULTS = \
		echo -n "Checking Binutils in:" `basename $$PWD` "..."; \
		\
	        cd gas ; $(NOSTOP_MAKE) check NO_EXPENSIVE_GAS_TESTS=1 &> ../checks/check-gas.out0 ; cd .. ; \
		test -d ld && ( cd ld ; $(NOSTOP_MAKE) check NO_EXPENSIVE_LD_TESTS=1 &> ../checks/check-ld.out0  cd .. ) ; \
		test -d gold && ( cd gold ; $(NOSTOP_MAKE) check NO_EXPENSIVE_LD_TESTS=1 &> ../checks/check-ld.out0  cd .. ) ; \
		cd binutils ; $(NOSTOP_MAKE) check &> ../checks/check-bin.out0 ; cd .. ; \
		\
		x=`gawk -f $(COUNT_FAILURES) ./checks/check-gas.out0` ; \
		if test $$x != "0" ; then echo -n " GAS:" $$x ; fi ; \
		test -d ld && ( x=`gawk -f $(COUNT_FAILURES) ./checks/check-ld.out0` ; \
		                if test $$x != "0" ; then echo -n " LD:" $$x ; fi ; ) ; \
		x=`gawk -f $(COUNT_FAILURES) ./checks/check-bin.out0` ; \
		if test $$x != "0" ; then echo -n " BIN:" $$x ; fi ; \
		\
		echo " done"

SIM_CHECK_REGRESSIONS = \
		  test -f ./checks/check-sim.out1 && \
		  test -f ./checks/check-sim.out0 && \
		    (diff  ./checks/check-sim.out1 ./checks/check-sim.out0 > /dev/shm/.sim.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=SIM /dev/shm/.sim.diff.out)

SIM_CHECK_RULES = echo -n "Checking SIM in:" `basename $$PWD` "... " ; \
		  \
		  mkdir -p checks ; \
		  xx=9 ; \
		  for x in 8 7 6 5 4 3 2 1 0 ; \
		  do \
		    test -f ./checks/check-sim.out$$x && mv -f ./checks/check-sim.out$$x ./checks/check-sim.out$$xx ; \
		    xx=$$x ; \
		  done ; \
		  \
	          cd sim ; $(SIMPLE_MAKE) check &> ../checks/check-sim.out0 ; cd .. ; \
		  \
		  x=`gawk -f $(COUNT_FAILURES) ./checks/check-sim.out0` ; \
		  if test $$x != "0" ; then echo -n " FAILURES:" $$x ; fi ; \
		  \
		  $(SIM_CHECK_REGRESSIONS) ; \
		  \
		  echo " done"

GCC_CHECK_REGRESSIONS = \
		  touch ./checks/check-gcc.out1 ; \
		  touch ./checks/check-gcc.out0 ; \
		  (diff  ./checks/check-gcc.out1 ./checks/check-gcc.out0 > /dev/shm/gcc.diff.out || \
		   gawk -f $(CHECK_FOR_REGRESSIONS) TEST=GCC /dev/shm/gcc.diff.out)

GCC_CHECK_RULES = echo -n "Checking GCC (execute) in:" `basename $$PWD` "... " ; \
		  \
		  mkdir -p checks ; \
		  xx=9 ; \
		  for x in 8 7 6 5 4 3 2 1 0 ; \
		  do \
		    test -f ./checks/check-gcc.out$$x && mv -f ./checks/check-gcc.out$$x ./checks/check-gcc.out$$xx ; \
		    xx=$$x ; \
		  done ; \
		  \
	          cd gcc; $(SIMPLE_MAKE) check-gcc RUNTESTFLAGS="gcc.c-torture/execute/execute.exp" &> ../checks/check-gcc.out0 ; \
		  cd .. ; \
		  \
		  x=`gawk -f $(COUNT_FAILURES) ./checks/check-gcc.out0` ; \
		  if test $$x != "0" ; then echo -n " FAILURES:" $$x ; fi ; \
		  \
		  $(GCC_CHECK_REGRESSIONS) ; \
		  \
		  echo " done"

GCC_CHECK_DG_REGRESSIONS = \
		  test -f ./checks/check-dg-gcc.out1 && \
		  test -f ./checks/check-dg-gcc.out0 && \
		    (diff  ./checks/check-dg-gcc.out1 ./checks/check-dg-gcc.out0 > /dev/shm/.gcc.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=GCC_DG /dev/shm/.gcc.diff.out)

GCC_DG_CHECK_RULES = echo -n "Checking GCC (dg) in:" `basename $$PWD` "... " ; \
		  \
		  mkdir -p checks ; \
		  xx=9 ; \
		  for x in 8 7 6 5 4 3 2 1 0 ; \
		  do \
		    test -f ./checks/check-dg-gcc.out$$x && mv -f ./checks/check-dg-gcc.out$$x ./checks/check-dg-gcc.out$$xx ; \
		    xx=$$x ; \
		  done ; \
		  \
	          cd gcc ; $(SIMPLE_MAKE) check-gcc RUNTESTFLAGS="gcc.dg/dg.exp" &> ../checks/check-dg-gcc.out0 ; \
		  cd .. ; \
		  \
		  x=`gawk -f $(COUNT_FAILURES) ./checks/check-dg-gcc.out0` ; \
		  if test $$x != "0" ; then echo -n " FAILURES:" $$x ; fi ; \
		  \
		  $(GCC_CHECK_DG_REGRESSIONS) ; \
		  \
		  echo " done"

GCC_CHECK_COMPILE_REGRESSIONS = \
		  test -f ./checks/check-compile-gcc.out1 && \
		  test -f ./checks/check-compile-gcc.out0 && \
		    (diff  ./checks/check-compile-gcc.out1 ./checks/check-compile-gcc.out0 > /dev/shm/.gcc.comp.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=GCC_DG /dev/shm/.gcc.comp.out)

GCC_COMPILE_CHECK_RULES = echo -n "Checking GCC (compile) in:" `basename $$PWD` "... " ; \
		  \
		  mkdir -p checks ; \
		  xx=9 ; \
		  for x in 8 7 6 5 4 3 2 1 0 ; \
		  do \
		    test -f ./checks/check-compile-gcc.out$$x && mv -f ./checks/check-compile-gcc.out$$x ./checks/check-compile-gcc.out$$xx ; \
		    xx=$$x ; \
		  done ; \
		  \
	          cd gcc ; $(SIMPLE_MAKE) check-gcc RUNTESTFLAGS="gcc.c-torture/compile/compile.exp" &> ./checks/check-compile-gcc.out0 ; \
		  cd .. ; \
		  \
		  x=`gawk -f $(COUNT_FAILURES) ./checks/check-compile-gcc.out0` ; \
		  if test $$x != "0" ; then echo -n " FAILURES:" $$x ; fi ; \
		  \
		  $(GCC_CHECK_COMPILE_REGRESSIONS) ; \
		  \
		  echo " done"

GXX_CHECK_REGRESSIONS = \
		  test -f ./checks/check-g++.out1 && \
		  test -f ./checks/check-g++.out0 && \
		    (diff  ./checks/check-g++.out1 ./checks/check-g++.out0 > /dev/shm/g++.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=GXX /dev/shm/g++.diff.out)

GXX_CHECK_RULES = echo -n "Checking G++ in:" `basename $$PWD` "... " ; \
		  \
		  mkdir -p checks ; \
		  xx=9 ; \
		  for x in 8 7 6 5 4 3 2 1 0 ; \
		  do \
		    test -f ./checks/check-g++.out$$x && mv -f ./checks/check-g++.out$$x ./checks/check-g++.out$$xx ; \
		    xx=$$x ; \
		  done ; \
		  \
	          cd gcc ; $(SIMPLE_MAKE) check-g++ &> ../checks/check-g++.out0 ; cd .. \
		  \
		  x=`gawk -f $(COUNT_FAILURES) ./checks/check-g++.out0` ; \
		  if test $$x != "0" ; then echo -n " FAILURES:" $$x ; fi ; \
		  \
		  $(GXX_CHECK_REGRESSIONS) ; \
		  \
		  echo " done"

GDB_CHECK_REGRESSIONS = \
		  test -f ./checks/check-gdb.out1 && \
		  test -f ./checks/check-gdb.out0 && \
		    (diff  ./checks/check-gdb.out1 ./checks/check-gdb.out0 > /dev/shm/.gdb.diff.out || \
		    gawk -f $(CHECK_FOR_REGRESSIONS) TEST=GDB /dev/shm/.gdb.diff.out)

GDB_CHECK_RULES = echo -n "Checking GDB in:" `basename $$PWD` "... " ; \
		  \
		  mkdir -p checks ; \
		  xx=9 ; \
		  for x in 8 7 6 5 4 3 2 1 0 ; \
		  do \
		    test -f ./checks/check-gdb.out$$x && mv -f ./checks/check-gdb.out$$x ./checks/check-gdb.out$$xx ; \
		    xx=$$x ; \
		  done ; \
		  \
	          cd gdb ; $(SIMPLE_MAKE) check &> ../checks/check-gdb.out0 ; cd .. ; \
		  \
		  x=`gawk -f $(COUNT_FAILURES) ./checks/check-gdb.out0` ; \
		  if test $$x != "0" ; then echo -n " FAILURES:" $$x ; fi ; \
		  \
		  $(GDB_CHECK_REGRESSIONS) ; \
		  \
		  echo " done"

# ============ Clean Targets ================================================

ALL_GCC_DIRS = $(ALL_DIRS) $(LIB_DIRS) $(GCC_DIRS) $(GCC_AND_LIBGCC_DIRS)
EVERY_DIR = $(ALL_GCC_DIRS) $(BIN_DIRS)

clean-and-build-gcc:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(GCC_CLEAN_RULES) ; \
		  $(GCC_BUILD_RULES) ; \
		popd > /dev/null ; \
	done	

clean-and-build-bin:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(BIN_CLEAN_RULES) ; \
		  $(BIN_BUILD_RULES) ; \
		popd > /dev/null ; \
	done	

force-clean:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null && \
		  (echo "Removing *everything* in:" `basename $$PWD` "... " ; \
		  test -d tests && mv tests .. ; \
		  test -d checks && mv checks .. ; \
		  rm -fr * ; \
		  test -d ../checks && mv ../checks . ; \
		  test -d ../tests && mv ../tests . ) ; \
		popd > /dev/null ; \
	done

clean-binutils:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(BIN_CLEAN_RULES) ; \
		popd > /dev/null ; \
	done	

clean:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(BIN_CLEAN_RULES) ; \
		popd > /dev/null ; \
	done	
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(GCC_CLEAN_RULES) ; \
		popd > /dev/null ; \
	done	
	@ for A in $(LIB_DIRS) $(ALL_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(LIB_CLEAN_RULES) ; \
		popd > /dev/null ; \
	done	
	@ for A in $(GDB_DIRS) $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(GDB_CLEAN_RULES) ; \
		popd > /dev/null ; \
	done	

clean-gdb:
	@ for A in $(GDB_DIRS) $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(GDB_CLEAN_RULES) ; \
		popd > /dev/null ; \
	done	

clean-gas:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(GAS_CLEAN_RULES) ; \
		popd > /dev/null ; \
	done	

clean-sim:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(SIM_CLEAN_RULES) ; \
		popd > /dev/null ; \
	done	

# ============ Build Targets ================================================

gcc-build gcc-builds build-gcc all-gcc:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(GCC_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

gcc-rebuild gcc-rebuilds rebuild-gcc:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(GCC_REBUILD_RULES) ; \
		popd > /dev/null ; \
	done

gcc-build-noretry gcc-builds-noretry build-gcc-noretry gcc-build-no-retry gcc-builds-no-retry build-gcc-no-retry all-gcc-noretry all-gcc-no-retry:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(GCC_BUILD_NO_RETRY_RULES) ; \
		popd > /dev/null ; \
	done

libgcc-build libgcc-builds build-libgcc all-libgcc all-target-libgcc all-target-libgcc-no-retry all-target-libgcc-noretry:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(LIBGCC_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

lib-build lib-builds build-libs lib libs all-target:
	@ for A in $(LIB_DIRS) $(ALL_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(LIB_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

newlib-build newlib-builds build-newlib all-target-newlib:
	@ for A in $(LIB_DIRS) $(ALL_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(NEWLIB_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

libgloss-build libgloss-builds build-libgloss all-target-libgloss:
	@ for A in $(LIB_DIRS) $(ALL_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(LIBGLOSS_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

libstdc++-v3-build libstdc++-v3-builds build-libstdc++-v3 all-target-libstdc++-v3:
	@ for A in $(LIB_DIRS) $(ALL_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(LIBSTDCXX_V3_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

libssp-build libssp-builds build-libssp all-target-libssp:
	@ for A in $(LIB_DIRS) $(ALL_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(LIBSSP_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

bin-build-noretry bin-builds-noretry build-bin-noretry all-binutils bin-builds-no-retry:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(BIN_BUILD_NO_RETRY_RULES) ; \
		popd > /dev/null ; \
	done

bin-build bin-builds build-bin all-bin-builds:
	@ for A in $(EVERY_DIR) ; do \
		if pushd $(BUILD_DIR)/$$A > /dev/null ; \
		then \
		      $(BIN_BUILD_RULES) ; \
		      popd > /dev/null ; \
		else \
		     echo "BIN DIR $A does not exist!" ; \
		fi ; \
	done

sim all-sim sim-build sim-builds build-sim build-sims:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(SIM_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

gdb-build gdb-builds build-gdb all-gdb:
	@ for A in $(GDB_DIRS) $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(GDB_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

all-builds build-all:
	@ for A in $(ALL_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(ALL_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

mudflap-builds build-mudflap mudflap:
	@ for A in $(ALL_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		      $(MUDFLAP_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

opcodes all-opcodes opcodes-build opcodes-builds build-opcodes:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
			$(OPCODES_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

gprof all-gprof gprof-build build-gprof:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
			$(GPROF_BUILD_RULES) ; \
		popd > /dev/null ; \
	done

install-info all-install-info:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
			$(INSTALL_INFO_RULES) ; \
		popd > /dev/null ; \
	done

# ============ Check Targets ================================================

bin-check bin-checks check-bin:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(BIN_CYCLE_OLD_RESULTS); \
		  $(BIN_GENERATE_NEW_RESULTS); \
		  $(BIN_CHECK_REGRESSIONS); \
		popd > /dev/null ; \
	done

bin-check-last-but-one:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(BIN_CYCLE_OLD_RESULTS); \
		  $(BIN_GENERATE_NEW_RESULTS); \
		  $(BIN_CHECK_REGRESSIONS_2); \
		popd > /dev/null ; \
	done

check-bin-regressions bin-check-regressions:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  echo -n "Checking for binutils (v1 vs v0) regressions in:" `basename $$PWD` "..."; \
		  $(BIN_CHECK_REGRESSIONS) ; \
		  echo " done" ; \
		popd > /dev/null ; \
	done

check-bin-regressions-2 bin-check-regressions2 bin-check-regressions-2:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  echo -n "Checking for binutils (v2 vs v0) regressions in:" `basename $$PWD` "..."; \
		  $(BIN_CHECK_REGRESSIONS_2) ; \
		  echo " done" ; \
		popd > /dev/null ; \
	done

check-bin-regressions-3 bin-check-regressions3 bin-check-regressions-3:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  echo -n "Checking for binutils (v3 vs v0) regressions in:" `basename $$PWD` "..."; \
		  $(BIN_CHECK_REGRESSIONS_3) ; \
		  echo " done" ; \
		popd > /dev/null ; \
	done

sim-check sim-checks check-sim:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(SIM_CHECK_RULES) ; \
		popd > /dev/null ; \
	done

gcc-check gcc-checks check-gcc:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(GCC_CHECK_RULES) ; \
		popd > /dev/null ; \
	done

g++-check g++-checks check-g++:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(GXX_CHECK_RULES) ; \
		popd > /dev/null ; \
	done

gdb-check gdb-checks check-gdb:
	@ for A in $(GDB_DIRS) $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(GDB_CHECK_RULES) ; \
		popd > /dev/null ; \
	done

gcc-dg-check gcc-check-dg:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(GCC_DG_CHECK_RULES) ; \
		popd > /dev/null ; \
	done

gcc-compile-check:
	@ for A in $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(GCC_COMPILE_CHECK_RULES) ; \
		popd > /dev/null ; \
	done

# ============ Multi Targets ================================================

multi-build-gdb:
	@ for A in $(GDB_DIRS) $(ALL_GCC_DIRS) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
		  $(MULTI_BUILD_GDB_RULES) ; \
		popd > /dev/null ; \
	done

# ============ Configure Targets ================================================

build-dirs dirs:
	@ for A in $(EVERY_DIR) ; do \
		mkdir -p $(BUILD_DIR)/$$A ; \
	done

re-config:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
			echo "Running config.status in $$A" ; \
			./config.status > /dev/null; \
		popd > /dev/null ; \
	done

re-check recheck:
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
			echo "Running config.status --recheck in $$A" ; \
			./config.status --recheck > /dev/null; \
			./config.status > /dev/null; \
		popd > /dev/null ; \
	done

CONFIG_ARGS =	--quiet \
		--disable-bootstrap \
	    	--disable-gdbtk \
		--with-x=no \
		--with-newlib \
		--enable-languages=c,c++ \
		--cache-file=/dev/null \
		--prefix=`pwd`/install \
		$(CONFIG_EXTRA)

#		--with-mpfr-include=$(SOURCE_DIR)/mpfr/src \
#		--with-mpfr-lib=`pwd`/mpfr/src/.libs \

config configure: $(SOURCE_DIR)
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
			echo "Configuring in:" `basename $$PWD` "..." ; \
			$(SOURCE_DIR)/configure \
				$(CONFIG_ARGS) \
				--target=$$A > config.out 2>&1; \
			rm -f ld/configdoc.texi ; \
			mkdir -p tests checks install ; \
		popd > /dev/null ; \
	done 
	@ mkdir -p $(BUILD_DIR)/i686-pc-linux-gnu; \
	pushd  $(BUILD_DIR)/i686-pc-linux-gnu > /dev/null ; \
		echo "(re) Configuring in: i686-pc-linux-gnu ... " ; \
		rm -fr * ; \
		$(SOURCE_DIR)/configure \
			$(CONFIG_ARGS) \
			--enable-languages=c,c++,java \
			--target=i686-pc-linux-gnu \
		> /dev/null 2>&1; \
		rm -f ld/configdoc.texi ; \
		mkdir -p tests checks install ; \
	popd > /dev/null
	@ mkdir -p $(BUILD_DIR)/x86_64-pc-linux-gnu; \
	pushd  $(BUILD_DIR)/x86_64-pc-linux-gnu > /dev/null ; \
		echo "(re) Configuring in: x86_64-pc-linux-gnu ... " ; \
		rm -fr * ; \
		$(SOURCE_DIR)/configure \
			$(CONFIG_ARGS) \
			--enable-multilib=no \
			--target=x86_64-pc-linux-gnu \
		> /dev/null 2>&1; \
		rm -f ld/configdoc.texi ; \
		mkdir -p tests checks install ; \
	popd > /dev/null
	@ mkdir -p $(BUILD_DIR)/all; \
	pushd  $(BUILD_DIR)/all > /dev/null ; \
		echo "(re) Configuring in: all ... " ; \
		rm -f * ; \
		$(SOURCE_DIR)/configure \
			--quiet --enable-targets=all --with-x=no \
		> /dev/null 2>&1; \
		rm -f ld/configdoc.texi ; \
	popd > /dev/null
	@ mkdir -p $(BUILD_DIR)/all-64; \
	pushd  $(BUILD_DIR)/all-64 > /dev/null ; \
		echo "(re) Configuring in: all-64 ... " ; \
		rm -f * ; \
		$(SOURCE_DIR)/configure \
			--quiet --enable-targets=all --enable-64-bit-bfd --with-x=no \
		> /dev/null 2>&1; \
		rm -f ld/configdoc.texi ; \
	popd > /dev/null
	@ mkdir -p $(BUILD_DIR)/i686-pc-linux-gnu-gold; \
	pushd  $(BUILD_DIR)/i686-pc-linux-gnu-gold > /dev/null ; \
		echo "(re) Configuring in: i686-pc-linux-gnu-gold ... " ; \
		rm -fr * ; \
		$(SOURCE_DIR)/configure \
			--quiet \
			--enable-gold \
			--cache-file=/dev/null \
			--prefix=`pwd`/install \
			--target=i686-pc-linux-gnu \
		> /dev/null 2>&1; \
		mkdir -p tests checks install ; \
	popd > /dev/null

re-lib: $(SOURCE_DIR)
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A/libiberty > /dev/null ; \
			echo "rebuild libiberty in:" `basename $$PWD` "... " ; \
			$(SIMPLE_MAKE) clean all > /dev/null \
			|| ./config.status > /dev/null \
			|| $(SIMPLE_MAKE) > /dev/null ; \
		popd > /dev/null ; \
	done 


32-bit-configure: $(SOURCE_DIR)
	@ for A in $(EVERY_DIR) ; do \
		pushd $(BUILD_DIR)/$$A > /dev/null ; \
			echo "Configuring in:" `basename $$PWD` "..." ; \
			CC="gcc -m32" CXX="g++ -m32" ABI="32" setarch i686 \
			$(SOURCE_DIR)/configure \
				$(CONFIG_ARGS) \
				--disable-shared \
				--disable-symvers \
				--target=$$A > config.out 2>&1; \
			rm -f ld/configdoc.texi ; \
			mkdir -p tests checks install ; \
		popd > /dev/null ; \
	done 
	@ mkdir -p $(BUILD_DIR)/all; \
	pushd  $(BUILD_DIR)/all > /dev/null ; \
		echo "(re) Configuring in: all ... " ; \
		rm -f * ; \
		CC="gcc -m32" CXX="g++ -m32" ABI="32" setarch i686 \
		$(SOURCE_DIR)/configure \
			--quiet --enable-targets=all --with-x=no \
		> /dev/null ; \
		rm -f ld/configdoc.texi ; \
	popd > /dev/null
	@ mkdir -p $(BUILD_DIR)/all-64; \
	pushd  $(BUILD_DIR)/all-64 > /dev/null ; \
		echo "(re) Configuring in: all-64 ... " ; \
		rm -f * ; \
		CC="gcc -m32" CXX="g++ -m32" ABI="32" setarch i686 \
		$(SOURCE_DIR)/configure \
			--quiet --enable-targets=all --enable-64-bit-bfd --with-x=no \
		> /dev/null ; \
		rm -f ld/configdoc.texi ; \
	popd > /dev/null
	@ mkdir -p $(BUILD_DIR)/i686-pc-linux-gnu-gold; \
	pushd  $(BUILD_DIR)/i686-pc-linux-gnu-gold > /dev/null ; \
		echo "(re) Configuring in: i686-pc-linux-gnu-gold ... " ; \
		rm -fr * ; \
		CC="gcc -m32" CXX="g++ -m32" ABI="32" setarch i686 \
		$(SOURCE_DIR)/configure \
			--quiet \
			--enable-gold \
			--cache-file=/dev/null \
			--prefix=`pwd`/install \
			--target=i686-pc-linux-gnu \
		> /dev/null 2>&1; \
		mkdir -p tests checks install ; \
	popd > /dev/null
Diego Novillo Aug. 17, 2012, 12:37 p.m. UTC | #3
On 12-08-17 03:10 , nick clifton wrote:
> Hi Diego,
>> Thanks Nick.  I made the wrong fix here, sorry about that.  I will be
>> making more changes to VEC_ shortly.  What's a good way for me to test
>> them?
>
> All I was doing was building a variety of targets, just to make sure
> that a local, generic patch of my own did not break anything.  If you
> have the disk space then you could try doing the same yourself.

This is great.  Thanks!  Often the problem I have is that I don't know 
what target triplets to use.  We do not have a cheat sheet handy.

Would it be too much imposition for you to put this on the wiki?  This 
is useful for those patches that need to touch files that are only built 
for particular targets.  Often, I don't really need to build the whole 
thing, I just need to know that the target files compile.


Thanks.  Diego.
Nick Clifton Aug. 17, 2012, 12:58 p.m. UTC | #4
Hi Diego,

> Would it be too much imposition for you to put this on the wiki?

I would be happy to.  Where do you think would be appropriate ?  I would 
guess that somewhere off the Getting Started page 
(http://gcc.gnu.org/wiki/GettingStarted) would be best.  Maybe a new 
item in the Tutorials section, or an extra paragraph on the Testing_GCC 
page ?

Cheers
   Nick
Joseph Myers Aug. 17, 2012, 2:52 p.m. UTC | #5
On Fri, 17 Aug 2012, Diego Novillo wrote:

> On 12-08-17 03:10 , nick clifton wrote:
> > Hi Diego,
> > > Thanks Nick.  I made the wrong fix here, sorry about that.  I will be
> > > making more changes to VEC_ shortly.  What's a good way for me to test
> > > them?
> > 
> > All I was doing was building a variety of targets, just to make sure
> > that a local, generic patch of my own did not break anything.  If you
> > have the disk space then you could try doing the same yourself.
> 
> This is great.  Thanks!  Often the problem I have is that I don't know what
> target triplets to use.  We do not have a cheat sheet handy.

The cheat sheet for testing lots of targets (testing that cc1 etc. build) 
is contrib/config-list.mk.  The targets there are supposed to cover all 
significant variations in what target headers are used; even if people 
have added target variations without always adding to the list, it's a 
pretty good approximation.  Note that when using this file you need to 
have a recent trunk build in your PATH so that --enable-werror-always 
works properly.

The baseline state is not generally 100% clean; see bug 47093 for a 
meta-bug whose dependencies track known issues (some of those dependencies 
may of course be out of date - that is, issues that have been fixed).  It 
would certainly be good to get things down to a clean state and have an 
autobuilder reporting regressions building any supported target.  (Of 
course greater levels of testing are possible, e.g. building binutils and 
seeing if libgcc builds, but getting cc1 building cleanly would be a good 
first step.)
Diego Novillo Aug. 17, 2012, 3:01 p.m. UTC | #6
On 12-08-17 10:52 , Joseph S. Myers wrote:
> On Fri, 17 Aug 2012, Diego Novillo wrote:
>
>> On 12-08-17 03:10 , nick clifton wrote:
>>> Hi Diego,
>>>> Thanks Nick.  I made the wrong fix here, sorry about that.  I will be
>>>> making more changes to VEC_ shortly.  What's a good way for me to test
>>>> them?
>>>
>>> All I was doing was building a variety of targets, just to make sure
>>> that a local, generic patch of my own did not break anything.  If you
>>> have the disk space then you could try doing the same yourself.
>>
>> This is great.  Thanks!  Often the problem I have is that I don't know what
>> target triplets to use.  We do not have a cheat sheet handy.
>
> The cheat sheet for testing lots of targets (testing that cc1 etc. build)
> is contrib/config-list.mk.

Thanks.  We need a much better mechanism for documenting and advertising 
the stuff in contrib/.

I've been wanting such a facility for ages (never quite got around to 
asking until now, though).


Diego.
Gerald Pfeifer Aug. 19, 2012, 5:31 p.m. UTC | #7
On Fri, 17 Aug 2012, Diego Novillo wrote:
> Thanks.  We need a much better mechanism for documenting and advertising 
> the stuff in contrib/.

I see that contrib/ does not even have a README file.  How about
starting one with your contributions at least (and of course what-
ever else you'd like to mention, though I don't want to sign you
up for everything already there)?

And we'll take it from there?

Or is it something else you have in mind?

Gerald
diff mbox

Patch

Index: gcc/config/bfin/bfin.c
===================================================================
--- gcc/config/bfin/bfin.c      (revision 190438)
+++ gcc/config/bfin/bfin.c      (working copy)
@@ -3478,7 +3478,7 @@ 
       /* If we have to insert the LSETUP before a jump, count that jump in the
         length.  */
       if (VEC_length (edge, loop->incoming) > 1
-         || !(VEC_last (edge, loop->incoming).flags & EDGE_FALLTHRU))
+         || !(VEC_last (edge, loop->incoming)->flags & EDGE_FALLTHRU))
        {
          gcc_assert (JUMP_P (insn));
          insn = PREV_INSN (insn);
@@ -3747,7 +3747,7 @@ 
     {
       rtx prev = BB_END (loop->incoming_src);
       if (VEC_length (edge, loop->incoming) > 1
-         || !(VEC_last (edge, loop->incoming).flags & EDGE_FALLTHRU))
+         || !(VEC_last (edge, loop->incoming)->flags & EDGE_FALLTHRU))
        {
          gcc_assert (JUMP_P (prev));
          prev = PREV_INSN (prev);