<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang's integrated assembler doesn't permit setting the target arch via -Wa,-march=armv7-a"
   href="https://bugs.llvm.org/show_bug.cgi?id=48894">48894</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang's integrated assembler doesn't permit setting the target arch via -Wa,-march=armv7-a
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ndesaulniers@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>caij2003@gmail.com, htmldeveloper@gmail.com, kristof.beyls@arm.com, llozano@chromium.org, llvm-bugs@lists.llvm.org, natechancellor@gmail.com, neeilans@live.com, richard-llvm@metafoo.co.uk, srhines@google.com
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>4068
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_CONFIRMED "
   title="CONFIRMED - [Meta] Compiling the Linux kernel with clang"
   href="https://bugs.llvm.org/show_bug.cgi?id=4068">Bug 4068</a>] [Meta] Compiling the Linux kernel with clang
              </li>
          </ul>
        </div>
        <br>

      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>