Browse Source

- openssl: update build

master
vanhofen 5 years ago
parent
commit
59ff6d5340
  1. 43
      make/target-libs.mk
  2. 25
      patches/openssl-add-ni-specific-target.patch
  3. 13
      patches/openssl/0000-Configure-align-O-flag.patch

43
make/target-libs.mk

@ -365,46 +365,51 @@ OPENSSL_URL = https://www.openssl.org/source
$(ARCHIVE)/$(OPENSSL_SOURCE):
$(DOWNLOAD) $(OPENSSL_URL)/$(OPENSSL_SOURCE)
OPENSSL_PATCH = openssl-add-ni-specific-target.patch
OPENSSL_MAKE_OPTS = \
$(MAKE_OPTS) \
AR="$(TARGET_AR) r" \
MAKEDEPPROG=$(TARGET_CC) \
NI_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
PROCESSOR=ARM
OPENSSL_PATCH = 0000-Configure-align-O-flag.patch
$(D)/openssl: $(ARCHIVE)/$(OPENSSL_SOURCE) | $(TARGET_DIR)
$(REMOVE)/$(OPENSSL_TMP)
$(UNTAR)/$(OPENSSL_SOURCE)
$(CHDIR)/$(OPENSSL_TMP); \
$(call apply_patches, $(OPENSSL_PATCH)); \
$(call apply_patches, $(addprefix $(@F)/,$(OPENSSL_PATCH))); \
./Configure \
linux-armv4-ni \
linux-armv4 \
shared \
threads \
no-hw \
no-engine \
no-sse2 \
no-perlasm \
$(TARGET_CPPFLAGS) \
$(TARGET_LDFLAGS) \
no-tests \
no-fuzz-afl \
no-fuzz-libfuzzer \
\
$(TARGET_CFLAGS) \
-DTERMIOS -fomit-frame-pointer \
-DOPENSSL_SMALL_FOOTPRINT \
$(TARGET_LDFLAGS) \
\
--cross-compile-prefix=$(TARGET)- \
--prefix=/ \
--openssldir=$(remove-dir)/ssl \
--openssldir=/etc/ssl \
; \
make $(OPENSSL_MAKE_OPTS) depend; \
sed -i "s# build_tests##" Makefile; \
make $(OPENSSL_MAKE_OPTS) all; \
sed -i "s| build_tests||" Makefile; \
sed -i 's|^MANDIR=.*|MANDIR=$(remove-mandir)|' Makefile; \
sed -i 's|^HTMLDIR=.*|HTMLDIR=$(remove-htmldir)|' Makefile; \
make depend; \
make; \
make install_sw INSTALL_PREFIX=$(TARGET_DIR)
$(REWRITE_PKGCONF)/openssl.pc
$(REWRITE_PKGCONF)/libcrypto.pc
$(REWRITE_PKGCONF)/libssl.pc
rm -rf $(TARGET_BIN_DIR)/c_rehash $(TARGET_LIB_DIR)/engines
rm -rf $(TARGET_LIB_DIR)/engines
rm -f $(TARGET_BIN_DIR)/c_rehash
rm -f $(TARGET_DIR)/etc/ssl/misc/{CA.pl,tsget}
ifeq ($(BOXSERIES), $(filter $(BOXSERIES), hd1 hd2))
rm -rf $(TARGET_BIN_DIR)/openssl
rm -f $(TARGET_BIN_DIR)/openssl
rm -f $(TARGET_DIR)/etc/ssl/misc/{CA.*,c_*}
endif
chmod 0755 $(TARGET_LIB_DIR)/libcrypto.so.* $(TARGET_LIB_DIR)/libssl.so.*
chmod 0755 $(TARGET_LIB_DIR)/lib{crypto,ssl}.so.*
for version in 0.9.7 0.9.8 1.0.2; do \
ln -sf libcrypto.so.1.0.0 $(TARGET_LIB_DIR)/libcrypto.so.$$version; \
ln -sf libssl.so.1.0.0 $(TARGET_LIB_DIR)/libssl.so.$$version; \

25
patches/openssl-add-ni-specific-target.patch

@ -1,25 +0,0 @@
From b45d7f3d60560fc01211645d63c100e52f522668 Mon Sep 17 00:00:00 2001
Message-Id: <b45d7f3d60560fc01211645d63c100e52f522668.1504716870.git.thomas.harfmann@gmail.com>
From: gixxpunk <thomas.harfmann@gmail.com>
Date: Wed, 6 Sep 2017 18:54:23 +0200
Subject: [PATCH] - add ni-specific target
---
Configure | 1 +
1 file changed, 1 insertion(+)
diff --git a/Configure b/Configure
index fd7988e..a951b3a 100755
--- a/Configure
+++ b/Configure
@@ -406,6 +406,7 @@ my %table=(
#
"linux-armv4", "gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-aarch64","gcc: -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"linux-armv4-ni","gcc:-DTERMIOS \$(NI_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
# Configure script adds minimally required -march for assembly support,
# if no -march was specified at command line. mips32 and mips64 below
# refer to contemporary MIPS Architecture specifications, MIPS32 and
--
2.11.0

13
patches/openssl/0000-Configure-align-O-flag.patch

@ -0,0 +1,13 @@
diff --git a/Configure b/Configure
index 3846c91..1a52843 100755
--- a/Configure
+++ b/Configure
@@ -404,7 +404,7 @@ my %table=(
#
# ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
#
-"linux-armv4", "gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"linux-armv4", "gcc: -O2 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
"linux-aarch64","gcc: -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
# Configure script adds minimally required -march for assembly support,
# if no -march was specified at command line. mips32 and mips64 below
Loading…
Cancel
Save