summaryrefslogtreecommitdiffstats
path: root/package/openssl/openssl.mk
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2011-01-14 10:43:24 -0300
committerPeter Korsgaard <jacmet@sunsite.dk>2011-01-17 22:00:08 +0100
commit7b9faa03ee7a9ec221b6c3d900d3f9783c4d27b5 (patch)
tree092dddfd3dcdcacc5e1650452bad38062298a25a /package/openssl/openssl.mk
parent77154539d8115a3fd49d4e0a6376919fa64b2a6f (diff)
downloadbuildroot-novena-7b9faa03ee7a9ec221b6c3d900d3f9783c4d27b5.tar.gz
buildroot-novena-7b9faa03ee7a9ec221b6c3d900d3f9783c4d27b5.zip
openssl: add ocf support
Enable OCF (cryptodev) support for openssl as an option. This requires a patched kernel to export hardware acceleration for openssl to use it. If you lack a patched kernel or support it won't break anything, it will simply fall back to the default software engine from openssl, you'll just have a slightly bigger libssl/libcrypto. Tested with 20100325 release + 20101223 patch from the mailing list. [Peter: slightly tweaked .mk] Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/openssl/openssl.mk')
-rw-r--r--package/openssl/openssl.mk14
1 files changed, 13 insertions, 1 deletions
diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk
index ff807c93d..866d4e52b 100644
--- a/package/openssl/openssl.mk
+++ b/package/openssl/openssl.mk
@@ -9,6 +9,18 @@ OPENSSL_SITE = http://www.openssl.org/source
OPENSSL_INSTALL_STAGING = YES
OPENSSL_DEPENDENCIES = zlib
OPENSSL_TARGET_ARCH = generic32
+OPENSSL_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_PACKAGE_OPENSSL_OCF),y)
+OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
+
+define OPENSSL_INSTALL_CRYPTODEV_H
+$(INSTALL) -D package/openssl/ocf-cryptodev-20101223.h \
+ $(STAGING_DIR)/usr/include/crypto/cryptodev.h
+endef
+
+OPENSSL_POST_EXTRACT_HOOKS += OPENSSL_INSTALL_CRYPTODEV_H
+endif
# Some architectures are optimized in OpenSSL
ifeq ($(ARCH),arm)
@@ -45,7 +57,7 @@ define OPENSSL_CONFIGURE_CMDS
zlib-dynamic \
)
$(SED) "s:-march=[-a-z0-9] ::" -e "s:-mcpu=[-a-z0-9] ::g" $(@D)/Makefile
- $(SED) "s:-O[0-9]:$(TARGET_CFLAGS):" $(@D)/Makefile
+ $(SED) "s:-O[0-9]:$(OPENSSL_CFLAGS):" $(@D)/Makefile
endef
define OPENSSL_BUILD_CMDS