Bug 247753 - Mk/Uses/compiler.mk: compiler:openmp still forces the use of gcc
Summary: Mk/Uses/compiler.mk: compiler:openmp still forces the use of gcc
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-04 04:43 UTC by tjlegg
Modified: 2020-07-20 15:14 UTC (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tjlegg 2020-07-04 04:43:07 UTC
I'd like to thank the FreeBSD team for enabling openmp for the base clang. 

Unfortunately, most of the ports that have an OPENMP option, just default to OPENMP_USES= compiler:openmp.

If you look at Mk/Uses/compiler.mk, the openmp option forces the use of gcc, which defeats the purpose of having base being openmp-enabled.

I've altered a few ports like graphics/libraw, graphics/ImageMagick7, and math/fftw3 to have the OPENMP option to provide OPENMP_FLAGS= -lm -lomp and LDFLAGS+= ${OPENMP_FLAGS} instead of OPENMP_USES= compiler:openmp.

These libraries compile successfully without a gcc9 dependency. Digikam tells that its raw demosaicing is now parallelised based on libraw having a functional openmp.

Rather than hand edit port Makefiles, would it be possible to update the compiler:openmp option to reflect the work that has landed in base?
Comment 1 Thierry Thomas freebsd_committer 2020-07-04 08:26:31 UTC
Seconded: I just removed this in math/suitesparse.