[LLVMdev] Building LLVM with cmake on FreeBSD

Chuck Robey chuckr at telenix.org
Mon May 25 13:03:46 PDT 2009


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.

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

> not configure.
> 
> 
> Best regards,
> --Edwin
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list