diff mbox series

crypto: aegis128-neon - use Clang compatible cflags for ARM

Message ID 20190913183618.6817-1-ard.biesheuvel@linaro.org (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: aegis128-neon - use Clang compatible cflags for ARM | expand

Commit Message

Ard Biesheuvel Sept. 13, 2019, 6:36 p.m. UTC
The next version of Clang will start policing compiler command line
options, and will reject combinations of -march and -mfpu that it
thinks are incompatible.

This results in errors like

  clang-10: warning: ignoring extension 'crypto' because the 'armv7-a'
  architecture does not support it [-Winvalid-command-line-argument]
  /tmp/aegis128-neon-inner-5ee428.s: Assembler messages:
            /tmp/aegis128-neon-inner-5ee428.s:73: Error: selected
  processor does not support `aese.8 q2,q14' in ARM mode

when buiding the SIMD aegis128 code for 32-bit ARM, given that the
'armv7-a' -march argument is considered to be compatible with the
ARM crypto extensions. Instead, we should use armv8-a, which does
allow the crypto extensions to be enabled.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 crypto/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu Oct. 4, 2019, 3:32 p.m. UTC | #1
On Fri, Sep 13, 2019 at 07:36:18PM +0100, Ard Biesheuvel wrote:
> The next version of Clang will start policing compiler command line
> options, and will reject combinations of -march and -mfpu that it
> thinks are incompatible.
> 
> This results in errors like
> 
>   clang-10: warning: ignoring extension 'crypto' because the 'armv7-a'
>   architecture does not support it [-Winvalid-command-line-argument]
>   /tmp/aegis128-neon-inner-5ee428.s: Assembler messages:
>             /tmp/aegis128-neon-inner-5ee428.s:73: Error: selected
>   processor does not support `aese.8 q2,q14' in ARM mode
> 
> when buiding the SIMD aegis128 code for 32-bit ARM, given that the
> 'armv7-a' -march argument is considered to be compatible with the
> ARM crypto extensions. Instead, we should use armv8-a, which does
> allow the crypto extensions to be enabled.
> 
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  crypto/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/crypto/Makefile b/crypto/Makefile
index 0d2cdd523fd9..e76d8bd2f72c 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -93,7 +93,7 @@  obj-$(CONFIG_CRYPTO_AEGIS128) += aegis128.o
 aegis128-y := aegis128-core.o
 
 ifeq ($(ARCH),arm)
-CFLAGS_aegis128-neon-inner.o += -ffreestanding -march=armv7-a -mfloat-abi=softfp
+CFLAGS_aegis128-neon-inner.o += -ffreestanding -march=armv8-a -mfloat-abi=softfp
 CFLAGS_aegis128-neon-inner.o += -mfpu=crypto-neon-fp-armv8
 aegis128-$(CONFIG_CRYPTO_AEGIS128_SIMD) += aegis128-neon.o aegis128-neon-inner.o
 endif