On Feb 9, 2008 10:59 AM, Tristan Gingold <[EMAIL PROTECTED]> wrote: > On Wed, Feb 06, 2008 at 12:43:17PM -0500, Pascal Giard wrote: > > Trying to compile my VPI shared library i get the following error on amd64: > > > > /usr/bin/ld: e~tb.o: relocation R_X86_64_32 against `__ghdl_rti_top' > > can not be used when making a shared object; recompile with -fPIC > > > > How can I do just that? > > Adding -fPIC to AM_CPPFLAGS doeesn't help. > > > > Note that I'm elaborating e~tb.o with "ghdl -e --ieee=synopsys tb". > > Adding -fPIC after -e doesn't show any error, but doesn't solve the > > problem either. > > Sorry for the delay.
Absolutly no problem! > You can use -Wc,XXX to pass options. Also use -v to see how gcc is invoked. > These are documented in the GHDL manual if you need the detail. Oh, i had missed that part of the manual. It works like a charm for my side of the code. Unfortunatly, the problem still shows up in other libraries, see below: g++ -g -O2 -Wall -Wimplicit -Wsign-compare -Wpointer-arith -fPIC --shared e~tb.o /usr/lib/ghdl/lib/gcc/x86_64-linux-gnu/4.1.2/vhdl/lib/v93/std/std_standard.o /usr/lib/ghdl/lib/gcc/x86_64-linux-gnu/4.1.2/vhdl/lib//v93/synopsys/std_logic_1164.o /usr/lib/ghdl/lib/gcc/x86_64-linux-gnu/4.1.2/vhdl/lib//v93/synopsys/std_logic_1164_body.o tb_dummy.o /usr/lib/ghdl/lib/gcc/x86_64-linux-gnu/4.1.2/vhdl/lib//v93/synopsys/std_logic_arith.o /usr/lib/ghdl/lib/gcc/x86_64-linux-gnu/4.1.2/vhdl/lib//v93/synopsys/std_logic_signed.o fir.o -Wl,--version-script=/usr/lib/ghdl/lib/gcc/x86_64-linux-gnu/4.1.2/vhdl/lib//grt.ver -Wl,--export-dynamic -o tb_vpi tb_vpi-common.o tb_vpi-tb_vpi.o /usr/lib/ghdl/lib/gcc/x86_64-linux-gnu/4.1.2/vhdl/lib//libgrt.a -ldl -lm -L/home/evilynux/docs/universite/Maitrise/svnrepos/pgiard/GHDL_CORBA/FIR_IPC -lz -lrt /usr/bin/ld: /usr/lib/ghdl/lib/gcc/x86_64-linux-gnu/4.1.2/vhdl/lib/v93/std/std_standard.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/ghdl/lib/gcc/x86_64-linux-gnu/4.1.2/vhdl/lib/v93/std/std_standard.o: could not read symbols: Bad value AFAIK it's never a bad idea to add -fPIC. What are your thoughts on this? Does this belong upstream or to the Debian bugtracker...? btw, this prevents me from using VHPI on a 64bit CPU. -Pascal -- Homepage (http://organact.mine.nu) Debian GNU/Linux (http://www.debian.org) LACIME: École de technologie supérieure (http://lacime.etsmtl.ca) _______________________________________________ Ghdl-discuss mailing list Ghdl-discuss@gna.org https://mail.gna.org/listinfo/ghdl-discuss