[LLVMbugs] [Bug 13611] New: arm-none-eabi-clang doesnt work with CodeSourcery sysroot

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 15 03:07:59 PDT 2012


             Bug #: 13611
           Summary: arm-none-eabi-clang doesnt work with CodeSourcery
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Driver
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: david.mirabito at gmail.com
                CC: chandlerc at gmail.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 9058
  --> http://llvm.org/bugs/attachment.cgi?id=9058
directory structure of toolchain's sysroot

I have unpacked the arm-2009q1/arm-none-eabi toolchain from codesourcery, and
symlinked to a recent Clang build to produce arm-none-eabi-clang, which is next
to arm-none-eabi-gcc & co.

I have the codesourcery toolchain bins unpacked to:
and Clang binary installed to: /home/davidm/install/bin/

If I strace a simple .c file which #includes <assert.h> and does nothing in
main besides assert, I can see that it uses /usr/include/assert.h.

This results in the link failing since my system assert.h relies on the
existence of __assert_fail.

The toolchain's sysroot is
$ arm-none-eabi-gcc -print-sysroot

If I pass this via --sysroot to clang: "fatal error: 'assert.h' file not found"

Strace seems to tell me
/home/davidm/bin/arm-2009q1/bin/../arm-none-eabi/usr/local/include and
/home/davidm/bin/arm-2009q1/bin/../arm-none-eabi/usr/include are being checked
for existence.

The headers live in /home/davidm/bin/arm-2009q1/bin/../arm-none-eabi/include

(I also notice that when clang -cc1 is forked, the -isysroot argument is
/home/davidm/bin/arm-2009q1/bin/ and not the requested sysroot?)

Attached is the result of `find -type f` in the toolchain's sysroot


ps: the test.c is trivial:

#include <assert.h>
int main(int argc, char *argv[])
    return 0;

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list