[LLVMbugs] [Bug 22490] New: clang 3.6: inconsistent claiming of options -nostdlib vs. -nostartfiles

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 6 04:20:23 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22490

            Bug ID: 22490
           Summary: clang 3.6: inconsistent claiming of options -nostdlib
                    vs. -nostartfiles
           Product: clang
           Version: 3.6
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: markus at oberhumer.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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++'

-- 
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/20150206/55ce015c/attachment.html>


More information about the llvm-bugs mailing list