<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 3.6: inconsistent claiming of options -nostdlib vs. -nostartfiles"
   href="http://llvm.org/bugs/show_bug.cgi?id=22490">22490</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang 3.6: inconsistent claiming of options -nostdlib vs. -nostartfiles
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.6
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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>markus@oberhumer.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When compiling, -nostdlib seems to get claimed while -nostartfiles and
-nodefaultlibs are not.

When linking, -isystem seems to get claimed while -nostdinc and -nostdinc++ are
not.

I think it would be nice to claim all these options as it makes it easier to
write clang-XXX wrapper scripts.

$ echo 'int x = 1;' > test.c

#
# compiling
#

$ clang-3.6.0rc2 -target i386-linux -c test.c

$ clang-3.6.0rc2 -target i386-linux -nostdlib -c test.c

$ clang-3.6.0rc2 -target i386-linux -nostartfiles -c test.c
clang: warning: argument unused during compilation: '-nostartfiles'

$ clang-3.6.0rc2 -target i386-linux -nodefaultlibs -c test.c
clang: warning: argument unused during compilation: '-nodefaultlibs'

#
# linking
#

$ clang-3.6.0rc2 -target i386-linux -shared -o test.so test.o

$ clang-3.6.0rc2 -target i386-linux -isystem /usr/include -shared -o test.so
test.o

$ clang-3.6.0rc2 -target i386-linux -nostdinc -shared -o test.so test.o
clang: warning: argument unused during compilation: '-nostdinc'

$ clang-3.6.0rc2 -target i386-linux -nostdinc++ -shared -o test.so test.o
clang: warning: argument unused during compilation: '-nostdinc++'</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>