This is the mail archive of the
mailing list for the GCC project.
Re: Patch to fix bootstrap on hppa64-hp-hpux11.23 with HP compiler
- From: Zack Weinberg <zack at codesourcery dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 23 Jan 2005 10:28:27 -0800
- Subject: Re: Patch to fix bootstrap on hppa64-hp-hpux11.23 with HP compiler
- References: <Pine.LNX.firstname.lastname@example.org>
"Joseph S. Myers" <email@example.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
#if GCC_VERSION < 3001
/* file as currently generated here */