[LLVMdev] Building LLVM with cmake on FreeBSD
Török Edwin
edwintorok at gmail.com
Mon May 25 13:13:36 PDT 2009
On 2009-05-25 23:03, Chuck Robey wrote:
> Török Edwin wrote:
>
>> On 2009-05-24 20:38, Chuck Robey wrote:
>>
>>> Óscar Fuentes wrote:
>>>
>>>
>>>> Chuck Robey <chuckr at telenix.org> writes:
>>>>
>>>>
>>>>
>>>>>> Just checked that the makefiles generated by cmake work with `make' on
>>>>>> FreeBSD 7.2 x86. The build fails while building `opt' because libdl is
>>>>>> missing.
>>>>>>
>>>>>>
>>>>> They absolutely do work, even on FreeBSD-current( I run that here),
>>>>> but not using the native make (the one built as part of "make world"
>>>>> which is a direct descendant of "pmake". You have to use the GNU
>>>>> make,
>>>>>
>>>>>
>>>> Uh? My FreeBSD installment has `make' and no `gmake'. `make' is indeed
>>>> BSD make.
>>>>
>>>> So, to recap, right now LLVM svn builds fine on FreeBSD 7.2 using BSD
>>>> `make' with the makefiles generated by cmake.
>>>>
>>>> [snip]
>>>>
>>>>
>>>>
>>>>> I did give you one example of a statement I found in your makefiles,
>>>>> which I'm absolutely certain can't be understood by our make.
>>>>>
>>>>>
>>>> It is obvious that you are not reading what I write.
>>>>
>>>>
>>> Not completely, because (at least to me) it's not making sense against what I
>>> find. I'd been lookiing at the llvm version 2.3, so I just got a copy of 2.5,
>>> and I looked at the Makefile that came right out of the tarball, then I
>>> regenerated the Makefile via the supplied configure script. Right at the top of
>>> both Makefiles is the GNU-style conditional "ifeq", and that's a GNU
>>> conditional,
>>>
>> If you want to use the CMake build system, don't run configure.
>> configure is just plain old autoconf, that uses the supplied GNU makefiles.
>>
>
> Not necessarily true, if one writes up a Makefile.in to be compatible with BSD
> make, then you get a BSD Make compatibility (but not GNU Make, then). I've done
> that myself. It's non-intuitive, I'll admit.
>
The Makefile.in and Makefiles supplied by default are GNU make, no doubt
about that.
But we where talking about CMake: it doesn't use the supplied
Makefile.in, or Makefile at all.
It generates the makefiles when you run "cmake" from CMakeLists.txt files.
You either use cmake, or configure, but not both.
>
>> See http://llvm.org/docs/CMake.html on how to use cmake, you should look
>> at the makefiles that cmake creates,
>>
>
> I looked at the llvm I could download, the tarball llvm-2.5.tar.gz, both at the
> Makefile that was originally supplied AND the one that's there after you do a
> configure. They both have "ifeq" constructs right up at the top of the
> Makefile, which are inarguably not BSD Make compatible. They ARE GNU Make
> compatible, I don't really understand CMake well enough to comment on that.
> Under another email, I described the easiest way to tell if a Makefile is or
> isn't BSD/GNU Make compatible.
>
>
Here's how to use CMake:
edwin at debian:~/llvm-svn/llvm-obj-cmake$ cmake ~/llvm-svn/llvm
....
And I am able to use the created makefiles by using pmake:
$ pmake
[ 0%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/ConstantRange.cpp.o
[ 0%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/Debug.cpp.o
[ 0%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/Dwarf.cpp.o
[ 0%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/FileUtilities.cpp.o
[ 0%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o
[ 1%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/GraphWriter.cpp.o
[ 1%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/IsInf.cpp.o
[ 1%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/IsNAN.cpp.o
[ 1%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/ManagedStatic.cpp.o
[ 1%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/MemoryBuffer.cpp.o
[ 1%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/PluginLoader.cpp.o
I've attached 2 makefiles created by cmake.
Best regards,
--Edwin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090525/cc3aa552/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile.2
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090525/cc3aa552/attachment-0001.ksh>
More information about the llvm-dev
mailing list