Building IA-64 toolchain
Quoted 4 lines · navin
I am doing a project on compilers.I have to build gcc for ia64.I
did build the binutils .In that case i didn't get any compilation errors. HOSTMACHINE=i386 pentium
TARGETMACHINE=ia64
Gcc includes libraries that require access to the standard C library in order to build. You must provide the standard C library yourself somehow. You have not done this.
If you only want a compiler for building the kernel, then you don't need any libraries. In that case, you are already done. What you have is good enough to build a kernel.
If you need a complete gcc build, then you will need a C library. If you have access to a running ia64-linux system, the easy way to do this is to copy the IA-64 linux /usr/include and /usr/lib to the x86 machine, and then configure using --with-headers= and --with-libs= pointing at the IA-64 header and library directories respectively.
An alternative method is to try to build gcc and glibc in parallel. This is not easy. Offhand, I don't know how to do it, as I have never tried to do this.
Quoted 1 line
--without-headers
There is no such configure option. The headers are required, and there is no way to get around this.
Quoted 4 lines
In file included from
../../gcc-3.2/gcc/libgcc2.c:37:../../gcc-3.2/gcc/tsystem.h:63:19:stdio.h: No such file or directory../../gcc-3.2/gcc/tsystem.h:66:23:sys/types.h: No such file or directory In file included from
The standard C library header files are missing.
Jim
Quoted 3 lines · navin
I even tried copying the nue ia64-hp-something headers files and
giving gcc the option with --header to that directory but it messed up as i previously mentioned
You never said how this failed. Your previous message was about a build using the non-existent --without-header configure option. Since I don't know what error you got when you used --with-headers, I can't help you.
Quoted 2 lines
The problem is that building an alpha target is easy .But when i apply the same rules to ia64 it breaks.GCC breaks.
Why does this not work for IA-64? A build procedure that works for alpha-linux should also work for ia64-linux.
Jim
Hi,
I am doing a project on compilers.I have to build gcc for ia64.I
did build the binutils .In that case i didn't get any compilation errors.
HOSTMACHINE=i386 pentium
TARGETMACHINE=ia64
Next i had to build gcc (source gcc-3.2) for ia64. I configured
it with the following option
CFLAGS="-O2 -Dinhibit_libc" ../gcc-3.2/configure --target=ia64-unknown-linux --prefix=/FPS/Bunny/work/ia64.bak --enable-languages=c --disable-shared --disable-multilib --enable-threads=single --without-headers
and with a lot of other options like removing the --without-headers part and another time adding other options with-headers=asm-ia64 (kernel sources) . Every time i get error saying
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi /FPS/Bunny/work/gcc-build3/gcc/xgcc -B/FPS/Bunny/work/gcc-build3/gcc/ -B/FPS/Bun
ny/work/ia64.bak/ia64-unknown-linux/bin/ -B/FPS/Bunny/work/ia64.bak/ia64-unknown
-linux/lib/ -isystem /FPS/Bunny/work/ia64.bak/ia64-unknown-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-
prototypes -isystem ./include -fPIC -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-I. -I. -I../../gcc-3.2/gcc -I../../gcc-3.2/gcc/. -I../../gcc-3.2/gcc/config -I.
./../gcc-3.2/gcc/../include -DL_muldi3 -c ../../gcc-3.2/gcc/libgcc2.c -o libgcc
/./_muldi3.o
In file included from tconfig.h:21,
from ../../gcc-3.2/gcc/libgcc2.c:36:
../../gcc-3.2/gcc/config/ia64/linux.h:58:26: sys/ucontext.h: No such file or dir
ectory
In file included from ../../gcc-3.2/gcc/libgcc2.c:37:../../gcc-3.2/gcc/tsystem.h:63:19: stdio.h: No such file or directory ../../gcc-3.2/gcc/tsystem.h:66:23: sys/types.h: No such file or directory In file included from /FPS/Bunny/work/ia64.bak/ia64-unknown-linux/sys-include/st ring.h:12,
from ../../gcc-3.2/gcc/tsystem.h:76,
from ../../gcc-3.2/gcc/libgcc2.c:37:/FPS/Bunny/work/ia64.bak/ia64-unknown-linux/include/linux/config.h:4:28:
linux/autoconf.h: No such file or directory
In file included from ../../gcc-3.2/gcc/libgcc2.c:37:../../gcc-3.2/gcc/tsystem.h:80:20: stdlib.h: No such file or directory In file included from /FPS/Bunny/work/ia64.bak/ia64-unknown-linux/lib/include/li mits.h:117,
from /FPS/Bunny/work/gcc-build3/gcc/include/limits.h:132,
from
/FPS/Bunny/work/gcc-build3/gcc/include/syslimits.h:7,
from /FPS/Bunny/work/gcc-build3/gcc/include/limits.h:11,
from ../../gcc-3.2/gcc/tsystem.h:84,
from ../../gcc-3.2/gcc/libgcc2.c:37:/FPS/Bunny/work/ia64.bak/ia64-unknown-linux/sys-include/limits.h:117:75:
no incl
ude path in which to find limits.h
In file included from ../../gcc-3.2/gcc/libgcc2.c:37:../../gcc-3.2/gcc/tsystem.h:87:18: time.h: No such file or directory make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/FPS/Bunny/work/gcc-build3/gcc' make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/FPS/Bunny/work/gcc-build3/gcc'
I also referred to many cross GCC faq and howto's but no help .The error still pops up.
Also from some of the previous posts i found that if i am building on a pentium or some other machine there is a trick involved.Andreas Jaegar told me that i had to install-headers before compiling the bootstrap gcc.He said to contact you guys as i don't have the headers for ia64.I have the sources for kernel which contain asm-ia64 and glibc-2.3.I don't know how to avoid the error.
Thank You
Nevin
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · navin
navin> Also from some of the previous posts i found that if i am navin> building on a pentium or some other machine there is a trick navin> involved.Andreas Jaegar told me that i had to install-headers navin> before compiling the bootstrap gcc.He said to contact you navin> guys as i don't have the headers for ia64.I have the sources navin> for kernel which contain asm-ia64 and glibc-2.3.I don't know navin> how to avoid the error.
Have you tried NUE? It's available here:
http://www.software.hp.com/products/LIA64/overview2a.htm
--david
Quoted 10 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · navin
navin> Also from some of the previous posts i found that if i am navin> building on a pentium or some other machine there is a trick navin> involved.Andreas Jaegar told me that i had to install-headers navin> before compiling the bootstrap gcc.He said to contact you navin> guys as i don't have the headers for ia64.I have the sources navin> for kernel which contain asm-ia64 and glibc-2.3.I don't know navin> how to avoid the error.
Quoted 4 lines
Have you tried NUE? It's available here:
Yeah i have tried NUE.It is good and gcc is 2.95 something and glibc 2.0.
I even tried copying the nue ia64-hp-something headers files and
giving gcc the option with --header to that directory but it messed up as i previously mentioned
I don't know what the error is.Can you tell me where i can find the docs or how do i build the parallel glibc and gcc . It is nasty but it works. I saw this on earlier lists other ports but hardly found the procedure.
The problem is that building an alpha target is easy .But when i apply the same rules to ia64 it breaks.GCC breaks.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · navin
Navin> I don't know what the error is.Can you tell me where i can Navin> find the docs or how do i build the parallel glibc and gcc Navin> . It is nasty but it works. I saw this on earlier lists Navin> other ports but hardly found the procedure.
I don't build cross-compilers myself anymore. I suppose you could ask the GCC folks for help. Another option might be to get an account on an ia64 machine (e.g., testdrive.hp.com).
--david
Quoted 3 lines
An alternative method is to try to build gcc and glibc in parallel. This is not easy. Offhand, I don't know how to do it, as I have never tried to do this.
Carlos has a very nice howto on this topic (for parisc-linux, but should work similarly for ia64-linux):
http://www.parisc-linux.org/toolchain/PARISC-Linux-XC-HOWTO.html
randolph
Signature · 3 lines
Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/
Quoted 8 lines · Jim Wilson
Quoted 3 lines · navin
I even tried copying the nue ia64-hp-something headers files and
giving gcc the option with --header to that directory but it messed up as i previously mentionedYou never said how this failed. Your previous message was about a build using the non-existent --without-header configure option. Since I don't know what error you got when you used --with-headers, I can't help you.
Na..This is not for kernel building. It for ia64 developemnt (C programs).
CFLAGS="-O2 -Dinhibit_libc" ../gcc-3.2/configure
--target=ia64-unknown-linux --prefix=/FPS/Bunny/work/ia64.bak/ --enable-languages=c --disable-shared --disable-multilib --enable-threads=single --with-headers=/FPS/Bunny/work/nue/include
I have copied /nue/usr/include and given that headers.make reports the following error.
In file included from config.h:2,
from ../../gcc-3.2/gcc/config/ia64/fde-glibc.c:34:
auto-host.h:344:1: warning: "_GNU_SOURCE" redefined ../../gcc-3.2/gcc/config/ia64/fde-glibc.c:32:1: warning: this is the location of the previous definition ../../gcc-3.2/gcc/config/ia64/fde-glibc.c:42:3: #error You need GLIBC 2.2.4 or later on IA-64 Linux ../../gcc-3.2/gcc/config/ia64/fde-glibc.c:54: warning: `struct dl_phdr_info' declared inside parameter list ../../gcc-3.2/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.2/gcc/config/ia64/fde-glibc.c: In function `_Unwind_IteratePhdrCallback':../../gcc-3.2/gcc/config/ia64/fde-glibc.c:64: dereferencing pointer to incomplete type ../../gcc-3.2/gcc/config/ia64/fde-glibc.c:65: dereferencing pointer to incomplete type ../../gcc-3.2/gcc/config/ia64/fde-glibc.c:69: dereferencing pointer to incomplete type ../../gcc-3.2/gcc/config/ia64/fde-glibc.c:70: dereferencing pointer to incomplete type ../../gcc-3.2/gcc/config/ia64/fde-glibc.c:77: dereferencing pointer to incomplete type../../gcc-3.2/gcc/config/ia64/fde-glibc.c: In function `_Unwind_FindTableEntry':../../gcc-3.2/gcc/config/ia64/fde-glibc.c:160: warning: implicit declaration of function `dl_iterate_phdr'
make[2]: *** [libgcc/./fde-glibc.o] Error 1
make[2]: Leaving directory `/FPS/Bunny/work/gcc-build2/gcc' make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/FPS/Bunny/work/gcc-build2/gcc'
make: *** [all-gcc] Error 2
glibc-2.2.93 glibc-common-2.2.93
Please note that i have not include --with-libs . Hope this libs are fine.Also i have 2.3.
Quoted 6 lines
Quoted 3 lines
The problem is that building an alpha target is easy .But when i apply the same rules to ia64 it breaks.GCC breaks.
Why does this not work for IA-64? A build procedure that works for alpha-linux should also work for ia64-linux.
Exactly / The build procedure should work for any target system. Also in the previous case i didn't have to copy the header files.Maybe they are compatible with the standard header files and this one is not.
Quoted 10 lines
Jim
_______________________________________________
Linux-IA64 mailing list
[email protected]
http://lists.linuxia64.org/lists/listinfo/linux-ia64
Quoted 2 lines · navin
../../gcc-3.2/gcc/config/ia64/fde-glibc.c:42:3: #error You need GLIBC 2.2.4 or later on IA-64 Linux
The glibc copy you are using is too old. This glibc will work with gcc 2.96 (sic), but it won't work with gcc 3. There were related changes made to glibc and gcc to enable unwind info to work correctly, which was needed for C++ exception handling support. Thus you can't use a new gcc with an old glibc or vice versa.
David Mosberger mentioned testdrive.hp.com or something like that. Perhaps you could get an account there, and then get a newer copy of the glibc header files from there.
Jim