[SAMBA3:PATCH] always use -fPIC

Stefan (metze) Metzmacher metze at samba.org
Wed Sep 27 14:59:58 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've created a patch that avoids the rebuilding of all object
files to get shared libs and modules.

As we always use -fPIE for the normal object files (when supported)
we can just use -fPIC for the normal ones too (with the same effect).

the logic is like this:

if -pie and -fPIE are supported, we initialize PICFLAG=-fPIE
and add -pie to the LDFLAGS for binaries.

when enable_shared is "yes" we overwrite PICFLAG with the value
depending on the system (-fPIC on most systems)

Does anyone see problems with this approach?

We use this for a long time in samba4 now, but we
don't have much tested shared lib/module support there...

Comments are welcome:-)

metze
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFGpHum70gjA5TCD8RAr+LAJ9NmNZO2gMuVGlr7LaELtQaX74regCfT36H
1GXmSWvXnPXNXe3kbZcUGTA=
=yo2u
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: always-fPIC-02.diff
Type: text/x-patch
Size: 48369 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20060927/847df297/always-fPIC-02.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: always-fPIC-02.diff.sig
Type: application/pgp-signature
Size: 65 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20060927/847df297/always-fPIC-02.diff.bin


More information about the samba-technical mailing list