openssl: enable ARM assembly acceleration
Tested myself on ixp4xx and mvebu, and (originally) by Daniel on i.MX6. Also tested on a MIPS target, to make sure the change to ASFLAGS does not break things. Based on a patch submitted by Daniel Drown: https://lists.openwrt.org/pipermail/openwrt-devel/2014-July/026639.html Signed-off-by: Claudio Leite <leitec@staticky.com> Signed-off-by: Daniel Drown <dan-openwrt@drown.org> SVN-Revision: 44618
This commit is contained in:
parent
57c7bed820
commit
8573891dfe
2 changed files with 7 additions and 4 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=openssl
|
PKG_NAME:=openssl
|
||||||
PKG_VERSION:=1.0.2
|
PKG_VERSION:=1.0.2
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
PKG_USE_MIPS16:=0
|
PKG_USE_MIPS16:=0
|
||||||
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
@ -118,6 +118,8 @@ else
|
||||||
OPENSSL_OPTIONS+=no-sse2
|
OPENSSL_OPTIONS+=no-sse2
|
||||||
ifeq ($(CONFIG_mips)$(CONFIG_mipsel),y)
|
ifeq ($(CONFIG_mips)$(CONFIG_mipsel),y)
|
||||||
OPENSSL_TARGET:=linux-mips-openwrt
|
OPENSSL_TARGET:=linux-mips-openwrt
|
||||||
|
else ifeq ($(CONFIG_arm)$(CONFIG_armeb),y)
|
||||||
|
OPENSSL_TARGET:=linux-armv4-openwrt
|
||||||
else
|
else
|
||||||
OPENSSL_TARGET:=linux-generic-openwrt
|
OPENSSL_TARGET:=linux-generic-openwrt
|
||||||
OPENSSL_OPTIONS+=no-perlasm
|
OPENSSL_OPTIONS+=no-perlasm
|
||||||
|
@ -156,7 +158,7 @@ TARGET_CFLAGS += $(FPIC)
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||||
CC="$(TARGET_CC)" \
|
CC="$(TARGET_CC)" \
|
||||||
ASFLAGS="$(TARGET_ASFLAGS) -c" \
|
ASFLAGS="$(TARGET_ASFLAGS) -I$(PKG_BUILD_DIR)/crypto -c" \
|
||||||
AR="$(TARGET_CROSS)ar r" \
|
AR="$(TARGET_CROSS)ar r" \
|
||||||
RANLIB="$(TARGET_CROSS)ranlib" \
|
RANLIB="$(TARGET_CROSS)ranlib" \
|
||||||
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
||||||
|
@ -164,7 +166,7 @@ define Build/Compile
|
||||||
all
|
all
|
||||||
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
||||||
CC="$(TARGET_CC)" \
|
CC="$(TARGET_CC)" \
|
||||||
ASFLAGS="$(TARGET_ASFLAGS) -c" \
|
ASFLAGS="$(TARGET_ASFLAGS) -I$(PKG_BUILD_DIR)/crypto -c" \
|
||||||
AR="$(TARGET_CROSS)ar r" \
|
AR="$(TARGET_CROSS)ar r" \
|
||||||
RANLIB="$(TARGET_CROSS)ranlib" \
|
RANLIB="$(TARGET_CROSS)ranlib" \
|
||||||
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
OPENWRT_OPTIMIZATION_FLAGS="$(TARGET_CFLAGS)" \
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
--- a/Configure
|
--- a/Configure
|
||||||
+++ b/Configure
|
+++ b/Configure
|
||||||
@@ -443,6 +443,11 @@ my %table=(
|
@@ -443,6 +443,12 @@ my %table=(
|
||||||
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
|
"linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
|
||||||
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
|
"linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${alpha_asm}",
|
||||||
|
|
||||||
+# OpenWrt targets
|
+# OpenWrt targets
|
||||||
|
+"linux-armv4-openwrt","gcc:-DTERMIOS \$(OPENWRT_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)",
|
||||||
+"linux-x86_64-openwrt", "gcc:-m64 -DL_ENDIAN -DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
+"linux-x86_64-openwrt", "gcc:-m64 -DL_ENDIAN -DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR):::64",
|
||||||
+"linux-mips-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
+"linux-mips-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
+"linux-generic-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
+"linux-generic-openwrt","gcc:-DTERMIOS \$(OPENWRT_OPTIMIZATION_FLAGS) -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
|
||||||
|
|
Loading…
Reference in a new issue