[llvm-bugs] [Bug 48894] New: clang's integrated assembler doesn't permit setting the target arch via -Wa, -march=armv7-a

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 26 18:27:55 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48894

            Bug ID: 48894
           Summary: clang's integrated assembler doesn't permit setting
                    the target arch via -Wa,-march=armv7-a
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ndesaulniers at google.com
                CC: caij2003 at gmail.com, htmldeveloper at gmail.com,
                    kristof.beyls at arm.com, llozano at chromium.org,
                    llvm-bugs at lists.llvm.org, natechancellor at gmail.com,
                    neeilans at live.com, richard-llvm at metafoo.co.uk,
                    srhines at google.com
            Blocks: 4068

Consider the following file:

$ cat foo.s 
foo:
  dmb
$ clang --target=arm-linux-gnueabi -Wa,-march=armv7-a foo.s -c
clang-12: warning: argument unused during compilation: '-Wa,-march=armv7-a'
[-Wunused-command-line-argument]
foo.s:2:3: error: instruction requires: data-barriers
  dmb
  ^

$ cat bar.s
.arch armv7-a
foo:
  dmb
$ clang --target=arm-linux-gnueabi -Wa,-march=armv7-a bar.s -c
clang-12: warning: argument unused during compilation: '-Wa,-march=armv7-a'
[-Wunused-command-line-argument]

It would seem that clang will only set the target arch via assembler directive
and not consuming the command line flag.

This is a blocker to using Clang's integrated assembler for the 32b ARM Linux
kernel.


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210127/fc914c5d/attachment.html>


More information about the llvm-bugs mailing list