<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 - Triple-prefixed clang symlink ignores -target flag"
   href="https://bugs.llvm.org/show_bug.cgi?id=34671">34671</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Triple-prefixed clang symlink ignores -target flag
          </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>Driver
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>arichardson.kde@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I recently merged the latest upstream changes into our fork of clang and
noticed that clang now ignores the -target flag if it is invoked as
*-*-*-clang:

./mips64-unknown-freebsd-clang -target x86_64-unknown-freebsd -### foo.c
clang version 6.0.0 (<a href="https://github.com/llvm-mirror/clang.git">https://github.com/llvm-mirror/clang.git</a>
e7476fadc94b87293e7192c419125cf446d454ce)
(<a href="https://github.com/llvm-mirror/llvm.git">https://github.com/llvm-mirror/llvm.git</a>
f4b98addfb8646cf3aee4d3f6f498febbc54d99d)
Target: mips64-unknown-freebsd
Thread model: posix
InstalledDir: /local/scratch/alr48/cheri/build/upstream-llvm-build/bin/.
 "/local/scratch/alr48/cheri/build/upstream-llvm-build/bin/clang-6.0" "-cc1"
"-triple" "mips64-unknown-freebsd" "-S" "-disable-free" "-main-file-name"
"foo.c" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix"
"-mdisable-fp-elim" "-no-integrated-as" "-mconstructor-aliases" "-target-cpu"
"mips64r2" "-target-feature" "-noabicalls" "-target-abi" "n64" "-mfloat-abi"
"hard" "-dwarf-column-info" "-debugger-tuning=gdb" "-resource-dir"
"/local/scratch/alr48/cheri/build/upstream-llvm-build/lib/clang/6.0.0"
"-fno-dwarf-directory-asm" "-fdebug-compilation-dir"
"/local/scratch/alr48/cheri/build/upstream-llvm-build/bin" "-ferror-limit" "19"
"-fmessage-length" "105" "-fobjc-runtime=gnustep" "-fdiagnostics-show-option"
"-fcolor-diagnostics" "-o" "/tmp/foo-2eb666.s" "-x" "c" "foo.c"
 "/usr/bin/as" "-march" "mips64r2" "-mabi" "64" "-EB" "-KPIC" "-o"
"/tmp/foo-740c51.o" "/tmp/foo-2eb666.s"
 "/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1"
"--enable-new-dtags" "-o" "a.out" "crt1.o" "crti.o" "crtbegin.o" "-L/usr/lib"
"/tmp/foo-740c51.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc"
"-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "crtend.o" "crtn.o"


I would expect this to target x86_64 and not mips64.</pre>
        </div>
      </p>


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

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