Re: Patch for building Python libs under Linux x64 (fixed on Ubuntu 10)

Peter Gutmann <[email protected]>
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
Justin Hendren <[email protected]> writes:

>Hello all, just dropping this email to inform about a bug I found when
>building the Python libraries under Ubuntu (linux 2.6.32-24 x86_64) on a x64
>system (Intel i5). After a little research, I found that this will more than
>likely also affect other linux distributions if not patched.
>
>--- ccopts.sh   2009-07-15 18:06:50.000000000 -0400
>+++ ccopts.sh   2010-07-29 22:56:02.909399364 -0400
>@@ -293,7 +293,7 @@
>        if [ "$GCC_VER" -ge 30 ] ; then
>                case $ARCH in
>                        'x86_64')
>-                               CCARGS="$CCARGS -march=opteron" ;;
>+                               CCARGS="$CCARGS -march=opteron -fPIC" ;;
>
>                        'i686')
>                                CCARGS="$CCARGS -march=pentiumpro" ;;

Does anyone else have any thoughts on the effect that this could have in other
environments?  This seems to be a special case for use of a static lib linked
into a surrounding shared lib... also -fPIC has an (unspecified) performance
overhead over -fpic and is supposedly only necessary for non-x86 systems due
to limits on the global offset table size on non-x86 CPUs.  Does it also work
when you use -fpic?  Is -fpic required for the 32-bit version as well or just
the 64-bit one?

>Hope this helps someone! Also, I hope this would be patched into the source
>release, unless there is a better solution to be had (the shared lib build
>might require the -fpic, but I'm not sure).

This is a change that'll affect all builds on x86 systems, so I'd like to make
sure it won't cause problems elsewhere if it's enabled before I put it in the
release.

Peter.

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.