First you should use the '-v' option to see how gcc/ld are invoked.

This is the wierd part because I can't see -dn nor -P flags!

[elephant]~/tmp> ghdl -e -v hello_world
/opt/packages/gcc-4.0.2/libexec/gcc/sparc-sun-solaris2.9/4.0.2/ghdl1 - P/opt/packages/gcc-4.0.2/lib/gcc/sparc-sun-solaris2.9/4.0.2/vhdl/lib/ v93/std/ -P/opt/packages/gcc-4.0.2/lib/gcc/sparc-sun-solaris2.9/4.0.2/ vhdl/lib/v93/ieee/ --elab hello_world -l e~hello_world.lst -quiet -o e~hello_world.s e~hello_world
/usr/local/bin/as -o e~hello_world.o e~hello_world.s
/usr/local/bin/gcc -o hello_world e~hello_world.o /opt/packages/ gcc-4.0.2/lib/gcc/sparc-sun-solaris2.9/4.0.2/vhdl/lib/v93/std/ std_standard.o /opt/packages/gcc-4.0.2/lib/gcc/sparc-sun- solaris2.9/4.0.2/vhdl/lib/v93/std/textio.o /opt/packages/gcc-4.0.2/ lib/gcc/sparc-sun-solaris2.9/4.0.2/vhdl/lib/v93/std/textio_body.o hello.o /opt/packages/gcc-4.0.2/lib/gcc/sparc-sun-solaris2.9/4.0.2/ vhdl/lib//libgrt.a -ldl -lm -L./ -lz
ld: fatal: option -dn and -P are incompatible
ld: fatal: Flags processing errors
collect2: ld returned 1 exit status
ghdl: compilation error

Second, you could use the -Wl,-static option to force the use of static libs.

It fails also:

[elephant]~/tmp> ghdl -e -Wl,-static hello_world
ld: fatal: library -ldl: not found
ld: fatal: File processing errors. No output written to hello_world
collect2: ld returned 1 exit status
ghdl: compilation error

Is there any way to check ghdl after having compiled gcc? make test? It seems that my problem is related to my gcc build.


Dominik

Reply via email to