diff options
Diffstat (limited to 'main/openssl/android-config.mk')
-rw-r--r-- | main/openssl/android-config.mk | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/main/openssl/android-config.mk b/main/openssl/android-config.mk index d76d6e30..84ab6782 100644 --- a/main/openssl/android-config.mk +++ b/main/openssl/android-config.mk @@ -1,17 +1,39 @@ # -# These flags represent the build-time configuration of openssl for android +# These flags represent the build-time configuration of OpenSSL for android # -# They were pruned from the "Makefile" generated by running ./Configure from import_openssl.sh +# The value of $(openssl_cflags) was pruned from the Makefile generated +# by running ./Configure from import_openssl.sh. # +# This script performs minor but required patching for the Android build. +# + +# Intentionally excluded http://b/7079965 +ifneq (,$(filter -DZLIB, $(openssl_cflags_32) $(openssl_cflags_64) \ + $(openssl_cflags_static_32) $(openssl_cflags_static_64))) +$(error ZLIB should not be enabled in openssl configuration) +endif -# From CLFAG= -LOCAL_CFLAGS += -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN #-DTERMIO +LOCAL_CFLAGS_32 += $(openssl_cflags_32) +LOCAL_CFLAGS_64 += $(openssl_cflags_64) -# From DEPFLAG= -LOCAL_CFLAGS += -DOPENSSL_NO_CAMELLIA -DOPENSSL_NO_CAPIENG -DOPENSSL_NO_CAST -DOPENSSL_NO_CMS -DOPENSSL_NO_GMP -DOPENSSL_NO_IDEA -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_SHA0 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SEED -DOPENSSL_NO_STORE -DOPENSSL_NO_WHIRLPOOL +LOCAL_CFLAGS_32 := $(filter-out -DTERMIO, $(LOCAL_CFLAGS_32)) +LOCAL_CFLAGS_64 := $(filter-out -DTERMIO, $(LOCAL_CFLAGS_64)) +# filter out static flags too +openssl_cflags_static_32 := $(filter-out -DTERMIO, $(openssl_cflags_static_32)) +openssl_cflags_static_64 := $(filter-out -DTERMIO, $(openssl_cflags_static_64)) -# Extra -LOCAL_CFLAGS += -DOPENSSL_NO_HW -DOPENSSL_NO_ENGINE -DZLIB +ifeq ($(HOST_OS),windows) +LOCAL_CFLAGS_32 := $(filter-out -DDSO_DLFCN -DHAVE_DLFCN_H,$(LOCAL_CFLAGS_32)) +LOCAL_CFLAGS_64 := $(filter-out -DDSO_DLFCN -DHAVE_DLFCN_H,$(LOCAL_CFLAGS_64)) +endif + +# Directories +LOCAL_CFLAGS += \ + -DOPENSSLDIR="\"/system/lib/ssl\"" \ + -DENGINESDIR="\"/system/lib/ssl/engines\"" # Debug # LOCAL_CFLAGS += -DCIPHER_DEBUG + +# Add clang here when it works on host +# LOCAL_CLANG := true |