diff --git a/BUILDING.md b/BUILDING.md index eab61e2e..97de4c3d 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -145,18 +145,6 @@ corresponding ARM feature. Note that if a feature is enabled in this way, but not actually supported at run-time, BoringSSL will likely crash. -## Assembling ARMv8 with Clang - -In order to support the ARMv8 crypto instructions, Clang requires that the -architecture be `armv8-a+crypto`. However, setting that as a general build flag -would allow the compiler to assume that crypto instructions are *always* -supported, even without testing for them. - -It's possible to set the architecture in an assembly file using the `.arch` -directive, but only very recent versions of Clang support this. If -`BORINGSSL_CLANG_SUPPORTS_DOT_ARCH` is defined then `.arch` directives will be -used with Clang, otherwise you may need to craft acceptable assembler flags. - # Running tests There are two sets of tests: the C/C++ tests and the blackbox tests. For former diff --git a/crypto/fipsmodule/aes/asm/aesv8-armx.pl b/crypto/fipsmodule/aes/asm/aesv8-armx.pl index ee07a3a7..662814a9 100644 --- a/crypto/fipsmodule/aes/asm/aesv8-armx.pl +++ b/crypto/fipsmodule/aes/asm/aesv8-armx.pl @@ -58,11 +58,7 @@ $code=<<___; #if __ARM_MAX_ARCH__>=7 .text ___ -$code.=<<___ if ($flavour =~ /64/); -#if !defined(__clang__) || defined(BORINGSSL_CLANG_SUPPORTS_DOT_ARCH) -.arch armv8-a+crypto -#endif -___ +$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); $code.=<<___ if ($flavour !~ /64/); .arch armv7-a // don't confuse not-so-latest binutils with argv8 :-) .fpu neon diff --git a/crypto/fipsmodule/modes/asm/ghashv8-armx.pl b/crypto/fipsmodule/modes/asm/ghashv8-armx.pl index b1b24810..9bbca104 100644 --- a/crypto/fipsmodule/modes/asm/ghashv8-armx.pl +++ b/crypto/fipsmodule/modes/asm/ghashv8-armx.pl @@ -66,11 +66,7 @@ $code=<<___; .text ___ -$code.=<<___ if ($flavour =~ /64/); -#if !defined(__clang__) || defined(BORINGSSL_CLANG_SUPPORTS_DOT_ARCH) -.arch armv8-a+crypto -#endif -___ +$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); $code.=<<___ if ($flavour !~ /64/); .fpu neon .code 32