Summary: | devel/llvm37: undefined references when compiling with -fopenmp=libomp | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | stadtkind2 |
Component: | Individual Port(s) | Assignee: | Brooks Davis <brooks> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | FreeBSD |
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(brooks) |
Version: | Latest | ||
Hardware: | amd64 | ||
OS: | Any |
Description
stadtkind2
2015-09-20 18:06:40 UTC
Could you post the result of running: clang37 -### -O -fopenmp=libomp omp.c Personally I have only had success by adding -L/usr/local/llvm37/lib -lomp - choosing either -liomp5 or -lgomp also works. clang37 -fopenmp -L/usr/local/llvm37/lib -lomp omp.c See http://blog.llvm.org/2015/05/openmp-support_22.html Brooks - something for the todo list?? allow USE=compiler:openmp to recognize clang37 as valid if CC=clang37 CXX=clang++37 are set or pick clang37 over gcc? (In reply to Brooks Davis from comment #1) $ clang37 -### -O -fopenmp=libomp o> clang version 3.7.0 (tags/RELEASE_370/final) Target: x86_64-unknown-freebsd10.1 Thread model: posix "/usr/local/llvm37/bin/clang-3.7" "-cc1" "-triple" "x86_64-unknown-freebsd10.1" "-emit-obj" "-disable-free" "-main-file-name" "omp.c" "-mrelocation-model" "static" "-mthread-model" "posix" "-mdisable-fp-elim" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-dwarf-column-info" "-resource-dir" "/usr/local/llvm37/bin/../lib/clang/3.7.0" "-O2" "-fdebug-compilation-dir" "/home/space7/Personal/programming/omp" "-ferror-limit" "19" "-fmessage-length" "80" "-fopenmp" "-fnoopenmp-use-tls" "-mstackrealign" "-fobjc-runtime=gnustep" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-o" "/tmp/omp-35dde0.o" "-x" "c" "omp.c" "/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" "--hash-style=both" "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" "/tmp/omp-35dde0.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/lib/crtend.o" "/usr/lib/crtn.o" A commit references this bug: Author: brooks Date: Sat Sep 3 00:20:06 UTC 2016 New revision: 421280 URL: https://svnweb.freebsd.org/changeset/ports/421280 Log: Upgrade to 3.9.0 release. Improve support for -fopenmp with a hack inspired by a submission from Johannes Dieterich <dieterich@ogolem.org>. Implement a number of improvments submitted by lightside@gmx.com: - Add license information - Use VAR option helper for _USES_PYTHON variable - Add libxml2 to USE_GNOME for CLANG option - Sort variables for options (e.g. GOLD_*) Add USES=execinfo for LLDB. PR: 203223, 212334 Changes: head/devel/llvm39/Makefile head/devel/llvm39/distinfo head/devel/llvm39/files/clang-patch-fopenmp.diff |