In message <[EMAIL PROTECTED]> on Fri, 13 Dec 2002 11:09:09 +0100, Andy 
Polyakov <[EMAIL PROTECTED]> said:

appro> Should we check for "-.pic" also?

I haven't seen any compiler with such a flag, yet...

appro> Finally ./Configure modifications. As proposed I omit CAST assembler
appro> module if shared build was requested. Then I add $shared_cflag to
appro> $cflags *only* if a shared build was actually requested. Till now
appro> $shared_cflags was added unconditionally which is not safe practice.

There was a specific reason for that: there were people who would link
routines from libcrypto.a into another shared library.  If the
libcrypto.a routines weren't built with -fPIC, it broke badly.

appro> Remember when OpenSSH failed on Solaris and it turned to be
appro> that few variables were not initialized? This is the very
appro> reason! In general it works to link PIC code statically (like
appro> it was done in OpenSSH case), but it's not *guaranteed* to work.

OK, I can accept that.  Could you explain the technicalities to me,
off-list?

appro> So that if user didn't ask for shared build, then we basically
appro> shouldn't pass -.PIC flag to compiler. Which also means that
appro> even if user asked for shared build, apps/openssl and tests are
appro> not compiled with -.PIC, but I don't touch this at this time.

It also probably means that we should name libcrypto.a differently
when the included modules are compiled with -fPIC.  Something like
libcrypto_pic.a.  I've seen such practice elsewhere...

To be thought about for 0.9.8, I guess.

-- 
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
                    \      SWEDEN       \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to