This is the mail archive of the crossgcc@sources.redhat.com 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] |
Hi, I've been trying for some time now to set up gcc 3.2.3 as a cross compiler for mips-sgi-irix6 under i686-pc-linux-gnu. (That is, I want a compiler that runs on Linux and gives me code for Irix 6.5. And that because we have fewer and slower SGI machines than Linux PCs, and compiling on Irix gets loong.) I have made quite some progress, but now I'm stuck and I could use some help. Oh, and I do need C++. My host system is a Red Hat 7.3, with that infamous gcc `version 2.96'. Quick resume of the questions, with details following: 0. Handholding would be appreciated. I have complete typescripts of my attempts, so I should be able to answer specific questions. 1. Why does ld have /usr/lib32 hardcoded? (I think that might be a question for the binutils folks.) 2. Can someone enlighten me how I'm supposed to use --with-sysroot? I didn't get it to work (but didn't try hard, either). 3. Neither Irix' libc.a nor libc.so seem to be sufficient for the build; one of them is needed for the first part, the other for the second. Why? 4. Why does the build prefer header files in `newlib/...' over the seemingly system-specific ones in `os/irix/irix6.5/'? (I tried --without-newlib once, which didn't seem to change anything.) 5. What's wrong with cxxabi.h, and how to I get it to continue? Here's what I've done so far: setenv PREFIX=/work/gcc-32-irix setenv WORK=/work/gcc-32-cross . Compiled the GNU binutils-030429 snapshot with ./configure --target=mips-sgi-irix6 --prefix=$PREFIX make; make install (no problems here) set path=( $PREFIX/bin $path ) tar xvvpSjf gcc-core-3.2.3.tar.bz2 tar xvvpSjf gcc-g++-3.2.3.tar.bz2 mkdir mips-sgi-irix6-build cd mips-sgi-irix6-build ../gcc-3.2.3/configure --target=mips-sgi-irix6 --with-gnu-as \ --with-gnu-ld \ --prefix=$PREFIX # copy Irix system headers mkdir $PREFIX/mips-sgi-irix6/sys-include rsync -avr irix-host:/usr/include/ $PREFIX/mips-sgi-irix6/sys-include # copy Irix libc.a rcp irix-host:/usr/lib32/cmplrs/intr32/libc.a \ $PREFIX/mips-sgi-irix6/lib make This `make' fails with the following message: make[1]: Leaving directory `/work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libiberty' loading cache ../config.cache [...] checking whether the C compiler (/work/gcc-32-cross/gcc-3.2.3/gcc/xgcc -B/work/gcc-32-cross/gcc-3.2.3/gcc/ -B/work/gcc-32-irix/mips-sgi-irix6/bin/ -B/work/gcc-32-irix/mips-sgi-irix6/lib/ -isystem /work/gcc-32-irix/mips-sgi-irix6/include -O2 -g -O2 ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. make: *** [configure-target-libiberty] Error 1 mips-sgi-irix6/libiberty/config.log shows that ld expects crt1.o and crtn.o to live in /usr/lib32. So, su cd /usr ln -s $PREFIX/lib32 lib32 mkdir -p $PREFIX/lib32/mips3 rsync irix-host:/usr/lib32/mips3/crt\* $PREFIX/lib32/mips3/ Then, `make' like before fails with: [...] checking whether the C compiler (/work/gcc-32-cross/gcc-3.2.3/gcc/xgcc -B/work/gcc-32-cross/gcc-3.2.3/gcc/ -B/work/gcc-32-irix/mips-sgi-irix6/bin/ -B/work/gcc-32-irix/mips-sgi-irix6/lib/ -isystem /work/gcc-32-irix/mips-sgi-irix6/include -O2 -g -O2 ) works... no configure: error: installation or configuration problem: C compiler cannot create executables. make: *** [configure-target-libiberty] Error 1 # tail mips-sgi-irix6/libiberty/config.log /usr/lib32/mips3/crt1.o(.MIPS.events.text+0x10):/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M3/csu/crt1text.s:104: undefined reference to `__readenv_sigfpe' /usr/lib32/mips3/crt1.o(.MIPS.events.text+0x1a):/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M3/csu/crt1text.s:106: undefined reference to `exit' /usr/lib32/mips3/crt1.o(.MIPS.events.text+0x1c):/xlv55/kudzu-apr12/work/irix/lib/libc/libc_n32_M3/csu/crt1text.s:106: undefined reference to `exit' collect2: ld returned 1 exit status configure: failed program was: #line 2213 "configure" #include "confdefs.h" main(){return(0);} I believe there are some functions in Irix libc that are only in the shared libc.so, but not in libc.a (?). I had tried copying libc.so instead of libc.a, but GNU ld refused to link with it. It seems that you need both, libc.a *and* libc.so at different stages of compile. Here's what works for me: rsync -L irix-host:/usr/lib32/mips3/libc.so $PREFIX/lib32 add as a first line to mips-sgi-irix6/config.cache: LIBS="$LIBS -L$PREFIX/lib32" Again, `make', which gets a lot farther than before, failing with: /work/gcc-32-cross/gcc-3.2.3/gcc/xgcc -shared-libgcc -B/work/gcc-32-cross/gcc-3.2.3/gcc/ -nostdinc++ -L/work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libstdc++-v3/src -L/work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libstdc++-v3/src/.libs -B/work/gcc-32-irix/mips-sgi-irix6/bin/ -B/work/gcc-32-irix/mips-sgi-irix6/lib/ -isystem /work/gcc-32-irix/mips-sgi-irix6/include -nostdinc++ -I/work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libstdc++-v3/include/mips-sgi-irix6 -I/work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libstdc++-v3/include -I../libsupc++ -I../libmath -g -O2 -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -g -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c concept-inst.cc -o concept-inst.o >/dev/null 2>&1 In file included from ctype.cc:36: /work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libstdc++-v3/include/mips-sgi-irix6/bits/ctype_noninline.h: In static member function `static const char* std::ctype<char>::classic_table()': /work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libstdc++-v3/include/mips-sgi-irix6/bits/ctype_noninline.h:38: ` _ctype_' undeclared (first use this function) /work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libstdc++-v3/include/mips-sgi-irix6/bits/ctype_noninline.h:38: (Each undeclared identifier is reported only once for each function it appears in.) make[3]: *** [ctype.lo] Error 1 make[3]: Leaving directory `/work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libstdc++-v3/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libstdc++-v3' make[1]: *** [all-recursive-am] Error 2 make[1]: Leaving directory `/work/gcc-32-cross/gcc-3.2.3/mips-sgi-irix6/libstdc++-v3' make: *** [all-target-libstdc++-v3] Error 2 # cd mips-sgi-irix6/libstdc++-v3/include/mips-sgi-irix6/bits All files here are symbolic links, some of them pointing to .../gcc-3.2.3/libstdc++-v3/config/os/newlib/bits/ even if there seems to be a corresponding file in .../config/os/irix/irix6.5/bits/. So, # ln -sf $WORK/gcc-3.2.3/libstdc++-v3/config/os/irix/irix6.5/bits/* . This time, `make' gets a little further, finally failing with: /work/gcc-32-cross/mips-sgi-irix6-build/gcc/xgcc -shared-libgcc -B/work/gcc-32-cross/mips-sgi-irix6-build/gcc/ -nostdinc++ -L/work/gcc-32-cross/mips-sgi-irix6-build/mips-sgi-irix6/libstdc++-v3/src -L/work/gcc-32-cross/mips-sgi-irix6-build/mips-sgi-irix6/libstdc++-v3/src/.libs -B/work/gcc-32-irix/mips-sgi-irix6/bin/ -B/work/gcc-32-irix/mips-sgi-irix6/lib/ -isystem /work/gcc-32-irix/mips-sgi-irix6/include -nostdinc++ -I/work/gcc-32-cross/mips-sgi-irix6-build/mips-sgi-irix6/libstdc++-v3/include/mips-sgi-irix6 -I/work/gcc-32-cross/mips-sgi-irix6-build/mips-sgi-irix6/libstdc++-v3/include -I../../../../gcc-3.2.3/libstdc++-v3/libsupc++ -I../../../../gcc-3.2.3/libstdc++-v3/libmath -g -O2 -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -g -c ../../../../gcc-3.2.3/libstdc++-v3/src/vterminate.cc -DPIC -o .libs/vterminate.o In file included from ../../../../gcc-3.2.3/libstdc++-v3/src/vterminate.cc:34: ../../../../gcc-3.2.3/libstdc++-v3/libsupc++/cxxabi.h:288: syntax error before `)' token ../../../../gcc-3.2.3/libstdc++-v3/libsupc++/cxxabi.h:359: syntax error before `)' token ../../../../gcc-3.2.3/libstdc++-v3/libsupc++/cxxabi.h:408: syntax error before `)' token make[3]: *** [vterminate.lo] Error 1 make[3]: Leaving directory `/work/gcc-32-cross/mips-sgi-irix6-build/mips-sgi-irix6/libstdc++-v3/src' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/work/gcc-32-cross/mips-sgi-irix6-build/mips-sgi-irix6/libstdc++-v3' make[1]: *** [all-recursive-am] Error 2 make[1]: Leaving directory `/work/gcc-32-cross/mips-sgi-irix6-build/mips-sgi-irix6/libstdc++-v3' make: *** [all-target-libstdc++-v3] Error 2 -- Alexander Jolk / BUF Compagnie tel +33-1 42 68 18 28 / fax +33-1 42 68 18 29 ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |