[Openmp-dev] [PATCH] [Revisedx2] Initial cmake support

Alp Toker alp at nuanti.com
Mon Jun 2 12:39:38 PDT 2014


On 02/06/2014 20:33, David Chisnall wrote:
> On 2 Jun 2014, at 18:23, Peyton, Jonathan L <jonathan.l.peyton at intel.com> wrote:
>
>> Can you give a specific example?  I want this to be exactly what you all need and want.  So I want to be sure what you are talking about.
> When I tried to compile on FreeBSD, I spent an hour fighting the build system before giving up.  I was very glad that Alp jumped through the required hoops, but was even more glad that the person doing the hoop-jumping was not me.  I'd like to see that the next person who tries to port the runtime to a new OS (Open/NetBSD, Haiku, whatever) doesn't have the same experience as me.  Once you've got it to build, it's easy to see what the OS-specific parts are and tweak them, but the maze of twisty recursive perl-shell-make invocations all alike is a huge pain.
>
> To see how hard it is with your new system, try adding support for building on NetBSD (it doesn't matter whether the code actually compiles there) and see how many *different* places you need to touch.  This was alp's commit to bring up the initial FreeBSD port:
>
> http://llvm.org/viewvc/llvm-project?view=revision&revision=202478

Right. To make the codebase itself more portable, a natural step was to 
move from KMP_OS ifdefs towards predication on features like 
KMP_AFFINITY_SUPPORTED:

   http://reviews.llvm.org/rL202613

I like David's idea of applying similar simplifications to the build 
system, which will improve locality and simplify porting. A bonus is 
that such a feature-based approach is self-documenting.

The concept of a predefined OS doesn't fit well for a low-level library 
like the OpenMP runtime, and even there it can vary based on what level 
of userspace you're at (e.g. the standard build vs. Many Integrated Core 
Architecture where FreeBSD is supported in two different senses).

This isn't a fundamental criticism, and the goals can be worked towards 
incrementally.

Alp.


>
> The files he needed to edit *just in the build system* were:
>
> tools/common.inc
>
> tools/freebsd.inc (and this one is a bit of an ugly hack - done correctly it would be factored out into a unix.inc that both linux.inc and freebsd.inc included)
>
> lib/Platform.pm
>
> lib/Uname.pm
>
> src/makefile.mk
>
> Having to modify the build system for a relatively small library in five different places is a significant barrier.
>
> David
>
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev

-- 
http://www.nuanti.com
the browser experts




More information about the Openmp-dev mailing list