cross building gcc 3.4.3 for ia64 builds on i386 host......

Ray Bryant raybry@sgi.com
Tue Feb 1 01:15:00 GMT 2005


I'm having trouble building gcc 3.4.3 to run under ia32-linux and use
ia64-linux as a target.  Here's what I did:

(1)  downloaded

http://www.kernel.org/pub/linux/devel/binutils/binutils-2.15.94.0.2.tar.bz2

and

ftp://ftp.gnu.org/gnu/gcc/gcc-3.4.3/gcc-3.4.3.tar.gz

(2)  unpacked both of the above.  In same top level directory, created
build-binutils and build-gcc.

(3)  cd build-binutils
../binutils-2.15.94.0.2/configure --prefix=/usr/local/gcc-3.4.3  \
--target=ia64-linux
make

This builds fine.

make install

to get the new binutils installed.

(4)  cd ../build-gcc;
../gcc-3.4.3/configure --prefix=/usr/local/gcc-3.4.3 --target=ia64-linux \
--enable-languages=c
make

This fails compiling ../gcc-3.4.3/gcc/config/ia64/fde-glibc.c with errors
that start with:

../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:36:20: stdlib.h: No such file or 
directory
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:37:18: link.h: No such file or 
directory
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:42:3: #error You need GLIBC 2.2.4 
or later on IA-64 Linux
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:47: error: parse error before 
"Elf64_Addr"
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:47: warning: no semicolon at end 
of struct or union
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:51: error: parse error before '}' 
token
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:54: warning: "struct dl_phdr_info" 
declared inside parameter list
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:54: warning: its scope is only 
this definition or declaration, which is probably not what you want
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c: In function 
`_Unwind_IteratePhdrCallback':
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:57: error: syntax error before '*' 
token
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:59: error: `Elf64_Addr' undeclared 
(first use in this function)
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:59: error: (Each undeclared 
identifier is reported only once
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:59: error: for each function it 
appears in.)
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:59: error: parse error before 
"load_base"
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:64: error: dereferencing pointer 
to incomplete type
../../gcc-3.4.3/gcc/config/ia64/fde-glibc.c:65: error: dereferencing pointer 
to incomplete type
...

and quickly get worse from there.

I tried copying stdlib.h and link.h from the /usr/include of the host i386
box into the gcc-3.4.3/include direcotry.  It found the files, but got lots
of new and different errors.

Any suggestions?

I've searched (via Google) for hints or howto's on how to build a gcc cross
compiler, but have not had much success.  Does such a thing exist?

Many thanks, in advance.

Please cc: me as I am not subscribed to the list.

-- 
Best Regards,
Ray
-----------------------------------------------
                   Ray Bryant
512-453-9679 (work)         512-507-7807 (cell)
raybry@sgi.com             raybry@austin.rr.com
The box said: "Requires Windows 98 or better",
            so I installed Linux.
-----------------------------------------------



More information about the Gcc-help mailing list