amd64 and -fPIC
Clifford Wolf <[email protected]>
| Newsgroups | gmane.linux.distributions.rock.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
unlike other architectures amd64 _needs_ -fPIC for libraries. (most other
architectures just benefit from it but can also use libraries compiled
without -fPIC.)
So we had some patches in submaster to add -fPIC (most of them from fake
and clemy) - some of them have been applied already. After some discussions
with fake we decided that it's not a nice solution to clutter up the build
environment with -fPIC enforcement code.
First some facts:
* A library compiled without -fPIC is considered harmful.
* A binary compiled with -fPIC does no harm (the code is a bit
slower - but not much).
* Only some packages with libraries have a clean -fPIC handling.
They either use -fPIC for everything or for nothing.
* Patching packages with binaries and libraries so only the code
which is used in the libraries is compiled with -fPIC is very
hard.
And here comes the solution we propose:
* We extend the .cache file format so it also has a list of
binaries and libraries which are part of the package (this would
be needed for some other things - such as "rocket search" - too).
* On architectures which can handle non-pic libraries, nothing
special happens.
* On architectures which can't handle non-pic libraries, all
packages with shared objects listed in their .cache file are
compiled with -fPIC via
var_append GCC_WRAPPER_INSERT " " "-fPIC"
in a 'prepare' hook registered in
package/base/gcc/parse-config
* A special variable can be set in the package .conf file to
disable the 'prepare' hook.
please send your comments.
yours,
- clifford
--
_________ ____ __ __ $_ = q 7nz!y="Ccv'Dpgiutvcbb'oj'Pocj'*'qqq[
/ ___/ __ \/ __ `/ | /| / / ej`q[iv`";!|=1;!y=~t%].[%nz!z=!1;gps]1..6[{
/ /__/ / / / /_/ /| |/ |/ / qsjou"!z\c";tfmfdu]voefg,voefg,voefg,0.05[;
\___/_/ /_/\__, / |__/|__/ !z=~t/].[/dis]pse]!1[^!_[/fh;}qsjou !z;%fh;
CCC Wien /____/www.cngw.org qsjou "\o"7;s/\n//g;y/[b-za]!/)a-z($/;eval;
Reality corrupted. Reboot universe? (Y/N).
_______________________________________________
rock-devel mailing list
[email protected]
http://www.rocklinux.net/mailman/listinfo/rock-devel
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFB65ZfPNIEsfpKDdERAghUAJwNAkIaKfZOyzdAzw5Odhgj53j7KACfRaY6 w5X+KZjAAumorwkv/4AUmBc= =iftc -----END PGP SIGNATURE-----