Date: Fri, 26 Sep 2008 23:09:11 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Dieter <freebsd@sopwith.solgatos.com> Cc: freebsd-amd64@freebsd.org Subject: Re: amd64/127640: GCC will not build shared libraries with -fprofile-generate on amd64 Message-ID: <20080926200911.GY47828@deviant.kiev.zoral.com.ua> In-Reply-To: <200809261812.SAA00764@sopwith.solgatos.com> References: <20080926171018.GX47828@deviant.kiev.zoral.com.ua> <200809261812.SAA00764@sopwith.solgatos.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Fri, Sep 26, 2008 at 11:12:31AM +0100, Dieter wrote: > > > > Note that libgcov needs to be recompiled with -fPIC. > > > > The R_X86_64_32 issue is systematic on amd64. When you build a shared > > > > object, better make sure that all .o are compiled with -fPIC. > > >=20 > > > So shouldn't the system come with both static and shared versions > > > of all the libraries? > > > > The system does. OP linked system supplied libgcov.a into .so. > > Should /usr/lib/libgcov.a be built with -fPIC, is debatable. I think it > > is overkill for most other static libs from /usr/lib. Note that there > > are reasonable arguments against supplying static system libraries like > > libc and libpthread. > > The thread started with "porting a specialized database library to FreeBSD". > One can expect problems when porting new code. But the PIC problem is > bigger than that. Ports don't compile due to this problem. Ports should > compile cleanly out of the box, on all archs, with no problems. > > Example: On amd64, 7.0, try to build python25. I get: > > /usr/bin/ld: /usr/lib/crtbeginT.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC > /usr/lib/crtbeginT.o: could not read symbols: Bad value > *** Error code 1 > > Stop in /usr/ports/lang/python25/work/Python-2.5.1/portbld.shared. You are mixing unrelated issues. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjdQWYACgkQC3+MBN1Mb4gliQCeNOf7XwEYXIRPvLPPhXvaydjo eSIAn1tVuvMb882IV3pCjjg8zNud+sjA =5Iac -----END PGP SIGNATURE-----home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080926200911.GY47828>
