On 5/17/05, Mark Mitchell <[EMAIL PROTECTED]> wrote:
> Ian Lance Taylor wrote:
> 
> >>1. Remove the use of config.h and HAVE_*_H.
> >>
> >>2. Modify the generator not to depend on libiberty headers, including
> >>hashtab.h, by substituting a simple dictonary object.
> >>
> >>3. Adjust struct-layout-1.exp accordingly.
> >
> > This is what I would recommend anyhow.
> 
> Done with the attached patch.  Tested on x86_64-unknown-linux-gnu by
> comparing the generated files with and without the patch, as well as by
> running the testsuite.  The time taken to run the struct layout tests
> (including their generation) was not measurably different before and
> after the change.  Applied to 4.0 and mainline.

This broke testing on machines without an installed libiberty.h:

spawn gcc-3.4 -g -o
/tmp/gcc-obj/gcc/testsuite/gcc.dg-struct-layout-1_generate
/net/alwazn/home/rguenth/src/gcc/cvs/gcc-4.1/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
/net/alwazn/home/rguenth/src/gcc/cvs/gcc-4.1/gcc/testsuite/gcc.dg/compat/generate-random.c
/net/alwazn/home/rguenth/src/gcc/cvs/gcc-4.1/gcc/testsuite/gcc.dg/compat/generate-random_r.c
^M
/net/alwazn/home/rguenth/src/gcc/cvs/gcc-4.1/gcc/testsuite/gcc.dg/compat/generate-random.c:55:23:
libiberty.h: No such file or directory^M
/net/alwazn/home/rguenth/src/gcc/cvs/gcc-4.1/gcc/testsuite/gcc.dg/compat/generate-random_r.c:56:23:
libiberty.h: No such file or directory^M
WARNING: Could not compile gcc.dg/compat/struct-layout-1 generator

Note how
  1. it uses $(CC) for building, not the built compiler
  2. it doesn't provide an include path to libiberty.h

Richard.

Reply via email to