This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
I have an ia64 cross compile problem. If anyone can help I would be grateful.
I need to compile some code and send it as a library for use by a remote end user. Their system is ia64 gcc-3.2.3-glibc-2.3.2.
Linux ladon1 2.4.3-12smp #1 SMP Fri Jun 8 13:06:07 EDT 2001 ia64 unknown % /usr/bin/gcc -v Reading specs from /usr/lib/gcc-lib/ia64-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) % rpm -q glibc glibc-2.2.3-10
I.E. both gcc and glibc are older versions that the ones i need to compile and provide libraries for.
I am unable to get the machine's OS/compiler or glibc updated so this has lead me to trying to use crosstool to compile gcc-3.2.3-glibc-2.3.2. Ideally I want to be able to run this new gcc-glibc combo directly on my local ia64 box.
My first attempt was to attempt to compile gcc-3.2.3-glibc-2.3.2 on the local ia64 box directly using an adapted demo-ia64.sh
[lp01@hersh crosstool-0.38]$ more ia64.sh #!/bin/sh set -ex TARBALLS_DIR=/home/psp/public/crosstool RESULT_TOP=/home/psp/pkg/crosstool/ia64-unknown-linux-gnu GCC_EXTRA_CONFIG=--disable-gcc-checking GLIBC_EXTRA_CONFIG=--disable-gcc-checking BINUTILS_EXTRA_CONFIG=--disable-gcc-checking export TARBALLS_DIR RESULT_TOP export GCC_EXTRA_CONFIG export GLIBC_EXTRA_CONFIG export BINUTILS_EXTRA_CONFIG GCC_LANGUAGES="c" export GCC_LANGUAGES http_proxy=www-proxy.gre.ac.uk:3128 export http_proxy mkdir -p $RESULT_TOP eval `cat ia64.dat gcc-3.2.3-glibc-2.3.2.dat` sh all.sh --notest echo Done.
OK, so then I tried to produce an gcc-3.2.3-glibc-2.3.2 via a two stage "cross compile" (I hope I have used the correct terminology here) using another x86 based machine.
STAGE 1 --------- The first stage was performed on an i686 box I have access too. It's details are:-
[lp01@hersh crosstool-0.38]$ more cross-compile-stage1-ia64.sh #!/bin/sh set -ex unset LD_LIBRARY_PATH TARBALLS_DIR=/home/psp/public/crosstool RESULT_TOP=/home/psp/pkg/crosstool/`config.guess` export TARBALLS_DIR RESULT_TOP export GCC_EXTRA_CONFIG export GLIBC_EXTRA_CONFIG export BINUTILS_EXTRA_CONFIG GCC_LANGUAGES="c" export GCC_LANGUAGES mkdir -p $RESULT_TOP eval `cat ia64.dat gcc-3.2.3-glibc-2.3.2.dat` sh all.sh --notest [lp01@hersh crosstool-0.38]$
This produced a ia64 compiler that ran on the i686 box and would compile and link an ia64 executable that runs on my local ia64 box fine and also the end user's box. Hurray! But this still does not give me a compiler that runs directly on the ia64 box which is really what i would like to achieve.
STAGE 2 ---------
I attempted to use the compiler from stage 1 to compile a "native" ia64 compiler that will run on my local ia64 box and allow me to compile, link and run code from a gcc-3.2.3-glibc-2.3.2 combo.
#!/bin/sh set -ex unset LD_LIBRARY_PATH TARBALLS_DIR=/home/psp/public/crosstool RESULT_TOP=/home/psp/pkg/crosstool/ia64-unknown-linux-gnu CROSS_COMPILER_DIR=/home/psp/pkg/crosstool/i686-pc-linux-gnu/gcc-3.2.3-glibc-2.3.2/ia64-unknown-linux-gnu/bin CC=$CROSS_COMPILER_DIR/ia64-unknown-linux-gnu-gcc AR=$CROSS_COMPILER_DIR/ia64-unknown-linux-gnu-ar RANLIB=${CROSS_COMPILER_DIR}/ia64-unknown-linux-gnu-ranlib PATH=${CROSS_COMPILER_DIR}:${PATH} export CC AR RANLIB PATH GCC_EXTRA_CONFIG=--disable-gcc-checking GLIBC_EXTRA_CONFIG=--disable-gcc-checking BINUTILS_EXTRA_CONFIG=--disable-gcc-checking GCC_HOST=ia64-unknown-linux-gnu export GCC_HOST export TARBALLS_DIR RESULT_TOP export GCC_EXTRA_CONFIG export GLIBC_EXTRA_CONFIG export BINUTILS_EXTRA_CONFIG GCC_LANGUAGES="c" export GCC_LANGUAGES mkdir -p $RESULT_TOP eval `cat ia64.dat gcc-3.2.3-glibc-2.3.2.dat` sh all.sh --notest
N.B. I had to pass in RANLIB as well as CC and AR to get this to run through. (use of RANLIB is not mentioned in the crosstool howto)
However, although I can use the new compiler on the ia64 box to compile it is failing at the link stage with the message:-
The error message presumbly means that ld is failing to find the correct glibc libraries to actually run itself.
My glibc and gcc build knowledge is basically 10 days old now :-( and after quite a lot of googling I've not got any furthur. Can anyone shed light on what I need to do to get the link stage to work please ? What is the bit of magic i've missed out ?
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.org
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |