diff options
author | Kenny Root <kroot@google.com> | 2013-02-08 16:29:48 -0800 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2013-06-07 10:56:03 -0700 |
commit | 9d6b691a23aeebe0e520dab9e11a484eae4999fd (patch) | |
tree | 23e65760c0f9159aa8c517a71ac6e1226ae6dd9d | |
parent | 7f01ddce5984e5555cb3315289af0d18530d9c3b (diff) | |
download | replicant_openssl-9d6b691a23aeebe0e520dab9e11a484eae4999fd.zip replicant_openssl-9d6b691a23aeebe0e520dab9e11a484eae4999fd.tar.gz replicant_openssl-9d6b691a23aeebe0e520dab9e11a484eae4999fd.tar.bz2 |
Switch compiler to clang
Clang now is performant enough to use instead of GCC. We can later
switch on ftrapv to better deal with potential problems. Clang was
having problems with BN multiply operations, but it appears to not
affect RSA speeds anymore.
gcc:
openssl speed -elapsed rsa
sign verify sign/s verify/s
rsa 512 bits 0.000759s 0.000073s 1317.5 13621.0
rsa 1024 bits 0.004109s 0.000234s 243.4 4276.1
rsa 2048 bits 0.027652s 0.000842s 36.2 1188.3
rsa 4096 bits 0.198824s 0.003204s 5.0 312.1
clang:
openssl speed -elapsed rsa
sign verify sign/s verify/s
rsa 512 bits 0.000784s 0.000074s 1274.9 13522.6
rsa 1024 bits 0.004132s 0.000235s 242.0 4256.9
rsa 2048 bits 0.027680s 0.000851s 36.1 1175.5
rsa 4096 bits 0.198824s 0.003245s 5.0 308.2
Change-Id: Iadad4739cf925a552158463047bdf1e19f9d0e83
-rw-r--r-- | Apps.mk | 1 | ||||
-rw-r--r-- | Crypto.mk | 2 | ||||
-rw-r--r-- | Ssl.mk | 2 | ||||
-rw-r--r-- | android-config.mk | 3 |
4 files changed, 8 insertions, 0 deletions
@@ -11,6 +11,7 @@ include $(LOCAL_PATH)/Apps-config.mk include $(CLEAR_VARS) LOCAL_MODULE:= openssl +LOCAL_CLANG := true LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(target_src_files) LOCAL_SHARED_LIBRARIES := libssl libcrypto @@ -17,6 +17,7 @@ ifneq (,$(TARGET_BUILD_APPS)) LOCAL_SDK_VERSION := 9 endif +LOCAL_CLANG := true LOCAL_SRC_FILES += $(target_src_files) LOCAL_CFLAGS += $(target_c_flags) LOCAL_C_INCLUDES += $(target_c_includes) @@ -37,6 +38,7 @@ LOCAL_SDK_VERSION := 9 endif LOCAL_LDFLAGS += -ldl +LOCAL_CLANG := true LOCAL_SRC_FILES += $(target_src_files) LOCAL_CFLAGS += $(target_c_flags) LOCAL_C_INCLUDES += $(target_c_includes) @@ -15,6 +15,7 @@ ifneq (,$(TARGET_BUILD_APPS)) LOCAL_SDK_VERSION := 9 endif +LOCAL_CLANG := true LOCAL_SRC_FILES += $(target_src_files) LOCAL_CFLAGS += $(target_c_flags) LOCAL_C_INCLUDES += $(target_c_includes) @@ -33,6 +34,7 @@ ifneq (,$(TARGET_BUILD_APPS)) LOCAL_SDK_VERSION := 9 endif +LOCAL_CLANG := true LOCAL_SRC_FILES += $(target_src_files) LOCAL_CFLAGS += $(target_c_flags) LOCAL_C_INCLUDES += $(target_c_includes) diff --git a/android-config.mk b/android-config.mk index 80955b5..d1bda99 100644 --- a/android-config.mk +++ b/android-config.mk @@ -25,3 +25,6 @@ LOCAL_CFLAGS := $(filter-out -DZLIB, $(LOCAL_CFLAGS)) # Debug # LOCAL_CFLAGS += -DCIPHER_DEBUG + +# Add clang here when it works on host +# LOCAL_CLANG := true |