[llvm-bugs] [Bug 38629] New: -mfpu=neon overrides +crypto part of -march=armv8-a+crypto
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Aug 18 16:50:46 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38629
Bug ID: 38629
Summary: -mfpu=neon overrides +crypto part of
-march=armv8-a+crypto
Product: clang
Version: 7.0
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: lennox at cs.columbia.edu
CC: llvm-bugs at lists.llvm.org
Passing -mfpu=neon on the clang command line for arm32 (specifically with the
target triple armv7-none-linux-androideabi) disables the __ARM_FEATURE_CRYPTO
feature which would normally be enabled by -march=armv8+crypto, even though the
armv8 part of the flag takes effect, even if the -march flag is specified
later.
This is particularly problematic because -mfpu=neon tends to get added
automatically by Android build procedures when vector support is needed.
E.g.:
$ clang -target armv7-none-linux-androideabi -mfloat-abi=softfp -E -dM -x c
/dev/null | egrep 'CRYPTO|ARM_ARCH '
#define __ARM_ARCH 7
$ clang -target armv7-none-linux-androideabi -mfloat-abi=softfp
-march=armv8+crypto -E -dM -x c /dev/null | egrep 'CRYPTO|ARM_ARCH '
#define __ARM_ARCH 8
#define __ARM_FEATURE_CRYPTO 1
$ clang -target armv7-none-linux-androideabi -mfloat-abi=softfp -mfpu=neon
-march=armv8+crypto -E -dM -x c /dev/null | egrep 'CRYPTO|ARM_ARCH '
#define __ARM_ARCH 8
$ clang -target armv7-none-linux-androideabi -v
Android (4751641 based on r328903) clang version 7.0.2
(https://android.googlesource.com/toolchain/clang
003100370607242ddd5815e4a043907ea9004281)
(https://android.googlesource.com/toolchain/llvm
1d739ffb0366421d383e04ff80ec2ee591315116) (based on LLVM 7.0.2svn)
Target: armv7-none-linux-android
Thread model: posix
InstalledDir:
/Users/jonathan/Android/android-ndk-r18-beta1/toolchains/llvm/prebuilt/darwin-x86_64/bin
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180818/b2d8cdc6/attachment.html>
More information about the llvm-bugs
mailing list