Re: Commit: BFIN: Fix use of VEC_last macro in bfin.c
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
Re: Commit: BFIN: Fix use of VEC_last macro in bfin.c
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.
Re: Commit: BFIN: Fix use of VEC_last macro in bfin.c
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.) -- Joseph S. Myers jos...@codesourcery.com
Re: Commit: BFIN: Fix use of VEC_last macro in bfin.c
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
Re: Commit: BFIN: Fix use of VEC_last macro in bfin.c
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.
Re: Commit: BFIN: Fix use of VEC_last macro in bfin.c
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
Re: Commit: BFIN: Fix use of VEC_last macro in bfin.c
On 12-08-16 05:49 , Nick Clifton wrote: gcc/ChangeLog 2012-08-16 Nick Clifton * 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.
Commit: BFIN: Fix use of VEC_last macro in bfin.c
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(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(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 * config/bfin/bfin.c (hwloop_optimize): Fix use of VEC_last macro. 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);