hi all , i'm a newbie in compiler compiling, and in this mailing list. I'am trying to build an AVR gpc pascal compiler. with gcc-3.2.2, binutils 2.14, and gpc-20330507
gcc c cross compiler builds fine (with ../gcc-3.2.2/configure --prefix=$prefix --target=$target --enable-languages=c -v; make all)
BUT
../gcc-3.2.2/configure --prefix=$prefix --target=$target --enable-languages=pascal -v; make all
ends after a while with
CC="`echo /home/data/gcc-3.2.2/build/gcc/xgcc -B/home/data/gcc-3.2.2/build/gcc/ -B/home/data/AVR/avr/bin/ -B/home/data/AVR/avr/lib/ -isystem /home/data/AVR/avr/include' ' | sed -e 's,(-[BI])([^/][^:]),\1../../\2,g;s,^([^/][^:]*/),../../\1,'`" PC="`echo ./xgpc -B./' ' | sed -e 's,(-[BI])([^/][^:]),\1../../\2,g;s,^([^/][^:]*/),../../\1,'`" CONFIG_SITE=nonexisting-file \ $src/p/rts/configure --silent > /dev/null --srcdir=$src/p/rts \ `if [ x@with_shared@ = xyes ]; then echo '--with-shared'; fi` configure: error: installation or configuration problem: C compiler cannot create executables. make[1]: *** [p/rts/Makefile] Erreur 1 make[1]: Leaving directory `/home/data/gcc-3.2.2/build/gcc' make: *** [all-gcc] Erreur 2
SO here are my questions: -Did someone tried such a cross building ? -successfully ? ;-)
anything to help should be welcome. In fact, i dont't know where to begin thanks. Antony
Antony wrote:
hi all , i'm a newbie in compiler compiling, and in this mailing list. I'am trying to build an AVR gpc pascal compiler. with gcc-3.2.2, binutils 2.14, and gpc-20330507
gcc c cross compiler builds fine (with ../gcc-3.2.2/configure --prefix=$prefix --target=$target --enable-languages=c -v; make all)
BUT
../gcc-3.2.2/configure --prefix=$prefix --target=$target --enable-languages=pascal -v; make all
ends after a while with
CC="`echo /home/data/gcc-3.2.2/build/gcc/xgcc -B/home/data/gcc-3.2.2/build/gcc/ -B/home/data/AVR/avr/bin/ -B/home/data/AVR/avr/lib/ -isystem /home/data/AVR/avr/include' ' | sed -e 's,(-[BI])([^/][^:]),\1../../\2,g;s,^([^/][^:]*/),../../\1,'`" PC="`echo ./xgpc -B./' ' | sed -e 's,(-[BI])([^/][^:]),\1../../\2,g;s,^([^/][^:]*/),../../\1,'`" CONFIG_SITE=nonexisting-file \ $src/p/rts/configure --silent > /dev/null --srcdir=$src/p/rts \ `if [ x@with_shared@ = xyes ]; then echo '--with-shared'; fi` configure: error: installation or configuration problem: C compiler cannot create executables. make[1]: *** [p/rts/Makefile] Erreur 1 make[1]: Leaving directory `/home/data/gcc-3.2.2/build/gcc' make: *** [all-gcc] Erreur 2
SO here are my questions: -Did someone tried such a cross building ? -successfully ? ;-)
AFAIKS you successfully built the compiler. What fails is compilation of the runtime. Some features of GNU Pascal are provided by runtime library. You did not specify the exact target, but since AVR is 8-bit processor you probably do not want normal runtime. ATM you should be able to compile programs, Namely
/home/data/gcc-3.2.2/build/gcc/xgpc -B/home/data/gcc-3.2.2/build/gcc/ -c pascal_routine.p
sould give you object file. Without runtime sets, strings, readln, writeln, new, etc will not work but the core language should work. With some effort support for strings and sets may be extracted for normal GPC runtime.