The first error seems to be caused by using the wrong version of gnat to bootstrap it. You should be using the 3.15p bootstrap compiler. I believe ACT has stated that GNAT should always be compiled by using the previous (or same) version of the compiler. I'm not entirely sure about the second one, perhaps wchars aren't supported on your target platform and gcc 2.8.1 does not take this into account? //David Holm On Wed, 03 Sep 2003 22:04:19 +0100 "Luke A. Guest" wrote: > On Mon, 01 Sep 2003 20:45:04 +0000, David Holm wrote: > > > There is only one patch (against gcc 3.2(.3)), you use gnat 3.15p to bootstrap the compiler. > > Check the ebuild for the complete build process (dev-lang/gnat). As for gcc cross > > compilation, if you are not already familiar with it, there are lots of sites describing > > this. For instance the gcc cross compilation faq. > > I knew I'd have trouble - I'm not too sure about ebuild scripts you see. > Anyway, here are the steps I used to build gcc-3.2.2/gnat-5: > > tar -xjpf /usr/portage/distfiles/gcc-3.2.2.tar.bz2 > tar -xjpf /usr/portage/distfiles/gnat-5.0_pre20030822.tar.bz2 > mv gnat-5.0_pre20030822 gcc-3.2.2/ada > cd gcc-3.2.2 > patch -p0 < ada/gcc-32.dif > touch gcc/cstamp-h.in > touch gcc/ada/[es]info.h > touch gcc/ada/nmake.ad[bs] > ../gcc-3.2.2/configure --prefix=/opt/mips-toolchain --program-prefix=gnat > --enable-languages="c,c++,ada" --disable-nls --target=mips-elf > --with-gnu-as --with-gnu-ld > make > > > ... > make[2]: Leaving directory `/usr/src/mine/mips-3.2/build-gcc-3.2.2/gcc/intl' > make -C ada "AR_FLAGS_FOR_TARGET=" "AR_CREATE_FOR_TARGET=gnatar rc" > "AR_EXTRACT_FOR_TARGET=gnatar x" "AR_FOR_TARGET=gnatar" "BISON=bison" "BISONFLAGS=" > "CFLAGS=-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional > " "DESTDIR=" "GCC_FOR_TARGET=/usr/src/mine/mips-3.2/build-gcc-3.2.2/gcc/xgcc > -B/usr/src/mine/mips-3.2/build-gcc-3.2.2/gcc/ -B/opt/mips-toolchain/mips-elf/bin/ > -B/opt/mips-toolchain/mips-elf/lib/ -isystem /opt/mips-toolchain/mips-elf/include" "LDFLAGS=" > "FLEX=flex" "FLEXFLAGS=" "LN=ln" "LN_S=ln -s" "MAKEINFO=makeinfo " "MAKEINFOFLAGS=" > "MAKEOVERRIDES=" "RANLIB_FOR_TARGET=gnatranlib" "RANLIB_TEST_FOR_TARGET=[ -f gnatranlib ] || ( > [ "i686-pc-linux-gnu" = "mips-unknown-elf" ] && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )" > "SHELL=/bin/sh" "exeext=" "build_exeext=" "objext=.o" "exec_prefix=/opt/mips-toolchain" > "prefix=/opt/mips-toolchain" "local_prefix=/usr/local" > "gxx_include_dir=/opt/mips-toolchain/lib/gcc-lib/mips-elf/3.2.2/../../../..`echo > /opt/mips-toolchain | sed -e 's|^/opt/mips-toolchain||' -e > 's|/[^/]*|/..|g'`/include/c++/3.2.2" "build_tooldir=/opt/mips-toolchain/mips-elf" > "gcc_tooldir=/opt/mips-toolchain/lib/gcc-lib/mips-elf/3.2.2/../../../../mips-elf" > "bindir=/opt/mips-toolchain/bin" "libsubdir=/opt/mips-toolchain/lib/gcc-lib/mips-elf/3.2.2" > "datadir=/opt/mips-toolchain/share" "localedir=/opt/mips-toolchain/share/locale" "CC=gcc" > "STAGE_PREFIX=" "ADA_FOR_BUILD=" > "ADA_INCLUDE_DIR=/opt/mips-toolchain/lib/gcc-lib/mips-elf/3.2.2/adainclude" > "ADA_RTL_OBJ_DIR=/opt/mips-toolchain/lib/gcc-lib/mips-elf/3.2.2/adalib" "ADAFLAGS=-W -Wall > -gnatpg -gnata" "ADA_FOR_TARGET=" "INSTALL_DATA=/bin/sh > /usr/src/mine/mips-3.2/gcc-3.2.2/install-sh -c -m 644" "INSTALL_PROGRAM=/bin/sh > /usr/src/mine/mips-3.2/gcc-3.2.2/install-sh -c " \ > ../gnat1 > make[2]: Entering directory `/usr/src/mine/mips-3.2/build-gcc-3.2.2/gcc/ada' > gcc -c -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes > -Wtraditional -W -Wall -gnatpg -gnata -I- -I. -I../../../gcc-3.2.2/gcc/ada > ../../../gcc-3.2.2/gcc/ada/ada.ads fatal error: system.ads is incorrectly formatted > missing line for parameter: Backend_Divide_Checks > fatal error: system.ads is incorrectly formatted > missing line for parameter: Backend_Overflow_Checks > fatal error: system.ads is incorrectly formatted > missing line for parameter: Fractional_Fixed_Ops > compilation abandoned > make[2]: *** [ada.o] Error 1 > make[2]: Leaving directory `/usr/src/mine/mips-3.2/build-gcc-3.2.2/gcc/ada' > make[1]: *** [gnat1] Error 2 > make[1]: Leaving directory `/usr/src/mine/mips-3.2/build-gcc-3.2.2/gcc' > make: *** [all-gcc] Error 2 > > I've also tried 2.8.1: > > tar -xjpf /usr/portage/distfiles/gcc-2.8.1.tar.bz2 > tar -xzpf /usr/portage/distfiles/gnat-3.15p-src.tgz > mv gnat-3.15p-src/src/ada gcc-2.8.1/ > cd gcc-2.8.1/ > patch -p0 < ../gnat-3.15p-src/src/gcc-281.dif > touch cstamp-h.in > for i in `find ada -name '*.ad[sb]'`; do sed -i -e > "s/\"gcc\"/\"gnatgcc\"/g" ${i}; done > cd ada > cd ../../ > mkdir build-gcc-2.8.1 > cd build-gcc-2.8.1 > make > > > ... > make[1]: Entering directory `/usr/src/mine/mips-3.2/build-gcc-2.8.1/ada' > gcc -c -DCROSS_COMPILE -DIN_GCC -g -I- -I. -I.. -I../../gcc-2.8.1/ada > -I../../gcc-2.8.1/ada/.. -I../../gcc-2.8.1/ada/../config \ > ../../gcc-2.8.1/ada/a-gettty.c > ../../gcc-2.8.1/ada/a-gettty.c: In function `get_target_wchar_t_size': > ../../gcc-2.8.1/ada/a-gettty.c:108: `WCHAR_TYPE_SIZE' undeclared (first use in this function) > ../../gcc-2.8.1/ada/a-gettty.c:108: (Each undeclared identifier is reported only once > ../../gcc-2.8.1/ada/a-gettty.c:108: for each function it appears in.) > make[1]: *** [a-gettty.o] Error 1 > make[1]: Leaving directory `/usr/src/mine/mips-3.2/build-gcc-2.8.1/ada' > make: *** [gnat1] Error 2 > > Can you try it out (preferably v5) for me and see if you can actually > build it? I have been able to create C/C++ cross compilers without any > trouble, just Ada. > > Thanks, > Luke. >