[Openmp-dev] Integration with LLVM CMake build when doing Universal Binary

Jonathan Buschmann jonthn at pinacea.com
Wed May 27 14:35:22 PDT 2015


Hello Johnny,

Thanks a lot. It works for me.

> Le 27 mai 2015 à 22:08, Peyton, Jonathan L <jonathan.l.peyton at intel.com> a écrit :
> 
> Jonathan and Jack,
> 
> Can you guys test this patch and see if it allows the universal fat build?
> 
> Call cmake like Jonathan noted below with the -DCMAKE_OSX_ARCHITECTURES='...' flag set
> cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="x86_64;i386" ..
> 
> To apply:
> patch -p1 < allow_fat_builds.patch
> 
> -- Johnny
> 
> -----Original Message-----
> From: openmp-dev-bounces at cs.uiuc.edu [mailto:openmp-dev-bounces at cs.uiuc.edu] On Behalf Of Peyton, Jonathan L
> Sent: Tuesday, May 26, 2015 5:31 PM
> To: Jonathan Buschmann; openmp-dev at dcs-maillist2.engr.illinois.edu
> Subject: Re: [Openmp-dev] Integration with LLVM CMake build when doing Universal Binary
> 
> Somebody else has asked for a fat build and I tried to wrangle this problem for a while.  I may have a solution where the Linux assembly file (which is for mac as well) simply decodes which architecture it is using like the rest of the C and CXX files are doing implicitly.  I'll look at this more closely tomorrow and see.
> 
> -- Johnny
> 
> -----Original Message-----
> From: openmp-dev-bounces at cs.uiuc.edu [mailto:openmp-dev-bounces at cs.uiuc.edu] On Behalf Of Jonathan Buschmann
> Sent: Saturday, May 23, 2015 11:04 AM
> To: openmp-dev at dcs-maillist2.engr.illinois.edu
> Subject: [Openmp-dev] Integration with LLVM CMake build when doing Universal Binary
> 
> Hello openmp-dev,
> 
> When trying a build with everything under the LLVM hierarchy (in this case openmp subversion trunk saved under projects/libiomp) I encountered this error :
> 
> [ 42%] Building C object projects/libiomp/runtime/CMakeFiles/iomp5.dir/src/z_Linux_asm.s.o
> /tmp/llvm/projects/libiomp/runtime/src/z_Linux_asm.s:702:8: error: register %rbp is only available in 64-bit mode
> pushq %rbp       
>           ^~~~
>> 
> I usually do a "Universal build" (32-bit / 64-bit in the same bin/lib) something like :
> 
> cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="x86_64;i386"
> 
> so you end up with the compilation done this way :
> 
> [ 42%] Building C object projects/libiomp/runtime/CMakeFiles/iomp5.dir/src/z_Linux_asm.s.o
> cd /tmp/llvm/build/projects/libiomp/runtime && /usr/bin/cc  -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Diomp5_EXPORTS -DKMP_ARCH_X86_64 -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default  -DNDEBUG -arch x86_64 -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -fPIC -I/tmp/llvm/build/projects/libiomp/runtime -I/tmp/llvm/projects/libiomp/runtime -I/tmp/llvm/build/include -I/tmp/llvm/include -I/tmp/llvm/projects/libiomp/runtime/src -I/tmp/llvm/projects/libiomp/runtime/src/i18n -I/tmp/llvm/projects/libiomp/runtime/src/include/41 -I/tmp/llvm/projects/libiomp/runtime/src/thirdparty/ittnotify    -D USE_ITT_BUILD -D KMP_ARCH_STR="\"Intel(R) 64\"" -D BUILD_I8 -D KMP_LIBRARY_FILE=\"libiomp5.dylib\" -D KMP_VERSION_MAJOR=5 -D KMP_NESTED_HOT_TEAMS -D CACHE_LINE=64 -D KMP_ADJUST_BLOCKTIME=1 -D BUILD_PARALLEL_ORDERED -D KMP_ASM_INTRINS -D USE_ITT_NOTIFY=1 -D INTEL_ITTNOTIFY_PREFIX=__kmp_itt_ -D _GNU_SOURCE -D _REENTRANT -D BUILD_TV -D USE_CBLKDATA -D KMP_GOMP_COMPAT -D USE_LOAD_BALANCE -D KMP_USE_ASSERT -D GUIDEDLL_EXPORTS -D KMP_STATS_ENABLED=0 -D OMPT_SUPPORT=0 -D OMPT_BLAME=1 -D OMPT_TRACE=1 -D OMP_50_ENABLED=0 -D OMP_41_ENABLED=1 -D OMP_40_ENABLED=1 -D OMP_30_ENABLED=1 -D KMP_USE_ADAPTIVE_LOCKS=1 -D KMP_DEBUG_ADAPTIVE_LOCKS=0 -D KMP_USE_INTERNODE_ALIGNMENT=0 -x assembler-with-cpp -o CMakeFiles/iomp5.dir/src/z_Linux_asm.s.o   -c /tmp/llvm/projects/libiomp/runtime/src/z_Linux_asm.s
> 
> The flag -arch i386 conflicts with the -DKMP_ARCH_X86_64 and produce the result above (or at least I think so).
> 
> Would it be possible to support building with -DCMAKE_OSX_ARCHITECTURES="x86_64;i386" ?
> 
> Regards,
> 
> jonathan
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev
> 
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev
> <allow_fat_builds.patch>





More information about the Openmp-dev mailing list