Subject: Openssl build changes
To: None <tech-toolchain@NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: tech-toolchain
Date: 12/09/2005 10:12:47
--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi folks,

I'm currently testing the attached patches, which I'd like to commit
together ASAP. They are supposed to fix PR 28935 (64 bit support for
the bignum library) and PR 32226 (openssl build uses wrong includes).

I don't like the Makefile change myself, but I have not been able to come
up with something better - and this works (so far - some test builds
still going). Any ideas, or is this OK?

Martin

--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch

Index: crypto/dist/openssl/crypto/opensslconf.h
===================================================================
RCS file: /cvsroot/src/crypto/dist/openssl/crypto/opensslconf.h,v
retrieving revision 1.5
diff -u -p -r1.5 opensslconf.h
--- crypto/dist/openssl/crypto/opensslconf.h	25 Nov 2005 19:14:11 -0000	1.5
+++ crypto/dist/openssl/crypto/opensslconf.h	9 Dec 2005 09:06:22 -0000
@@ -112,9 +112,15 @@
 /* The prime number generation stuff may not work when
  * EIGHT_BIT but I don't care since I've only used this mode
  * for debuging the bignum libraries */
+#ifdef _LP64
+#define SIXTY_FOUR_BIT_LONG
+#define SIXTY_FOUR_BIT
+#undef THIRTY_TWO_BIT
+#else
 #undef SIXTY_FOUR_BIT_LONG
 #undef SIXTY_FOUR_BIT
 #define THIRTY_TWO_BIT
+#endif
 #undef SIXTEEN_BIT
 #undef EIGHT_BIT
 #endif
Index: lib/libcrypto/Makefile
===================================================================
RCS file: /cvsroot/src/lib/libcrypto/Makefile,v
retrieving revision 1.43
diff -u -p -r1.43 Makefile
--- lib/libcrypto/Makefile	25 Nov 2005 20:34:31 -0000	1.43
+++ lib/libcrypto/Makefile	9 Dec 2005 09:06:56 -0000
@@ -57,6 +57,9 @@ OS_VERSION!= ${HOST_SH} ${NETBSDSRCDIR}/
 # XXX for the host toolchain embedded in the image.
 ${SRCS}: buildinf.h
 buildinf.h: Makefile
+	rm -f openssl/opensslconf.h
+	mkdir openssl
+	${HOST_LN} -s ${OPENSSLSRC}/crypto/opensslconf.h openssl
 	@echo "#ifndef MK1MF_BUILD" >buildinf.h
 	@echo "#define CFLAGS \"`${CC} -v 2>&1 | grep version`\"" >>buildinf.h
 	@echo "#define PLATFORM \"NetBSD-${MACHINE_ARCH}\"" >>buildinf.h
@@ -65,6 +68,11 @@ buildinf.h: Makefile
 
 CLEANFILES+= buildinf.h
 
+cleandir:	cleantempsymlinks
+
+cleantempsymlinks:	.PHONY
+	rm -rf openssl
+
 # This list is built from the contents of the include/openssl
 # directory in the OpenSSL source distribution.
 INCS+=	aes.h asn1.h asn1_mac.h asn1t.h bio.h blowfish.h bn.h \

--WIyZ46R2i8wDzkSu--