Patch to fix bootstrap on hppa64-hp-hpux11.23 with HP compiler

Zack Weinberg zack@codesourcery.com
Sun Jan 23 18:28:00 GMT 2005


"Joseph S. Myers" <joseph@codesourcery.com> writes:

> This patch fixes bootstrap on hppa64-hp-hpux11.23 with HP's 64-bit
> compiler (cc +DD64).  The following issues apply with this compiler:
>
> * It appears to interpret -pedantic as -p (profiling), leading to an
>   undefined reference to _mcount when linking makedepend.  Fixed by
>   only testing -pedantic when bootstrapping with GCC.

This bit is OK.

> * It doesn't understand inline, and expects extern functions called
>   from unused static (inline) functions to be defined (at least at -O0
>   which is used for bootstrapping), yielding link errors in generator
>   programs where they are not.  Fixed in the case of recog.h by not
>   defining the inline function if GENERATOR_FILE,

This bit also.

> In turn this requires a definition of ggc_free in ggc-none.c.

And this bit.

> in the case of vec.h and bitmap.h by including the corresponding
> source files in the generator programs rather than trying to specify
> exactly which inline functions could be used in generator programs
> and conditioning out the rest. 

But I don't like this bit.  Increasing the set of files compiled into
the generator programs, increases the set of files which force a
complete rebuild, or at least a complete regeneration of insn-*, if
you change them.  Also, it tends to cause Make to queue generation of
insn-* later in the build, increasing the odds that a parallel make
will get serialized behind insn-attrtab.c.

As it happens, the only reason bitmap.h and vec.h are included at all
is to make their types accessible to the code that we take out of
context and attempt to evaluate at compile time in insn-conditions.c.
And that file isn't doing anything useful when the bootstrap compiler
isn't GCC, anyway.  Therefore, I suggest that you try modifying
genconditions.c so that the file it generates is mostly elided when
not compiled with GCC - something like

#include "bconfig.h"
#include "system.h"

#if GCC_VERSION < 3001
#include "dummy-conditions.c"
#else

/* file as currently generated here */

#endif

zw



More information about the Gcc-patches mailing list