This is the mail archive of the
mailing list for the crossgcc project.
Re: i386 -> powerpc cross-compiler
- To: email@example.com
- Subject: Re: i386 -> powerpc cross-compiler
- From: Jonathan Larmour <firstname.lastname@example.org>
- Date: Fri, 23 Jul 1999 23:29:11 +0000
- CC: email@example.com
- Organization: Cygnus Solutions
- References: <4.1.19990723151320.009f9cd0@imap>
- Reply-To: firstname.lastname@example.org
James Piechota wrote:
> For a little while now I've been trying to build a i386-redhat-linux to
> powerpc-motorola-eabi gcc cross-compiler.
> Unfortunately, for the purposes of future uses I must use gcc-2.8.1 and
> gdb-4.17 (ironically gdb-4.18 built smoothly).
Why is this ironic? It's probably for the good reason that someone has made
GDB more portable.
> The error message I got while trying to make gdb is this:
> in file included from /usr/include/sys/ioctl.h:30
> from /usr/include/sys/mount.h:27
> from ../../../gdb-4.17/sim/ppc/emul_unix.c:113:
> /usr/include/ioctl-types.h:37: redefinition of 'struct termios'
> Part of the problem is that newlib did not have the file 'mount.h' so the
> compiler went looking in /usr/include.
No, emul_unix.c is meant to be compiled on your host system, not your
cross-compiler. If you look you'll see it's compiled by gcc, not
The solution is this trivial patch, which is what's in GDB 4.18:
RCS file: /cvs/cvsfiles/devo/sim/ppc/emul_unix.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -5 -p -r1.10 -r1.11
--- emul_unix.c 1998/03/13 01:30:42 1.10
+++ emul_unix.c 1998/06/26 18:22:48 1.11
@@ -107,14 +107,10 @@
# include <dirent.h>
# define NAMLEN(dirent) strlen((dirent)->d_name)
# define dirent direct
Cygnus Solutions, 35 Cambridge Place, Cambridge, UK. Tel: +44 (1223) 728762
"I used to have an open mind but || Get yer free open source RTOS's here...
my brains kept falling out." || http://sourceware.cygnus.com/ecos
Help fight spam! http://spam.abuse.net/ These opinions are all my own fault
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
To remove yourself from the crossgcc list, send
mail to email@example.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.