<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I build with either using the include Cmake option or
    autoconf/makefile option, but one thing is clear, just export
    CC=clang and export CXX=clang++ doesn't cut it, especially on Linux.<br>
    <br>
    My Linux System:<br>
    <br>
    <ul>
      <li>Debian Sid/Experimental</li>
      <li>3.2.x kernel with LLVM/Clang 3.1 installed under /usr</li>
      <li>LLVM/Clang trunk installed under /usr/local</li>
    </ul>
    So, if I'm going to move from GCC -> self-hosting against the
    newly build llvm/clang from trunk I'm passing /usr/local/bin/clang
    and /usr/local/bin/clang++ in<br>
    <br>
    For Cmake:<br>
    <br>
    //CXX compiler.<br>
    CMAKE_CXX_COMPILER:FILEPATH=/usr/local/bin/clang++<br>
    <br>
    //C compiler.<br>
    CMAKE_C_COMPILER:FILEPATH=/usr/local/bin/clang<br>
    <br>
    <br>
    via the <br>
    <br>
    $ cmake -DCMAKE_CXX_COMPILER=/usr/local/bin/clang++
    -DCMAKE_C_COMPILER=/usr/local/bin/clang ../trunk/llvm<br>
    <br>
    and any other custom flags like CMAKE_CXX_FLAGS= and CMAKE_C_FLAGS=
    not to mention Boolean flags for optimizations according to what my
    CPU can muster.<br>
    <br>
    The autoconf configure flags listed like you cite but I tend to pass
    <br>
    <br>
    $ CC=/usr/local/bin/clang CXX=/usr/local/bin/clang++
    ../llvm/trunk/configure --disable-assertions --enable-optimized
    --disable-shared --enable-targets=x86_64 and --prefix=/usr/local <br>
    <br>
    and any other flags I see fit.<br>
    <br>
    - Marc<br>
    <br>
    On 05/29/2012 05:27 AM, Murat B wrote:
    <blockquote
      cite="mid:1338294471.81296.YahooMailNeo@web126001.mail.ne1.yahoo.com"
      type="cite">
      <pre wrap="">Thanks David and Nikola for your replies.

I configure using following commands.

export CC=clang
export CXX=clang++
../configure --disable-assertions --enable-optimized --disable-shared --enable-targets=x86_64


I am trying to build it on a x86-64 architecture.
Do I need to provide more information to the Clang compiler?

Thanks a lot!
Murat


----- Forwarded Message -----
From: David Chisnall <a class="moz-txt-link-rfc2396E" href="mailto:csdavec@swan.ac.uk"><csdavec@swan.ac.uk></a>
To: Murat B <a class="moz-txt-link-rfc2396E" href="mailto:murat8307@yahoo.com"><murat8307@yahoo.com></a>
Cc: <a class="moz-txt-link-rfc2396E" href="mailto:cfe-dev@cs.uiuc.edu">"cfe-dev@cs.uiuc.edu"</a> <a class="moz-txt-link-rfc2396E" href="mailto:cfe-dev@cs.uiuc.edu"><cfe-dev@cs.uiuc.edu></a>
Sent: Tuesday, May 29, 2012 10:45 AM
Subject: Re: [cfe-dev] Building Clang+LLVM using Clang

Your problem is a missing definition from a system header.  Without knowing what your target OS is, no one will be able to help you...

David

On 29 May 2012, at 09:55, Murat B wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">Hello,

I built the Clang using gcc and want to build Clang+LLVM using the already built Clang.

My compilation terminates by outputting following error messages:

/home/murat/llvm/lib/Support/IsInf.cpp:41:3: error: "Don't know how to get isinf()"
# error "Don't know how to get isinf()"
   ^
/home/murat/llvm/lib/Support/IsInf.cpp:46:30: error: use of undeclared identifier 'isinf'
int IsInf(float f)  { return isinf(f); }
                              ^
/home/murat/llvm/lib/Support/IsInf.cpp:47:30: error: use of undeclared identifier 'isinf'
int IsInf(double d) { return isinf(d); }
                              ^
3 errors generated.
make[1]: *** [/home/murat/llvm/build/lib/Support/Release/IsInf.o] Error 1
make[1]: Leaving directory `/home/murat/llvm/build/lib/Support'
make: *** [all] Error 1

It seems the compilation cannot find the standard header files.

I compile using following flags:
-I/home/murat/llvm/build/include
-I/home/murat/llvm/build/lib/Support
-I/home/murat/llvm/include
-I/home/murat/llvm/lib/Support
-DNDEBUG
-D_GNU_SOURCE
-D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS
-O0
-fomit-frame-pointer
-fno-exceptions
-fPIC
-Woverloaded-virtual
-Wcast-qual
-Wall -W -Wno-unused-parameter -Wwrite-strings -Wcovered-switch-default 

Can anybody let me know which flags I need to compile Clang+LLVM using Clang and what I do wrong?

Thanks a lot for your help!
Murat


_______________________________________________
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>
      <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>
    <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>