previously (clang8), this port worked fine. WIth clang9 and ccache, the -fPIC test fails due to the output saying clang-cpp and not cc. swils, bdrewery, and I did a bunch of tests to get to the bottom of this, and believe that the change here: http://dpaste.com/2GY8FW0 is causing grief.
@dim: Can you weigh in?
FTR, here's a failing build log: https://home.lerctr.org:8888/data/live-host-ports/2019-11-12_19h15m26s/logs/errors/netatalk3-3.1.12_2,1.log successfull build with CCACHE turned off: https://home.lerctr.org:8888/data/live-host-ports/2019-11-12_17h13m34s/logs/netatalk3-3.1.12_2,1.log
Is this for clang in base, or from ports?
clang in base.
(In reply to Larry Rosenman from comment #0) > the -fPIC test fails due to the output saying clang-cpp and not cc. Can you provide the exact command that returns clang-cpp instead of cc (so that I can test my WIP patch)?
Here you go: root@head-amd64-default:/wrkdirs/usr/ports/net/netatalk3/work/netatalk-3.1.12 # cc -c -O2 -pipe -I/usr/local/include -L/usr/local/lib -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -fPIC -DPIC -DPIC conftest.c clang-cpp: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument] root@head-amd64-default:/wrkdirs/usr/ports/net/netatalk3/work/netatalk-3.1.12 # /ccache/libexec/ccache/cc -c -O2 -pipe -I/usr/local/include -L/usr/local/lib -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -fPIC -DPIC -DPIC conftest.c cpp: warning: argument unused during compilation: '-L/usr/local/lib' [-Wunused-command-line-argument]
A commit references this bug: Author: emaste Date: Wed Nov 13 21:02:18 UTC 2019 New revision: 354692 URL: https://svnweb.freebsd.org/changeset/base/354692 Log: llvm: use AT_EXECPATH from ELF auxiliary vectors for getExecutablePath /proc/curproc/file and the KERN_PROC_PATHNAME sysctl may not return the desired path if there are multiple hardlinks to the file. PR: 241932 Tested by: ler Sponsored by: The FreeBSD Foundation Changes: head/contrib/llvm/lib/Support/Unix/Path.inc
Upstream review at https://reviews.llvm.org/D70198. Brooks is going to update elf_aux_info(3) to support AT_EXECPATH and I will subsequently update the patch to use it instead (so that this works for CHERI).
Thank you for the report; this is now fixed in HEAD and committed upstream. Clang 8.0 in release branches does not have this issue, and if Clang 9.0 is MFC'd it will include the fix.