Porting gcc to HP Nonstop Ux
Jim Wilson
wilson@tuliptree.org
Thu May 1 22:35:00 GMT 2003
praveen wrote:
> In trying to port gcc, I was able to build gcc till stage2. During the
> stage3 build, I got the following problem:
> /usr/lib/cmplrs/cc/ld:
> gengenrtl.o: Error: Unresolved:
> formats
Since the stage2 output looks OK, and the stage3 output doesn't, this
means the stage2 compiler is broken. It must have been miscompiled by
the stage1 compiler. This implies that there is something wrong with
your port, since your port is generating bad code. It is also possible
that the stage1 gcc was miscompiled by the host compiler.
This may take you some time to track down. You need to first figure out
what is wrong with the stage2 compiler. You need to figure out why it
is generating bad code. Adding a -S option to the gengenrtl.o build
command may help, or alternatively you can use --save-temps. You will
have to debug the stage2 compiler to figure out what is wrong with it.
You should be able to identify a line of code that has been miscompiled.
Comparing stage1 .s output against stage2 .s output should be helpful.
Then you debug the stage1 compiler to figure out why that line of code
was miscompiled. If this is an optimizer bug, then add the -da option
to dump all debugging dumps. You can use this info to narrow down where
the miscompilation occurred. Once you know what is wrong with the
stage1 compiler, you should be able to fix your port to avoid the problem.
Jim
More information about the Gcc-bugs
mailing list