Created attachment 165836 [details] Ensure -flto -fwhole-program is not used when it is not completely supported During the exp-run in bug 206074, it was found that emulators/simh gives errors with a recent clang 3.8.0 snapshot [1]: /usr/bin/ld: unrecognized option '-plugin' And more of such linking errors. This is because the simh main Makefile attempts to use -flto -fwhole-program with clang, but this support depends on the correctly link time optimization infrastructure being installed (e.g. the LLVMgold.so plugin, and more). Since LTO is not available yet in base, here is a patch to disable the use of these options more thorougly. [1] http://package18.nyi.freebsd.org/data/headamd64PR206074-default/2016-01-15_15h26m58s/logs/errors/simh-3.9.0.log
Reporter is Committer, assign accordingly. This change comes under blanket (implicit) approval, and is an MFH candidate. Please add MFH: 2016Q1 and Approved by: koobs (ports) to your commit log and set merge-quarterly to + when merged. You can use Tools/scripts/mfh for this
Comment on attachment 165836 [details] Ensure -flto -fwhole-program is not used when it is not completely supported Port is unmaintained, implicit approval
A commit references this bug: Author: dim Date: Sun Jan 24 16:25:26 UTC 2016 New revision: 407167 URL: https://svnweb.freebsd.org/changeset/ports/407167 Log: During the exp-run in bug 206074, it was found that emulators/simh gives errors with a recent clang 3.8.0 snapshot [1]: /usr/bin/ld: unrecognized option '-plugin' And more of such linking errors. This is because the simh main Makefile attempts to use -flto -fwhole-program with clang, but this support depends on the correctly link time optimization infrastructure being installed (e.g. the LLVMgold.so plugin, and more). Since LTO is not available yet in base, here is a patch to disable the use of these options more thorougly. Approved by: koobs (ports) PR: 206411 MFH: 2016Q1 Changes: head/emulators/simh/Makefile head/emulators/simh/files/patch-makefile
A commit references this bug: Author: dim Date: Mon Jan 25 07:50:18 UTC 2016 New revision: 407196 URL: https://svnweb.freebsd.org/changeset/ports/407196 Log: MFH: r407167 During the exp-run in bug 206074, it was found that emulators/simh gives errors with a recent clang 3.8.0 snapshot [1]: /usr/bin/ld: unrecognized option '-plugin' And more of such linking errors. This is because the simh main Makefile attempts to use -flto -fwhole-program with clang, but this support depends on the correctly link time optimization infrastructure being installed (e.g. the LLVMgold.so plugin, and more). Since LTO is not available yet in base, here is a patch to disable the use of these options more thorougly. Approved by: ports-secteam (delphij) PR: 206411 Changes: _U branches/2016Q1/ branches/2016Q1/emulators/simh/Makefile branches/2016Q1/emulators/simh/files/patch-makefile
Created attachment 167163 [details] Build log showing failure Trying to build emulators/simh using the compiler installed by lang/clang38: % make CC=clang38 CXX=clang++38 I get the attached error-log. But, if it works for everyone else, can this PR be closed? FWIW, with the regular compiler (clang-3.4.1 found in base), I get tons of warnings, but the build succeeds.