summaryrefslogtreecommitdiffstats
path: root/make/openssl.mk
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-11-01 05:34:41 +0000
committerManuel Novoa III <mjn3@codepoet.org>2003-11-01 05:34:41 +0000
commitd632d42b34888f169a9394f2c5ce64ccca75a5cb (patch)
tree34a6836f3c2c2623dbee1731f96498d17476f5dd /make/openssl.mk
parentb5f7712c837fd770bed24b1a904715b5fd057b78 (diff)
downloadbuildroot-novena-d632d42b34888f169a9394f2c5ce64ccca75a5cb.tar.gz
buildroot-novena-d632d42b34888f169a9394f2c5ce64ccca75a5cb.zip
Enable building soft float buildroot for gcc 3.3. Currently works for
i386 (limited to 64 bit long double... same as double), arm (libfloat), mips, and mipsel. Enable cross compiling a native gcc 3.3 toolchain to run on the target. Misc rootfs cleanups... strip some things that weren't, eliminate duplicate libs, move openssl shared libs out of /lib, reduce size of libssl.so by dynamicly linking with libcrypto.so, fix dropbear compile on mips.
Diffstat (limited to 'make/openssl.mk')
-rw-r--r--make/openssl.mk24
1 files changed, 12 insertions, 12 deletions
diff --git a/make/openssl.mk b/make/openssl.mk
index b35bb3135..b5dc56721 100644
--- a/make/openssl.mk
+++ b/make/openssl.mk
@@ -16,6 +16,9 @@ $(DL_DIR)/$(OPENSSL_SOURCE):
$(OPENSSL_DIR)/.unpacked: $(DL_DIR)/$(OPENSSL_SOURCE) $(OPENSSL_PATCH)
gunzip -c $(DL_DIR)/$(OPENSSL_SOURCE) | tar -C $(BUILD_DIR) -xvf -
cat $(OPENSSL_PATCH) | patch -p1 -d $(OPENSSL_DIR)
+ # sigh... we have to resort to this just to set a gcc flag.
+ perl -i -p -e 's,/CFLAG=,/CFLAG= $(TARGET_SOFT_FLOAT) ,g' \
+ $(OPENSSL_DIR)/Configure
touch $(OPENSSL_DIR)/.unpacked
$(OPENSSL_DIR)/Makefile: $(OPENSSL_DIR)/.unpacked
@@ -28,6 +31,9 @@ $(OPENSSL_DIR)/Makefile: $(OPENSSL_DIR)/.unpacked
$(OPENSSL_DIR)/apps/openssl: $(OPENSSL_DIR)/Makefile
$(MAKE) CC=$(TARGET_CC) -C $(OPENSSL_DIR) all build-shared
+ # Work around openssl build bug to link libssl.so with libcrypto.so.
+ -rm $(OPENSSL_DIR)/libssl.so.*.*.*
+ $(MAKE) CC=$(TARGET_CC) -C $(OPENSSL_DIR) do_linux-shared
$(STAGING_DIR)/lib/libcrypto.a: $(OPENSSL_DIR)/apps/openssl
$(MAKE) CC=$(TARGET_CC) INSTALL_PREFIX=$(STAGING_DIR) -C $(OPENSSL_DIR) install
@@ -40,24 +46,18 @@ $(STAGING_DIR)/lib/libcrypto.a: $(OPENSSL_DIR)/apps/openssl
(cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so)
(cd $(STAGING_DIR)/lib; ln -fs libssl.so.0.9.7 libssl.so.0)
-$(TARGET_DIR)/lib/libcrypto.so.0.9.7: $(STAGING_DIR)/lib/libcrypto.a
- cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/lib/
- cp -fa $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/lib/
+$(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7: $(STAGING_DIR)/lib/libcrypto.a
+ cp -fa $(STAGING_DIR)/lib/libcrypto.so* $(TARGET_DIR)/usr/lib/
+ cp -fa $(STAGING_DIR)/lib/libssl.so* $(TARGET_DIR)/usr/lib/
#cp -fa $(STAGING_DIR)/bin/openssl $(TARGET_DIR)/bin/
+ -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libssl.so.0.9.7
+ -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7
$(TARGET_DIR)/usr/lib/libssl.a: $(STAGING_DIR)/lib/libcrypto.a
mkdir -p $(TARGET_DIR)/usr/include
cp -a $(STAGING_DIR)/include/openssl $(TARGET_DIR)/usr/include/
cp -dpf $(STAGING_DIR)/lib/libssl.a $(TARGET_DIR)/usr/lib/
cp -dpf $(STAGING_DIR)/lib/libcrypto.a $(TARGET_DIR)/usr/lib/
- rm -f $(TARGET_DIR)/lib/libcrypto.so
- rm -f $(TARGET_DIR)/lib/libssl.so
- (cd $(TARGET_DIR)/usr/lib; \
- ln -fs /lib/libssl.so.0.9.7 libssl.so; \
- ln -fs /lib/libcrypto.so.0.9.7 libcrypto.so; \
- )
- -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libssl.so.0.9.7
- -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libcrypto.so.0.9.7
touch -c $(TARGET_DIR)/usr/lib/libssl.a
openssl-headers: $(TARGET_DIR)/usr/lib/libssl.a
@@ -71,5 +71,5 @@ openssl-clean:
openssl-dirclean:
rm -rf $(OPENSSL_DIR)
-openssl: uclibc $(TARGET_DIR)/lib/libcrypto.so.0.9.7
+openssl: uclibc $(TARGET_DIR)/usr/lib/libcrypto.so.0.9.7