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: unassignedclangb...@nondot.org
          Reporter: ndesaulni...@google.com
                CC: caij2...@gmail.com, htmldevelo...@gmail.com,
                    kristof.be...@arm.com, lloz...@chromium.org,
                    llvm-bugs@lists.llvm.org, natechancel...@gmail.com,
                    neeil...@live.com, richard-l...@metafoo.co.uk,
                    srhi...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to