diff options
author | Adam Langley <agl@google.com> | 2015-04-18 19:07:35 -0700 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-04-18 19:09:59 -0700 |
commit | eef60be96fb91dc632a18173b4a4f21e9813aba7 (patch) | |
tree | 3aa14dddb3cd83f10f517f1854028082621058ce | |
parent | dc5ad20a799d19a4c8b2531ddae7489d87de7db2 (diff) | |
download | external_boringssl-eef60be96fb91dc632a18173b4a4f21e9813aba7.zip external_boringssl-eef60be96fb91dc632a18173b4a4f21e9813aba7.tar.gz external_boringssl-eef60be96fb91dc632a18173b4a4f21e9813aba7.tar.bz2 |
external/boringssl: try to fix aarch64+Clang.
It appears that the version of Clang in Android doesn't support the
.arch_extension directive. This change removes the .arch and
.arch_extension lines (because they are triggering errors) and adds a
-march option on the command line instead.
The aarch64+Clang build is still broken with this change, but it's
broken in binder rather than BoringSSL with it.
Change-Id: I32c557bdfde4df66d26794ccdd650356f2bbaf8f
-rw-r--r-- | Android.mk | 10 | ||||
-rw-r--r-- | linux-aarch64/crypto/aes/aesv8-armx.S | 5 | ||||
-rw-r--r-- | linux-aarch64/crypto/modes/ghashv8-armx.S | 5 | ||||
-rw-r--r-- | src/crypto/aes/asm/aesv8-armx.pl | 5 | ||||
-rw-r--r-- | src/crypto/modes/asm/ghashv8-armx.pl | 5 |
5 files changed, 14 insertions, 16 deletions
@@ -13,6 +13,11 @@ LOCAL_MODULE := libcrypto_static LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/crypto-sources.mk LOCAL_SDK_VERSION := 9 +ifeq ($(TARGET_ARCH),arm64) +ifeq ($(USE_CLANG_PLATFORM_BUILD),true) +LOCAL_ASFLAGS += -march=armv8-a+crypto +endif +endif include $(LOCAL_PATH)/crypto-sources.mk include $(BUILD_STATIC_LIBRARY) @@ -24,6 +29,11 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/src/include LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/crypto-sources.mk LOCAL_CFLAGS += -fvisibility=hidden -DBORINGSSL_SHARED_LIBRARY -DBORINGSSL_IMPLEMENTATION LOCAL_SDK_VERSION := 9 +ifeq ($(TARGET_ARCH),arm64) +ifeq ($(USE_CLANG_PLATFORM_BUILD),true) +LOCAL_ASFLAGS += -march=armv8-a+crypto +endif +endif include $(LOCAL_PATH)/crypto-sources.mk include $(BUILD_SHARED_LIBRARY) diff --git a/linux-aarch64/crypto/aes/aesv8-armx.S b/linux-aarch64/crypto/aes/aesv8-armx.S index e3d4666..e7ae46f 100644 --- a/linux-aarch64/crypto/aes/aesv8-armx.S +++ b/linux-aarch64/crypto/aes/aesv8-armx.S @@ -2,10 +2,7 @@ #if __ARM_MAX_ARCH__>=7 .text -#ifdef __clang__ -.arch armv8-a -.arch_extension crypto -#else +#if !defined(__clang__) .arch armv8-a+crypto #endif .align 5 diff --git a/linux-aarch64/crypto/modes/ghashv8-armx.S b/linux-aarch64/crypto/modes/ghashv8-armx.S index 2da617f..565146e 100644 --- a/linux-aarch64/crypto/modes/ghashv8-armx.S +++ b/linux-aarch64/crypto/modes/ghashv8-armx.S @@ -1,10 +1,7 @@ #include "arm_arch.h" .text -#ifdef __clang__ -.arch armv8-a -.arch_extension crypto -#else +#if !defined(__clang__) .arch armv8-a+crypto #endif .global gcm_init_v8 diff --git a/src/crypto/aes/asm/aesv8-armx.pl b/src/crypto/aes/asm/aesv8-armx.pl index 2f0aaae..703da04 100644 --- a/src/crypto/aes/asm/aesv8-armx.pl +++ b/src/crypto/aes/asm/aesv8-armx.pl @@ -40,10 +40,7 @@ $code=<<___; ___ $code.=<<___ if ($flavour =~ /64/); -#ifdef __clang__ -.arch armv8-a -.arch_extension crypto -#else +#if !defined(__clang__) .arch armv8-a+crypto #endif ___ diff --git a/src/crypto/modes/asm/ghashv8-armx.pl b/src/crypto/modes/asm/ghashv8-armx.pl index 40dca96..08c8775 100644 --- a/src/crypto/modes/asm/ghashv8-armx.pl +++ b/src/crypto/modes/asm/ghashv8-armx.pl @@ -45,10 +45,7 @@ $code=<<___; .text ___ $code.=<<___ if ($flavour =~ /64/); -#ifdef __clang__ -.arch armv8-a -.arch_extension crypto -#else +#if !defined(__clang__) .arch armv8-a+crypto #endif ___ |