Francesco Lombardi wrote:
Hi all! I'm trying to build a cross compiler from win32-cygwin to arm-elf. I built the gcc cross compiler that works very well... Now, with the same configuration, I'm trying to build gpc compiler. The building process seems good, but if I try to compile a simple pascal code I obtain some errors:
C:\cygwin\home\Mode3\Nuova cartella>arm-elf-gpc -o prova.o prova.pp /home/gba/lib/gcc-lib/arm-elf/3.3.1/libgpc.a(rts.o)(.text+0xed0): In function `realpath': /home/Administrator/sources/gcc/gcc/p/rts/rts.c:1493: undefined reference to `getcwd' /home/gba/lib/gcc-lib/arm-elf/3.3.1/libgpc.a(rts.o)(.text+0x1114): In function `_p_CStringRealPath': /home/Administrator/sources/gcc/gcc/p/rts/rts.c:1583: undefined reference to `getcwd'
GPC runtime library assumes Unix environment. Your option are: 1) Provide stubs for missing Unix functions. 2) Use GPC without runtime (I wrote int the past to the list how to do it). 3) Write mini-runtime which do not need Unix functions
I you manage 2) you can then proceed to 3) picking the functions that you really need from regular GPC runtime. Or you can do 3) deleting references to Unix functions from regular runtime. I suspect that picking parts that you need is easier then deleting but YMMW.