This is the mail archive of the
mailing list for the GCC project.
Re: [patch, bootstrap, hppa] Patch for bootstrap/40338
- From: Ian Lance Taylor <iant at google dot com>
- To: sje at cup dot hp dot com
- Cc: gcc-patches at gcc dot gnu dot org, dave at hiauly1 dot hia dot nrc dot ca
- Date: Fri, 12 Jun 2009 18:34:01 -0700
- Subject: Re: [patch, bootstrap, hppa] Patch for bootstrap/40338
- References: <200906121704.n5CH41126053@lucas.cup.hp.com>
Steve Ellcey <email@example.com> writes:
> The first is that we compile C objects with '-fPIC -O2 -g -fexceptions'
> and on 32 bit PA SOM files that causes us to call get_file_function_name
> with type == 'F' and first_global_object_name not set (because of
> -fPIC). This causes us to generate a random symbol name during
> compilation and makes objects different on each compilation. We could
> workaround this by using -frandom-seed='some-string' on our compilations
> but that still leaves a second problem.
> The second problem is that lib2funcs.asm is compiled by GCC with the
> -xassembler-with-cpp and -g flags. -xassembler-with-cpp causes the file
> to be preprocessed and written to a temporary file (with a random name)
> and then assembled. Due to the way that SOM and STABS work we wind up
> writing that random name out to the object file. Even if the file had a
> .file entry in it as the first line, the GNU assembler will write out
> the real file name before changing it to the name given in the .file
> This could be worked around by preprocessing the file by hand into a known
> file name and then assembling it but we might have to do that for all
> systems since the rule for building this file is part of the generic
> Makefile and not in a t-* fragment specific to hppa.
Personally I would prefer to see the workarounds implemented. I think
that file comparisons are an excellent way to find problems in the
compiler, and we should strive to make that possible rather than
But I will let the build system maintainers make the final decision.