[Bug 217753] lld [llvm 4.0.0] Linker won't link on aarch64 (Error: Failed to open a.out)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217753 Jan Beich (mail not working) changed: What|Removed |Added Status|New |Closed Resolution|--- |DUPLICATE --- Comment #1 from Jan Beich (mail not working) --- Marking dup unless you can reproduce without qemu-user-static. lld works fine on aarch64 reference machines[1]. [1] https://www.freebsd.org/internal/machines.html *** This bug has been marked as a duplicate of bug 217189 *** -- You are receiving this mail because: You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 Jan Beich (mail not working) changed: What|Removed |Added See Also||https://bugs.llvm.org//show ||_bug.cgi?id=32279 -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 --- Comment #11 from Jan Beich (mail not working) --- Because if compiler emits undefined references the linker cannot be expected to know when -lm is required. Looking at contrib/llvm/tools/clang/lib/Driver/Tools.cpp there are already cases when -lm is passed together with --no-as-needed. Maybe something like https://reviews.llvm.org/D5698 added one more case. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 --- Comment #10 from Konstantin Belousov --- (In reply to Jan Beich (mail not working) from comment #9) Why it should ? The symbols like __divdc3 are referenced by a compiler-generated code, for instance the __divdc3 definition is complex double __divdc3 (double a, double b, double c, double d) with the semantic of return ((a + i * b) / (c + i * d)), where i is imaginary one. The source code should contain complex division operation, not __divdc3 call, to get the reference. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 --- Comment #9 from Jan Beich (mail not working) --- Maybe but cc -E doesn't show any calls to __divdc3 et al. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 --- Comment #8 from Konstantin Belousov --- (In reply to Jan Beich (mail not working) from comment #7) Which means that libm is really needed. -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 --- Comment #7 from Jan Beich (mail not working) --- LDFLAGS+=-Wl,--verbose diff shows: +(/usr/lib/libgcc.a)mulxc3.o +(/usr/lib/libgcc.a)mulsc3.o +(/usr/lib/libgcc.a)muldc3.o +(/usr/lib/libgcc.a)divxc3.o +(/usr/lib/libgcc.a)divsc3.o +(/usr/lib/libgcc.a)divdc3.o while nm kmp_atomic.cpp.o diff shows: - U _GLOBAL_OFFSET_TABLE_ + U __divdc3 + U __divsc3 + U __divxc3 + U __muldc3 + U __mulsc3 + U __mulxc3 but using older libgcc.a won't help: $ nm -A /poudriere/jails/103amd64/usr/lib/libgcc.a | fgrep scalbnl /poudriere/jails/103amd64/usr/lib/libgcc.a:divxc3.o: U scalbnl $ nm -A /poudriere/jails/110amd64/usr/lib/libgcc.a | fgrep scalbnl /poudriere/jails/110amd64/usr/lib/libgcc.a:divxc3.o: U scalbnl /poudriere/jails/110amd64/usr/lib/libgcc.a:divtc3.o: U scalbnl -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 --- Comment #6 from Jan Beich (mail not working) --- (In reply to Konstantin Belousov from comment #5) > If you are so intolerate to the presence of -lm in the dependency > list even when symbols are not referenced, you can use > '-Wl,--as-needed -lm -Wl,--no-as-needed' construct to only record > DT_NEEDED fro libm.so when references actually exist. devel/openmp already adds -Wl,--as-needed and it doesn't work because the references come either from libgcc, crt or something similar. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 Konstantin Belousov changed: What|Removed |Added CC||k...@freebsd.org --- Comment #5 from Konstantin Belousov --- (In reply to Jan Beich (mail not working) from comment #4) A library cannot 'pick up symbols without referencing them'. The presence of the the undefined references means that there are real references in the code. Note that existence of libm.so as a separate shared object from libc is a minor optimization. The libm services are mandated by the C standard, so the separate library is only a way to slighly reduce working set of the programs that do not need them. Linking it in is fine. If you are so intolerate to the presence of -lm in the dependency list even when symbols are not referenced, you can use '-Wl,--as-needed -lm -Wl,--no-as-needed' construct to only record DT_NEEDED fro libm.so when references actually exist. -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 Jan Beich (mail not working) changed: What|Removed |Added Keywords||regression -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 --- Comment #4 from Jan Beich (mail not working) --- Comment on attachment 179304 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=179304 ports/devel/openmp/files/patch-link-libm.patch The workaround isn't really correct. FreeBSD versions before 11.0 don't really need -lm. $ clang40 -fopenmp omp_hello.c $ ldd a.out a.out: libomp.so => /usr/local/llvm40/lib/libomp.so (0x80081f000) libc.so.7 => /lib/libc.so.7 (0x800aa3000) libthr.so.3 => /lib/libthr.so.3 (0x800e5) -- You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"
[Bug 214258] devel/openmp: spurious libm dependency
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214258 --- Comment #3 from Jan Beich (mail not working) --- To avoid maintenance burden it'd be nice if we fix base system regression before FreeBSD 11.1-RELEASE. devel/openmp isn't the only -lomp provider. $ fetch https://computing.llnl.gov/tutorials/openMP/samples/C/omp_hello.c $ pkg install llvm37 llvm38 llvm39 llvm40 llvm-devel $ find -s /usr/local -name libomp.so /usr/local/lib/libomp.so /usr/local/llvm-devel/lib/libomp.so /usr/local/llvm37/lib/libomp.so /usr/local/llvm38/lib/libomp.so /usr/local/llvm39/lib/libomp.so /usr/local/llvm40/lib/libomp.so $ clang37 -fopenmp omp_hello.c /usr/bin/ld: cannot find -lomp clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation) $ clang37 -fopenmp omp_hello.c $(llvm-config37 --ldflags) /usr/local/llvm37/lib/libomp.so: undefined reference to `scalbnl' /usr/local/llvm37/lib/libomp.so: undefined reference to `fmaxl' /usr/local/llvm37/lib/libomp.so: undefined reference to `logbl' /usr/local/llvm37/lib/libomp.so: undefined reference to `scalbnf' /usr/local/llvm37/lib/libomp.so: undefined reference to `logb' /usr/local/llvm37/lib/libomp.so: undefined reference to `logbf' /usr/local/llvm37/lib/libomp.so: undefined reference to `scalbn' clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation) $ clang38 -fopenmp omp_hello.c /usr/local/llvm38/lib/libomp.so: undefined reference to `scalbnl' /usr/local/llvm38/lib/libomp.so: undefined reference to `fmaxl' /usr/local/llvm38/lib/libomp.so: undefined reference to `logbl' /usr/local/llvm38/lib/libomp.so: undefined reference to `scalbnf' /usr/local/llvm38/lib/libomp.so: undefined reference to `logb' /usr/local/llvm38/lib/libomp.so: undefined reference to `logbf' /usr/local/llvm38/lib/libomp.so: undefined reference to `scalbn' clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation) $ clang39 -fopenmp omp_hello.c /usr/local/llvm39/lib/libomp.so: undefined reference to `scalbnl' /usr/local/llvm39/lib/libomp.so: undefined reference to `fmaxl' /usr/local/llvm39/lib/libomp.so: undefined reference to `logbl' /usr/local/llvm39/lib/libomp.so: undefined reference to `scalbnf' /usr/local/llvm39/lib/libomp.so: undefined reference to `logb' /usr/local/llvm39/lib/libomp.so: undefined reference to `logbf' /usr/local/llvm39/lib/libomp.so: undefined reference to `scalbn' clang-3.9: error: linker command failed with exit code 1 (use -v to see invocation) $ clang40 -fopenmp omp_hello.c /usr/local/llvm40/lib/libomp.so: undefined reference to `scalbnl' /usr/local/llvm40/lib/libomp.so: undefined reference to `fmaxl' /usr/local/llvm40/lib/libomp.so: undefined reference to `logbl' /usr/local/llvm40/lib/libomp.so: undefined reference to `scalbnf' /usr/local/llvm40/lib/libomp.so: undefined reference to `logb' /usr/local/llvm40/lib/libomp.so: undefined reference to `logbf' /usr/local/llvm40/lib/libomp.so: undefined reference to `scalbn' clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation) $ clang-devel -fopenmp omp_hello.c /usr/bin/ld: cannot find -lomp clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation) $ clang-devel -fopenmp omp_hello.c $(llvm-config-devel --ldflags) /usr/local/llvm-devel/lib/libomp.so: undefined reference to `scalbnl' /usr/local/llvm-devel/lib/libomp.so: undefined reference to `fmaxl' /usr/local/llvm-devel/lib/libomp.so: undefined reference to `logbl' /usr/local/llvm-devel/lib/libomp.so: undefined reference to `scalbnf' /usr/local/llvm-devel/lib/libomp.so: undefined reference to `logb' /usr/local/llvm-devel/lib/libomp.so: undefined reference to `logbf' /usr/local/llvm-devel/lib/libomp.so: undefined reference to `scalbn' clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation) -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. ___ freebsd-toolchain@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"