<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    FWIW I decided to test your scenario under Debian Sid:<br>
    <br>
    <big>Here are the knowns:</big><br>
    <br>
    <ol>
      <li>I have clang/clang++ installed under /usr/local/bin</li>
      <li>I have cmake built libc++ installed under
        /usr/local/include/c++/v1</li>
      <li>I built the prior build for libc++ outside of trunk under my
        LLVMProject path</li>
      <li>I have ~/DeveloperProjects/LLVMProjects/trunk/llvm,
        ~/DeveloperProjects/LLVMProjects/trunk/llvm/projects/llvm-test/
        and ~/DeveloperProjects/LLVMProjects/trun/llvm/toosl/clang
        followed by</li>
      <li>~/DeveloperProjects/LLVMProjects/libc++ outside of the trunk
        tree<br>
      </li>
      <li>I build LLVM/Clang trunk with standard automake tools</li>
      <li>I build libc++ with cmake separately<br>
      </li>
      <li>System CPU Architecture is just a Pentium D 945 on this build
        box.</li>
      <li>I run $ make -j3 (n+1 cores)</li>
      <li>If it fails to fully build just run <b>make</b> -j(n+1) until
        the sections waiting on prior built portions are built<br>
      </li>
    </ol>
    <big>New Scenario includes your request to build LLVM/Clang/Clang++
      against libc++</big><br>
    <br>
    <big>Configuration trick to get it to build my set up is as follow:</big><br>
    <br>
      $ <u><b>../trunk/llvm/configure &&</b></u>
    ../trunk/llvm/configure --enable-target=x86_64,arm,cpp,cbe
    --with-clang=/usr/local/bin/clang --with-built-clang --enable-pic
    --enable-polly --enable-shared --with-cxx-include-arch=x86_64
    --enable-optimized --with-optimize-option=-O2 --enable-assertions
    --disable-bootstrap --disable-multilib --enable-jit --enable-threads
    --no-create --no-recursion <b>CXX='/usr/local/bin/clang++'
      CXXFLAGS='-stdlib=libc++ -I/usr/local/include/c++/v1'</b><br>
    <br>
    What's in <b>bold</b> is my updated configure set up to include
    your scenario. What's in <u><b>bold</b></u> is the trick to get
    automake to make the config.status prepped to build against clang.<br>
    <br>
    <big>Build results:</big><br>
    <br>
    ...<br>
    llvm[2]: Linking Release+Asserts unit test ADT (without symbols)<br>
    llvm[2]: ======= Finished Linking Release+Asserts Unit test ADT
    (without symbols)<br>
    make[2]: Leaving directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/unittests/ADT'<br>
    make[1]: Leaving directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/unittests'<br>
    make[1]: Entering directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects'<br>
    make[2]: Entering directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects/sample'<br>
    make[3]: Entering directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects/sample/lib'<br>
    make[4]: Entering directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects/sample/lib/sample'<br>
    llvm[4]: Compiling sample.c for Release+Asserts build<br>
    llvm[4]: Building Release+Asserts Archive Library libsample.a<br>
    make[4]: Leaving directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects/sample/lib/sample'<br>
    make[3]: Leaving directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects/sample/lib'<br>
    make[3]: Entering directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects/sample/tools'<br>
    make[4]: Entering directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects/sample/tools/sample'<br>
    llvm[4]: Compiling main.c for Release+Asserts build<br>
    llvm[4]: Linking Release+Asserts executable Sample (without symbols)<br>
    llvm[4]: ======= Finished Linking Release+Asserts Executable Sample
    (without symbols)<br>
    make[4]: Leaving directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects/sample/tools/sample'<br>
    make[3]: Leaving directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects/sample/tools'<br>
    make[2]: Leaving directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects/sample'<br>
    make[1]: Leaving directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/projects'<br>
    make[1]: Entering directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/bindings'<br>
    make[1]: Nothing to be done for `all'.<br>
    make[1]: Leaving directory
`/home/mdriftmeyer/DeveloperProjects/LLVMProject/build-llvm-clang-libc++/bindings'<br>
    llvm[0]: ***** Completed Release+Asserts Build<br>
mdriftmeyer@horus:~/DeveloperProjects/LLVMProject/build-llvm-clang-libc++$<br>
    <br>
    <b>SUCCESS!</b><br>
    <br>
    <br>
    <big>Final Conclusion:</big> <br>
    <br>
    I'll continue to stagger the build of trunk and update libc++ and
    rebuild trunk for the time being until LLVM/Clang's Hinnant
    recommends moving it under the llvm trunk branch directly. <br>
    <br>
    Sincerely Yours,<br>
    <br>
    Marc J. Driftmeyer<br>
    <br>
    On 08/02/2011 12:14 AM, David Blaikie wrote:
    <blockquote
cite="mid:CAENS6Es84udWpbh5ZfUp1n+pPWZ00gFz=DD-6cD2q3gUioFZDw@mail.gmail.com"
      type="cite">
      <pre wrap="">I'm attempting to selfhost clang (& libc++) & running into what I
assume are some fairly simple problems (on Ubuntu linux - after using
symlinks to work around some weird binary/include placement in
Ubuntu). Running the following configure command:

    ../../../../llvm/configure --enable-optimized --disable-assertions
--prefix=/home/dblaikie/Development/llvm/clean/install/x86-32/Release/llvm
--with-built-clang CXXFLAGS=-stdlib=libc++

I have previously configured this same path without clang (same
command, bar the last two arguments), built, installed, and built
libc++ from that installed build (libc++ is 'installed' as per the
recommendations - symlinking into the system paths, so it should be
accessible. My simple command line experiments seem to confirm this).

My intent is to reconfigure as above, rebuild, reinstall, rebuild
libc++, and at that point I should be fully self hosting on a clang
build built with clang/libc++.

When I run the above configure command, I get the attached config.log.
The final few lines of output are:

configure:13392: checking LLVM capable compiler
configure:13410: result: clang
configure:13415: checking tool compatibility
configure:13438: error: g++|clang++|icc required but not found

Looking at the configure script itself I'm having difficulty
understanding how it checks for clang. The if check that is failing &
printing this error checks only GXX and IXX, nothing clang related,
but I assume somewhere along the way the clang & gcc paths are merged
given clang's drop-in-replacement-for-gcc design, but I can't find
that point.

Any pointers to documentation on how to do this would be great.

Thanks,
- David
</pre>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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>
    <div class="moz-signature">-- <br>
      Marc J. Driftmeyer<br>
      Email :: <a href="mailto:mjd@reanimality.com">mjd@reanimality.com</a><br>
      Web :: <a href="http://www.reanimality.com">http://www.reanimality.com</a><br>
      Cell :: (509) 435-5212
    </div>
  </body>
</html>