On Mon, Jan 28, 2002 at 05:00:26PM -0600, Dave Dykstra wrote:
> On Mon, Jan 28, 2002 at 11:31:59PM +0100, Richard Levitte - VMS Whacker wrote:
> > I thought someone once made a patch that used some special option to
> > the linker so it wouldn't use system libraries at all, and then
> > explicitely included needed system libraries at the end of the linking
> > command line.  It seems to me like that would be the best way to act,
> > really, provided those system libraries aren't renamed or moved to
> > different locations.
> > 
> > Anyone?
> 
> I noticed there were similar flags for -I header files in a recent snapshot
> but don't know what to do for libraries.  Ah, the ld man page says -Z will
> tell it not to search the standard libraries.  I have to go, will try it
> tomorrow.

ld -Z didn't help, but I had limited success with cc -nostdlib.  The
problem is that that also turns off including /usr/lib/crt1.o, and that has
to be put first on the link command line.  There's currently an EX_LIBS
make variable that is passed all around which could put /usr/lib/libc.dylib
on the end of the link line, but there's no make variable that I can see
that gets put only on the beginning of each link line, so it would require
extensive changes to the Makefiles and yet another field in the per-machine-
type table.

I noticed that the top-level Makefile.org sets a bunch of variables when it
does "making all" in each subdirectory.  How about if it set LIBCRYPTO and
LIBSSL there?  It seems to separate the building of the shared and the
unshared library, so I think the below patch should work.  I tried it, but
only with a static library, so that's why I'm not sure.

- Dave Dykstra


--- Makefile.org.O      Mon Jan 21 09:25:31 2002
+++ Makefile.org        Tue Jan 29 17:52:33 2002
@@ -201,8 +201,8 @@
        @for i in $(DIRS); \
        do \
        if [ -d "$$i" ]; then \
-               (cd $$i && echo "making all in $$i..." && \
-               $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' 
SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' 
EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' 
CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' 
SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' 
RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' 
RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' all ) || exit 1; \
+               (HERE=`pwd`; cd $$i && echo "making all in $$i..." && \
+               $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' 
+SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' 
+EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' 
+CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' 
+SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' 
+RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' 
+RANLIB='${RANLIB}' EXE_EXT='${EXE_EXT}' LIBCRYPTO=$$HERE/libcrypto.a 
+LIBSSL=$$HERE/libssl.a all ) || exit 1; \
        else \
                $(MAKE) $$i; \
        fi; \
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to