<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    David,<br>
    <br>
    On my machine, gcc 4.7 is installed in /usr/local/tools/gcc-4.7.3<br>
    <br>
    I configure from a build directory:<br>
    $ mkdir build && cd build<br>
    $ ../llvm/configure --with-gcc-toolchain=/usr/local/tools/gcc-4.7.3
    --with-extra-ld-options=-Wl,-rpath,/usr/local/tools/gcc-4.7.3/lib/
    --enable-optimized<br>
    <br>
    <div class="moz-cite-prefix">On 5/8/14, 5:56 AM, DbdM Tbt wrote:<br>
    </div>
    <blockquote
cite="mid:CABOPc4SVB8BGfiR_tE8zW1gQ5jQHH6eR0Wqtwvb=+F+sYcDj8g@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <div dir="ltr">Good day,<br>
        I would like to ask about the behavior of '--with-gcc-toolchain'
        configuration option.<br>
        I am currently trying out clang 3.4 with gcc 4.7 and for this, I
        used the centos devtools repo.<br>
        GCC 4.7 is installed into /opt/centos/devtoolset-1.0/.<br>
        I configured clang 3.4 like below:<br>
        CC=/opt/centos/devtoolset-1.0/root/usr/bin/gcc
        CXX=/opt/centos/devtoolset-1.0/root/usr/bin/g++
        <configure>
        --with-gcc-toolchain=/opt/centos/devtoolset-1.0/root/usr/<br>
        <br>
        Make is ok but when I try clang-check it doesn't seem to find
        'iostream'.<br>
        I thought with the option --with-gcc-toolchain, clang and its
        tools will automatically be pointed the gcc 4.7 directories.<br>
        Perhaps I am missing something here or my assumptions are
        flawed. Can someone share some insights?.<br>
        <br>
        Using the -v option on clang-check, the "Selected GCC
        installation:" is blank and the list of include directories
        don't include the 4.7 directories.<br>
      </div>
    </blockquote>
    The GCCInsatllationDetector in clang/lib/Driver/ToolChains.h looks
    for crtbegin.o files in places like:<br>
/usr/local/tools/gcc-4.7.3/lib/gcc/<triple>/<major.minor.patch>/crtbegin.o<br>
    <br>
    In my case, that is:<br>
/usr/local/tools/gcc-4.7.3/lib/gcc/x86_64-unknown-linux-gnu/4.7.3/crtbegin.o<br>
    <br>
    But there are a bunch of formats for this kind of stuff. See
    Generic_GCC::GCCInstallationDetector::init in
    clang/lib/Driver/ToolChains.cpp (and the things that it calls).<br>
    <br>
    Cheers,<br>
    Jon<br>
    <blockquote
cite="mid:CABOPc4SVB8BGfiR_tE8zW1gQ5jQHH6eR0Wqtwvb=+F+sYcDj8g@mail.gmail.com"
      type="cite">
      <div dir="ltr">Explicitly specifying the include directories (-I
        option) in the clang-check invocation will work but is there
        another workaround?<br>
        I would prefer to resolve such issues in the 'environment setup'
        aspect and not during 'application usage'.<br>
        <br>
        Thank you very much,<br>
        David<br>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="200">-- 
Jon Roelofs
<a class="moz-txt-link-abbreviated" href="mailto:jonathan@codesourcery.com">jonathan@codesourcery.com</a>
CodeSourcery / Mentor Embedded </pre>
  </body>
</html>