[MacPorts] #50511: libomp: build fat library on x86_64 to provide i386 support

MacPorts noreply at macports.org
Fri Mar 18 13:58:19 PDT 2016


#50511: libomp: build fat library on x86_64 to provide i386 support
------------------------------------+--------------------------------
  Reporter:  howarth.at.macports@…  |      Owner:  macports-tickets@…
      Type:  enhancement            |     Status:  reopened
  Priority:  Normal                 |  Milestone:
 Component:  ports                  |    Version:  2.3.4
Resolution:                         |   Keywords:
      Port:  libomp                 |
------------------------------------+--------------------------------

Comment (by howarth.at.macports@…):

 The cmake build machinery in openmp is currently set up to only build
 single architecture unless explicitly told which additional architectures
 to build. Furthermore, it does this by building the architectures
 separately in individual subdirectories and then uses lipo to combine them
 into a single binary. This issue is obvious by simple inspection of
 library installed by libomp-0.0_261249.darwin_15.x86_64.tbz2...

 $ file /opt/local/lib/libomp/libomp.dylib
 /opt/local/lib/libomp/libomp.dylib: Mach-O 64-bit dynamically linked
 shared library x86_64

 and the requirement to explicitly set is clearly noted in
 openmp-3.8.0.src/runtime/Build_With_CMake.txt

 {{{
 ==================
 Mac* Fat Libraries
 ==================
 On OS X* machines, it is possible to build universal (or fat) libraries
 which
 include both i386 and x86_64 architecture objects in a
 single archive.
  $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
 -DCMAKE_OSX_ARCHITECTURES='i386;x86_64' ..
  $ make
 There is also an option -DLIBOMP_OSX_ARCHITECTURES which can be set in
 case
 this is an LLVM source tree build which will only set the libomp library
 to a universal fat library and prevent having the entire llvm/clang build
 produce universal binaries.


 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/50511#comment:17>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list