[LLVMdev] Arm port

Samuel Crow samuraileumas at yahoo.com
Fri May 22 09:24:42 PDT 2009

> OK, I checked the llvm-2.5 Makefiles.  They have constructs in them which cannot
> be used in any BSD Makefile (such as the form of conditionals: ifndef is a GNU
> Makeism), and won't run on any BSD Make.  I know BSD Make and GNU Make well
> enough, but I doon't know much about Cmake,  I can say that all of the makefiles
> I saw in llvm would (1) refuse to run on BSD make and (2) make no use whatever
> of the large set of BSD Make template files that always reside in /usr/share/mk.
> What I could offer, would be to capture a llvm build as done with the current
> Makefile setup, and create a set of BSD Makefiles which would work with BSD
> Makefiles and cooperate with the BSD template Makefiles (such as bsd.prog.mk,
> bsd.lib.mk, etc).  I think that the only thing that CMake is offering you is
> that snazzy buildtime clock, but I think that's all.  If you folks felt this
> would be desireable.  If llvm gets brought into any BSD, it's going to have to
> be created by the BSD involved, anyhow ... well nearly all, I've seen recently
> that OpenBSD seems to be making use of outside makefiles in outside sourced
> things like Perl.  But it would surely need BSD Makefiles for FreeBSD, and I'm
> pretty sure for NetBSD also.  They're not all that difficult to add in, I could
> do that for you if you wanted.

According to an article at OSNews http://osne.ws/gjz Clang (the LLVM's C family frontend) is already being adopted as the C compiler of choice for FreeBSD.  However, one of Clang's design principles is IDE integration.  Makefiles may soon become a thing of the past for LLVM.

Before CMake was adopted by the LLVM team they were having troubles with maintaining build files for XCode on the Mac, Visual Studio projects for Windows, and GNU Make on Linux.  The idea of adopting CMake was to put the days of maintaning multiple build environments in the past or at least in somebody else's lap.  Reintroducing yet another build environment to LLVM sounds to me like a step backward.  We'll see what the team says about it.

I think that if you want BSD support for LLVM, working with the CMake
team to add BSD support to CMake would be the route to go.  It was
designed from the ground up with cross-platform development in mind. 
It is much more powerful than any make utility will ever be.  Even
though LLVM may be only scratching the surface of its functionality,
that doesn't mean that CMake is merely graphical bells and whistles. 
It was desgned for parallel processing supercomputer users and ported
to other platforms from there.  I'm honestly surprised that BSD Unix is still not supported by it.


More information about the llvm-dev mailing list