summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.mk10
-rw-r--r--linux-aarch64/crypto/aes/aesv8-armx.S5
-rw-r--r--linux-aarch64/crypto/modes/ghashv8-armx.S5
-rw-r--r--src/crypto/aes/asm/aesv8-armx.pl5
-rw-r--r--src/crypto/modes/asm/ghashv8-armx.pl5
5 files changed, 14 insertions, 16 deletions
diff --git a/Android.mk b/Android.mk
index 3fbff63..27e786d 100644
--- a/Android.mk
+++ b/Android.mk
@@ -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
___