This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bug Report


[I'm resending this message because I think it was caught by your spam
filter the first time through.]

Hi--

In porting gcc to MacOS, I have run into what looks like a bug.

    The problem is a mismatch in the 'emulation' that is specified by gcc
and that which is supported by collect, when building a cross-compiler for
the powerpc-linux-gnu target.  Because of this mismatch, the cross-compiler
will not work together with the cross-linker.

    The cross-compiler/linker are hosted on MacOS, but the identical problem
occurs when hosting a cross-compiler on i586-linux-gnu.

    gcc will specify "-m elf32ppclinux" when invoking collect (as witnessed
by 'powerpc-linux-gnu-gcc -v'), whereas 'powerpc-linux-gnu-ld -V' reports
that the supported emulation is "elf32ppc".

    I have checked on an actual powerpc-linux-gnu machine that the 'ld -V'
on a native linker indeed reports "elf32ppc".  So the problem appears to be
an incorrect 'spec' for gcc.

    I have fixed this by editing the emulation argument in the built-in
spec, and rebuilding the cross-compiler.  On line 39 of

    gcc-2.95.2/gcc/config/rs6000/linux.h

I have changed "-m elf32ppclinux" to "-m elf32ppc".  This appears to have
solved the problem.

Hope this helps,

Ben


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]