Bug 240737 - devel/llvm90: -fopenmp fails with LLD_LINK=off
Summary: devel/llvm90: -fopenmp fails with LLD_LINK=off
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Brooks Davis
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2019-09-21 19:12 UTC by Jan Beich
Modified: 2019-09-25 17:26 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brooks)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2019-09-21 19:12:41 UTC
https://bugs.llvm.org/show_bug.cgi?id=32279 still affects WITHOUT_LLD_IS_LD architectures. Either files/openmp/patch-bug32279 needs to be copied/rebased from llvm80 or LLD_LINK enabled everywhere.

$ uname -rp
11.3-RELEASE i386
$ pkg install -qy ca_root_nss llvm90
$ fetch https://computing.llnl.gov/tutorials/openMP/samples/C/omp_hello.c
$ clang90 -fopenmp omp_hello.c
/usr/local/llvm90/lib/libomp.so: undefined reference to `scalbnl'
/usr/local/llvm90/lib/libomp.so: undefined reference to `fmaxl'
/usr/local/llvm90/lib/libomp.so: undefined reference to `logbl'
/usr/local/llvm90/lib/libomp.so: undefined reference to `fmaxf'
/usr/local/llvm90/lib/libomp.so: undefined reference to `scalbnf'
/usr/local/llvm90/lib/libomp.so: undefined reference to `fmax'
/usr/local/llvm90/lib/libomp.so: undefined reference to `scalbn'
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
Comment 1 commit-hook freebsd_committer 2019-09-25 17:20:42 UTC
A commit references this bug:

Author: brooks
Date: Wed Sep 25 17:20:27 UTC 2019
New revision: 512799
URL: https://svnweb.freebsd.org/changeset/ports/512799

Log:
  Update to 9.0.0 release.

  Attempt to fix linkin of openmp when the linker isn't LLD.

  Enable LLD_LINK by default.  It is increasingly the case that lld is a
  safe choice so just go with it.

  Enable SecurePLT on PowerPC for FreeBSD 13 and up.

  PR:		240730, 240737

Changes:
  head/devel/llvm90/Makefile
  head/devel/llvm90/distinfo
  head/devel/llvm90/files/clang/patch-tools_clang_lib_Driver_ToolChains_Arch_PPC.cpp
  head/devel/llvm90/files/openmp/patch-projects_openmp_runtime_cmake_LibompHandleFlags.cmake