[LLVMbugs] [Bug 12478] New: Clang pass wrong library paths if used with --sysroot

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Apr 6 04:23:34 PDT 2012


             Bug #: 12478
           Summary: Clang pass wrong library paths if used with --sysroot
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: glotov at chromium.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When Clang is passed --sysroot=/build/x86-alex/, the resulting call to the
linker has the following library paths (in order):


Note that /usr/lib64 (2nd path) is prior to /build/x86-alex/usr/lib64 (3rd

As the result, the linker picks wrong DSO (if both root and sysroot have
same-named DSO) and may makes resulting image unusable.

repro: clang hello_world.cc --sysroot=/any/existing/path -v; note -L order

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