https://bugs.llvm.org/show_bug.cgi?id=43448
Bug ID: 43448
Summary: attribute target syntax doesn't match -march options
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: unassignedclangb...@nondot.org
Reporter: ndesaulni...@google.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
echri...@gmail.com, erich.ke...@intel.com,
erik.pilking...@gmail.com, florian_h...@apple.com,
kristof.be...@arm.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk, srhi...@google.com
Blocks: 4068
When looking into an ISA-extension-assembler-directive related issue in
assembling the Linux kernel w/ Clang
(https://github.com/ClangBuiltLinux/linux/issues/671,
https://github.com/ClangBuiltLinux/linux/issues/573), I ran into some issue
with the ARMv8.1 lse extensions.
It seems that we can either:
1. use an assembler `.arch armv8-a+lse` directive
2. use a command line arg `-march=armv8-a+lse`
3. use a function level attribute
Unfortunately, 3 gets a little complicated in terms of our "compatibility w/
GCC" which is a constraint for compiling the Linux kernel w/ Clang.
__attribute__((target("arch=armv8-a+lse")))
void foo (void){}
produces a warning in Clang, but is accepted by GCC.
__attribute__((target("lse")))
void foo (void){}
produces an error in GCC, but is accepted by Clang.
I find the current behavior in Clang for 3 inconsistent with 1+2.
Referenced Bugs:
https://bugs.llvm.org/show_bug.cgi?id=4068
[Bug 4068] [Meta] Compiling the Linux kernel with clang
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs