[llvm-bugs] [Bug 43448] New: attribute target syntax doesn't match -march options

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 25 10:25:06 PDT 2019


            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: unassignedclangbugs at nondot.org
          Reporter: ndesaulniers at google.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    echristo at gmail.com, erich.keane at intel.com,
                    erik.pilkington at gmail.com, florian_hahn at apple.com,
                    kristof.beyls at arm.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk, srhines at 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/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.

void foo (void){}

produces a warning in Clang, but is accepted by GCC.

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:

[Bug 4068] [Meta] Compiling the Linux kernel with clang
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/20190925/675501df/attachment.html>

More information about the llvm-bugs mailing list