On Mon, Nov 07, 2005 at 02:45:36PM -0200, Richard Maciel wrote: > Got a link error when trying to compile ghdl-0.20 with gcc-4.0.2 (as > described in the ghdl README). The error message is: > > gnatbind -aO./ -aOvhdl -E -I- -x vhdl/ortho_gcc-main.ali > gnatlink -o ghdl1 ortho-lang.o gcc-version.o ../gcc/toplev.o > ../gcc/c-convert.o ../gcc/libbackend.a ../libcpp/libcpp.a > ../libiberty/libiberty.a ../libcpp/libcpp.a ../libiberty/libiberty.a > vhdl/ortho_gcc-main.ali > /usr/lib/ada/gcc-lib/i686-pc-linux-gnu/2.8.1/adalib/libgnat.a(a-raise.o)(.text+0x1d): > In function `_gnat_builtin_longjmp': > : undefined reference to `__dummy' > gnatlink: cannot call /usr/bin/gnatgcc > gnatmake: *** link failed. > make[2]: *** [ghdl1] Error 4 > make[2]: Leaving directory `/home/richard/mestrado/objdir/gcc' > make[1]: *** [stage2_build] Error 2 > make[1]: Leaving directory `/home/richard/mestrado/objdir/gcc' > make: *** [bootstrap] Error 2 > > The gnatlink message is strange. My gnatgcc is accessible from > /usr/bin/gnatgcc directory. > > Im using a gentoo linux with gcc version 3.3.5-20050130. My gnat > version is 3.15p (20020523). I suppose gnatlink use gcc instead of gnatgcc to perform the link. Please check this hypothesis using -v option.
I suppose __dummy was defined in the libgcc used by gnatgcc (or gcc 2.8.1) but not in gcc 3.3.5. You may fix this by defined an empty __dummy() function in ortho-lang.c for example. Tristan.
