<div dir="ltr">Hal,<div>    Did you base your Makefile on the behavior of <a href="http://build.pl">build.pl</a> from 'make compiler=gcc'? On darwin, I find that the exact build as replicated from the behavior of <a href="http://build.pl">build.pl</a> using 'make compiler=clang' produces a different object file list….</div>
<div><br></div><div><div>--- Makefile.bgq<span class="" style="white-space:pre">        </span>2014-05-30 19:59:16.000000000 -0400</div><div>+++ Makefile.jwh<span class="" style="white-space:pre">        </span>2014-05-30 20:01:08.000000000 -0400</div>
<div>@@ -7,10 +7,10 @@</div><div> </div><div> CPPFLAGS = ${FEATURE_FLAGS} -D__float128='long double'</div><div> </div><div>-CC = powerpc64-bgq-linux-gcc</div><div>-CXX = powerpc64-bgq-linux-g++</div><div>+CC = clang</div>
<div>+CXX =  clang++</div><div> </div><div>-all: build/libiomp5.a build/libiomp5.so</div><div>+all: build/libiomp5.a build/libiomp5.dylib</div><div> </div><div> build/.dir:</div><div>         mkdir -p build</div><div>@@ -28,6 +28,7 @@</div>
<div>         ${CC} -x c++ -c ${CPPFLAGS} -g -O3 -Isrc -Ibuild -o $@ $<</div><div> </div><div> OBJS =  build/kmp_alloc.o \</div><div>+        build/kmp_affinity.o \</div><div>         build/kmp_atomic.o \</div><div>         build/kmp_cancel.o \</div>
<div>         build/kmp_csupport.o \</div><div>@@ -37,8 +38,8 @@</div><div>         build/kmp_error.o \</div><div>         build/kmp_ftn_cdecl.o \</div><div>         build/kmp_ftn_extra.o \</div><div>-        build/kmp_ftn_stdcall.o \</div>
<div>         build/kmp_global.o \</div><div>+        build/kmp_gsupport.o \</div><div>         build/kmp_i18n.o \</div><div>         build/kmp_io.o \</div><div>         build/kmp_itt.o \</div><div>@@ -53,7 +54,8 @@</div>
<div>         build/kmp_utility.o \</div><div>         build/kmp_version.o \</div><div>         build/kmp_lock.o \</div><div>-        build/z_Linux_util.o</div><div>+        build/z_Linux_util.o \</div><div>+        build/ittnotify_static.o</div>
<div> </div><div> BGSYS_FLOOR=$(shell readlink /bgsys/drivers/ppcfloor)</div><div> build/libiomp5.so: $(OBJS)</div><div>[prrg4:~/llvm-svn/openmp-3.5.0/runtime] howarth% </div></div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, May 30, 2014 at 7:30 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">----- Original Message -----<br>
> From: "Jack Howarth" <<a href="mailto:howarth.mailing.lists@gmail.com">howarth.mailing.lists@gmail.com</a>><br>
</div><div class="">> To: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>><br>
> Cc: <a href="mailto:openmp-dev@dcs-maillist2.engr.illinois.edu">openmp-dev@dcs-maillist2.engr.illinois.edu</a>, "C. Bergström" <<a href="mailto:cbergstrom@pathscale.com">cbergstrom@pathscale.com</a>><br>

</div><div class="">> Sent: Friday, May 30, 2014 6:21:19 PM<br>
> Subject: Re: [Openmp-dev] (no subject)<br>
><br>
><br>
</div><div class="">> Hal,<br>
> Also note that they are replicating the build from <a href="http://build.pl" target="_blank">build.pl</a> down to<br>
> the exact order of source file compilation. So the question arises,<br>
> to what degree is is it invalid to even glance at their<br>
> Cmakelist.txt for overall ideas on how to do this. Considering that<br>
> they are simply emitting the same build commands as <a href="http://build.pl" target="_blank">build.pl</a> (to<br>
> which we already have license), I imagine we would have to code in a<br>
> very similar manner even if done from scratch, i.e., use instances<br>
> of add_custom_command to manually emit the same <a href="http://build.pl" target="_blank">build.pl</a> commands.<br>
> There probably aren't that many ways to code that in cmake.<br>
> Jack<br>
<br>
</div>Yep, I understand. That's why what you did could be considered imprudent ;) -- In any case, let's give C. a chance to solve this problem for you.<br>
<br>
In case that does not work out and it makes things easier, I've attached another alternate makefile that I use to build this library. Converting this into cmake form is also not too hard.<br>
<br>
 -Hal<br>
<div class=""><br>
><br>
><br>
><br>
> On Fri, May 30, 2014 at 7:10 PM, Jack Howarth <<br>
> <a href="mailto:howarth.mailing.lists@gmail.com">howarth.mailing.lists@gmail.com</a> > wrote:<br>
><br>
><br>
><br>
> Hal,<br>
> Even if that is problematic, starting over is fairly<br>
> straight-forward. Their CMakelists.txt is simply a directly<br>
> repetition of the commands emitted from the build as done by<br>
</div>> <a href="http://build.pl" target="_blank">build.pl</a> . So if they are difficult about it, just take a printout<br>
<div class="HOEnZb"><div class="h5">> of the output for the current build with 'make compiler=clang" and<br>
> code the Cmakelist.txt from that. If you look carefully, you will<br>
> see that they are replicating this down to the exact order of the<br>
> parameters on the compiler calls. It is very difficult to see how<br>
> that could be intellectual property in any fashion since replicating<br>
> the output of the <a href="http://build.pl" target="_blank">build.pl</a> currently in <a href="http://llvm.org" target="_blank">llvm.org</a> 's openmp results<br>
> in the same ordering. Note that their files are only a crude<br>
> starting point and nowhere near what we will need for llvm.<br>
> Jack<br>
><br>
><br>
><br>
><br>
><br>
> On Fri, May 30, 2014 at 6:40 PM, Hal Finkel < <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> ><br>
> wrote:<br>
><br>
><br>
> Jack,<br>
><br>
> Before you go too far with this, do we have Pathscale's explicit<br>
> contribution of their build files? (I've cc'd C. Bergstrom so that<br>
> he can comment directly).<br>
><br>
> Thanks,<br>
> Hal<br>
><br>
><br>
><br>
> ----- Original Message -----<br>
> > From: "Jack Howarth" < <a href="mailto:howarth.mailing.lists@gmail.com">howarth.mailing.lists@gmail.com</a> ><br>
> > To: <a href="mailto:openmp-dev@dcs-maillist2.engr.illinois.edu">openmp-dev@dcs-maillist2.engr.illinois.edu</a><br>
> > Sent: Friday, May 30, 2014 5:28:33 PM<br>
> > Subject: [Openmp-dev] (no subject)<br>
> ><br>
> ><br>
> ><br>
> > Attached is a first pass at modifying the cmakefiles from<br>
> > <a href="https://github.com/pathscale/openmprtl/blob/master/itt/libomp_oss" target="_blank">https://github.com/pathscale/openmprtl/blob/master/itt/libomp_oss</a><br>
> > to<br>
> > build openmp. I noticed that the existing <a href="http://build.pl" target="_blank">build.pl</a> doesn't actually<br>
> > build a fat shared library on darwin. The attached changes can does<br>
> > this in an indirect fashion with…<br>
> ><br>
> ><br>
> > % cd runtime<br>
> > % mkdir build_32<br>
> > % cd build_32<br>
> > % cmake -DARCH="32" ..<br>
> > % make VERBOSE=1<br>
> > % cd ..<br>
> > % mkdir build_32e<br>
> > % cmake -DARCH="32e" ..<br>
> > % make VERBOSE=1<br>
> > % cd ..<br>
> > % lipo ./build_32/src/libiomp5.dylib ./build_32e/src/libiomp5.dylib<br>
> > -create -o libiomp5.dylib<br>
> > % file libiomp5.dylib<br>
> ><br>
> > libiomp5.dylib: Mach-O universal binary with 2 architectures<br>
> > libiomp5.dylib (for architecture x86_64): Mach-O 64-bit dynamically<br>
> > linked shared library x86_64<br>
> > libiomp5.dylib (for architecture i386): Mach-O dynamically linked<br>
> > shared library i386<br>
> ><br>
> ><br>
> > Normally we could do this in cmake by passing '-arch i386 -arch<br>
> > x86_64' but use of assembly code in the build gums that up.<br>
> > _______________________________________________<br>
> > Openmp-dev mailing list<br>
> > <a href="mailto:Openmp-dev@dcs-maillist2.engr.illinois.edu">Openmp-dev@dcs-maillist2.engr.illinois.edu</a><br>
> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev</a><br>
> ><br>
><br>
> --<br>
> Hal Finkel<br>
> Assistant Computational Scientist<br>
> Leadership Computing Facility<br>
> Argonne National Laboratory<br>
><br>
><br>
><br>
<br>
--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</div></div></blockquote></div><br></div>