Arm port

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.

Samuel Crow wrote:

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.

I *really* hate the idea of getting into yet another discussion about yet
another new make system. I like (and am imprssed by) you folks here on this
list, you're very polite and knowledgeable, but getting into another flamewar
which really reveals no new arguments is just too distateful for me. I don't
want to get involved with CMake on any level, beyond running it. Honestly. I
*will* state, with full honesty, that every time I've looked at any other new
make environment (where they *ALWAYS* state they are more powerful). Did you
think that CMake is alone in supporting parallel makes? Note even close, not
even BSD alone. I've never seen any features of any import, that BSD Make
doesn't already support. I'll qualify that by saying that I don't consider the
feature telling you how far the task has gottten is not something I consider of
any importance, but it's something that, if anyone in BSD considered it
important, it would be not terribly hard to add to to BSD Makefile without
making any change to the BSD Make tool at all, just make an extension to one of
the make tempolate files, then ask for the feature to work, pretty simply. I
can't see any, *any* at all, features of any build system, that the BSD Make
tool can't already do. I won't say it *does* do it, because (like that pct done
feature) no one in the BSD community feels it's important enough to do. I could
myself, without any problem, add such a feature to the BSD templates.

That's one feature, BTW, that I know isn't available in many other make systems
(such as GNU Make), and I'd be curious if it's there in CMake: the ability to
automatically, transparently, add important features to make, without modifying
the makefiles at all. BSD Make has the idea of a central directory that holds
make template files. GMake, while it does allow one to add in include files,
doesn't have the concept of a preset directory. You have to tell it where to
go, so without telling the Makefile where to go for what, you can't just
transparently add features. Like the "obj" target in BSD, which is read in from
the bsd.obj.mk template file, from the central directory on any BSD machine of
/usr/share/mk, it adds in special targets, which the user may decide to use. It
makes writing makefiles for libraries really easy, just bring in the bsd.lib.mk,
whic his always available on any machine that has BSD Make, always in the same
place, and BSD Make doesn't need to be told where to look, either. One
template file often calls in another, so you get, when including "bsd.lib.mk" to
build a library, an entire set of helper targets, making constructing libraries
on a BSD system truly easy, and far less likely to have an error.

Someone else has told me "patches are always welcome" in llvm, so I'm going to
act on that and mail them in. I am not expecting any particular usage, you can
even decide to toss them away, but I am fairly sure that both llvm is going to
be brought into FreeBSD (most often cited reason is inability to live with the
new GPL) AND that the makefiles which drive the build will be BSD Makefiles,
which if they're not available from llvm, they'll be added by the FreeBSD
builders. Lots more people than I know how to do this.

I suggested adding in BSD Makefiles, because that's what one expects in a
BSD-intended system. If you don't want them for some reason, that's your
decision, and it won't really cause any BSD OS programmers any huge problems to
add them back in. It'll surprise the users very little, because they'll already
be added in when, say, a FreeBSD user goes looking for them. I was offering a
smallish help, because I am impressed by you, that's all.

I just very much dislike the proliferation of all these different make systems,
which only serve to complicate things, and never add any useful new features,
they just make troubleshooting more difficult (for folks who have to become
familiar with yet another different build system).

I probably shouldn't even have said this, but you pushed a hot button, I do hope
you understand.

I agree. While I too like 'make' (particularly with the gnu extensions :), it does not cut it for us on windows. If there are problems with cmake that are preventing it from being used to generate unix make files, I'd appreciate it if we (as a community) could rally around resolving them, rather than introducing even more crazy build systems.

-Chris

Chris Lattner wrote:

I *really* hate the idea of getting into yet another discussion
about yet
another new make system

I agree. While I too like 'make' (particularly with the gnu
extensions :), it does not cut it for us on windows. If there are
problems with cmake that are preventing it from being used to generate
unix make files, I'd appreciate it if we (as a community) could rally
around resolving them, rather than introducing even more crazy build
systems.

Well, I could offer these two items: first, I know that binaries of the GNU Make
(and most of the GNU tools, in fact) for a Windows environment are available on
the web, I saw them there a year or two ago. I have to admit I don't run
Windows of any kind here, but if you have GNU Make and a bash or sh shell, then
it's not all that hard to write GNU Makefiles macros which could check the
environment (any variables you cared about), and modify the build directly,
depending on what you want to have changed. I did that once, it's not all that hard.

I don't have enough experience with CMake to comment, I just did a CMake build
on my FreeBSD system, and the Makefile it generates is kinda primitive, written
in the old, OLD SYSV style, no conditionals at all. I don't know if that comes
from the CMake folks or the llvm project.