David and Hanspeter,
       I've updated the packaging on
https://sourceforge.net/p/fink/package-submissions/4831/ for llvm39-3.9.0-2
to eliminate the need for a symlink to omp.h in
%p/opt/llvm-$brv/lib/clang/%v/include
by adopting the MacPorts solution of patching cfe/lib/Driver/Tools.cpp to
change...

@@ -5031,6 +5037,8 @@
     case OMPRT_OMP:
     case OMPRT_IOMP5:
       // Clang can generate useful OpenMP code for these two runtime
libraries.
+      // Automatically find omp.h from libomp-dev
+      CmdArgs.push_back("-I@FINK_PREFIX@/include/libomp");
       CmdArgs.push_back("-fopenmp");

       // If no option regarding the use of TLS in OpenMP codegeneration is

The packaging is now complete.
          Jack

On Tue, Nov 1, 2016 at 2:48 PM, Jack Howarth <howarth.at.f...@gmail.com>
wrote:

> David and Hanspeter,
>        The deprecation of Boost support, in favor of OpenMP, in the
> gromacs 2016 release motivated me to enhance the llvm39 and future llvmXY
> packaging so that fink package maintainers can use the LLVM.org clang
> compilers for OpenMP support in a more transparent manner. The proposed
> changes for llvm39-3.9.0-2 cover the following...
>
> 1) Back ported the upstream changes to clang which cause the compiler
> unconditionally emit -lto_library to assist the linker in locating the
> correct libLTO.dylib for -flto. This eliminates the need for the previous
> local ld shell script hack. The new changes also allow clang to find the
> correct location even when the compiler is invoked through a symlink.
>
> 2) Copy libomp.dylib as well as the libgomp.dylib and libiomp5.dylib
> symlinks to %p/lib/libomp for a new common libomp-shlibs split-off package.
> Note that libomp shared library is an odd duck in that it exists without an
> explicit so version by design so there is no libomp.dylib for the new
> common libomp-dev split-off. Each clangXY package will run against the
> latest libomp-dev and libomp-shlibs just as it does with the common
> libcxx1-dev and libcxx1-shlibs packages.
>
> 3) Since the initial llvm39-3.9.0-1 release still had libomp.dylib located
> at %p/opt/llvm-$brv/lib, a copy is retained there for legacy binaries. This
> legacy copy will be dropped in the llvm40 packaging as that will never have
> libomp.dylib in %p/opt/llvm-$brv/lib.
>
> 4) Move the omp.h header into a new common libomp-dev split-off package at
> %p/include/libomp with the existing copy in the clang39 package
> at %p/opt/llvm-$brv/lib/clang/%v/include replaced by a symlink pointing
> at the common copy from libomp-dev at %p/include/libomp/omp.h. The new
> libomp-dev package is BuildDependsOnly: false as it has to remain present
> for multiple clangXY packages.
>
> 5) Add a new common llvm-clang split-off package containing symlinks to
> the clang compilers as llvm-clang and llvm-clang++.
>
> This packaging is posted on fink tracker at https://sourceforge.net/p/
> fink/package-submissions/4831/ and its use demonstrated for the new
> gromacs 2016 release at https://sourceforge.net/p/
> fink/package-submissions/4827/.
>
> This redesign of the llvm39 and future packages means that all any
> maintainer who wants to use OpenMP has to add is...
>
> BuildDepends: llvm-clang, libomp-dev
> Depends: libomp-shlibs
> SetCC: llvm-clang
> SetCXX: llvm-clang++
>
> which will decouple the builds from any specific release of llvmXY as long
> as it provides llvm-clang.
>               Jack
> ps David, at some point we may want to add a cctools package back to fink
> built like MacPorts against the latest llvm.org release. The -flto option
> requires an ar and ranlib compiled against the newest llvm release in order
> to create library archives as previously noted in the DescUsage of the
>  clang39 split-off...
>
>         To use LTO, make sure builds set AR=%p/opt/llvm-3.9/bin/llvm-ar
>         and RANLIB=%p/opt/llvm-3.9/bin/llvm-ranlib.
>
>
> pps I really doubt we will ever see Apple add libomp to Xcode as there is
> no marketing reason to do it as the OpenMP parallel programing standard
> competes with Blocks.
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to