unrecognised emulation mode after building powerpc-linux cross

Daris A Nevil dnevil@snmc.com
Tue Aug 10 08:38:00 GMT 1999


Graham,

I ran into the same problem building my 386-based ppc linux cross development tools.  I tracked the problem down to a file in the binutils, rs6000/linux.h.  The ChangeLog said the file had been modified by Cort Dougan.  I wrote him and this was his reply is shown below.  He suggested that I get the latest binutils.  But I was lazy, and just modified rs6000/linux.h to contain the emulation string "elf32ppclinux" instead of "elf32ppc".  That seemed to fix the problem for me.  Let me know if it works for you.

Daris Nevil
SNMC

Cort Dougan wrote:

I didn't know that had been committed yet.  You'll need to grab the latest
binutils (I grab it via CVS).

The change was to change the load address to one that AIX could emulate
instead of the current one.  AIX is adding linux/ppc support and they asked
me to make the job easier on them with that change.

Let me know if you have trouble with the latest binutils.

} Daris Nevil wrote:
} I am attempting to compile gcc-2.95 as a cross-compiler on a 386-linux
} platform (redhat 5.2) with a egcs-1.1.2 native compiler.  I am using the
} gas-990418 binutils.  While building the compiler I got an error from
} the linker that it does not support "elf32ppclinux" emulation.  It only
} support "elf32ppc".  I read in the ChangeLog for gcc-2.95 that on May 31
} you changed rs6000/linux.h to now use "elf32ppclinux".  I was wondering
} what the reason is for that change, and what binutils (ld) you are using
} to support that emulation type.



Graham Stoney wrote:

> Hi there,
>
> I'm wondering if anyone can help me out with a problem I'm having building a
> powerpc-linux cross development environment on a Red Hat Linux
> i686-pc-linux-gnu system, using gcc-2.95, binutils-2.9.1.0.25 and newlib-1.8.1.
>
> Each was configured in their own objdir, as follows:
>
> ../../binutils-2.9.1.0.25/configure --target=powerpc-linux --prefix=/home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu
>
> ../../gcc-2.95/configure --target=powerpc-linux --prefix=/home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu --with-newlib --with-gnu-as --with-gnu-ld
>
> ../../newlib-1.8.1/configure --target=powerpc-linux --prefix=/home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu
>
> I then built and installed the compiler, binutils and newlib; but building my
> hello world executable fails as follows:
>
> bash$ powerpc-linux-gcc hello.c
> /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/powerpc-linux/bin/ld: unrecognised emulation mode: elf32ppclinux
> Supported emulations: elf32ppc
>
> This looks like a simple configuration problem, but can anyone suggest why gcc
> is asking for the wrong emulation from ld? (For the adventurous, the output of
> gcc with -v is included below)
>
> Thanks,
> Graham
>
> bash$ powerpc-linux-gcc -v hello.c
> Reading specs from /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/specs
> gcc version 2.95 19990728 (release)
>  /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/cpp -lang-c -v -D__GNUC__=2 -D__GNUC_MINOR__=95 -DPPC -D__ELF__ -Dpowerpc -D__PPC__ -D__ELF__ -D__powerpc__ -D__PPC -D__powerpc -Acpu(powerpc) -Amachine(powerpc) -D__CHAR_UNSIGNED__ -D_CALL_SYSV -D_BIG_ENDIAN -D__BIG_ENDIAN__ -Amachine(bigendian) -D_ARCH_PPC -D__unix__ -D__linux__ -Dunix -Dlinux -Asystem(unix) -Asystem(posix) hello.c /tmp/ccICsY2q.i
> GNU CPP version 2.95 19990728 (release) (PowerPC GNU/Linux)
> #include "..." search starts here:
> #include <...> search starts here:
>  /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/include
>  /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/../../../../powerpc-linux/include
> End of search list.
> The following default directories have been omitted from the search path:
>  /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/../../../../include/g++-3
>  /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/../../../../powerpc-linux/sys-include
> End of omitted list.
>  /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/cc1 /tmp/ccICsY2q.i -quiet -dumpbase hello.c -version -o /tmp/ccmwN5dZ.s
> GNU C version 2.95 19990728 (release) (powerpc-linux) compiled by GNU C version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release).
>  /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/powerpc-linux/bin/as -mppc -V -Qy -o /tmp/cccIYEbB.o /tmp/ccmwN5dZ.s
> GNU assembler version 2.9.1 (powerpc-linux), using BFD version 2.9.1.0.25
>  /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/collect2 -m elf32ppclinux -dynamic-linker /lib/ld.so.1 crt1.o crti.o /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/crtbegin.o -L/home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95 -L/home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/powerpc-linux/lib /tmp/cccIYEbB.o /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/libgcc.a -lc /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/libgcc.a /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/lib/gcc-lib/powerpc-linux/2.95/crtend.o crtn.o
> /home/server/greyham/linux/ppc/tooldir/host/i686-pc-linux-gnu/powerpc-linux/bin/ld: unrecognised emulation mode: elf32ppclinux
> Supported emulations: elf32ppc
> collect2: ld returned 1 exit status
>
> _______________________________________________
> New CrossGCC FAQ: http://www.objsw.com/CrossGCC
> _______________________________________________
> To remove yourself from the crossgcc list, send
> mail to crossgcc-request@cygnus.com with the
> text 'unsubscribe' (without the quotes) in the
> body of the message.



_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.


More information about the crossgcc mailing list