Created attachment 249472 [details] devel/gmake: mark LTO_UNSAFE devel/gmake fails to build if WITH_LTO=yes is set. relevant part of the log: --- make --- cc -O2 -pipe -flto=thin -fstack-protector-strong -fno-strict-aliasing -Wl,--export-dynamic -flto=thin -fstack-protector-strong -o make src/ar.o src/arscan.o src/commands.o src/default.o src/dir.o src/expand.o src/file.o src/function.o src/getopt.o src/getopt1.o src/guile.o src/hash.o src/implicit.o src/job.o src/load.o src/loadapi.o src/main.o src/misc.o src/output.o src/read.o src/remake.o src/rule.o src/shuffle.o src/signame.o src/strcache.o src/variable.o src/version.o src/vpath.o src/posixos.o src/remote-stub.o lib/libgnu.a /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib ld: error: undefined symbol: find_in_given_path >>> referenced by job.c >>> lto.tmp:(child_execute_job) cc: error: linker command failed with exit code 1 (use -v to see invocation) *** [make] Error code 1 Until that is fixed it should be marked as LTO_UNSAFE
This works here. Which version of FreeBSD do you use? Which version of clang?
(In reply to Tijl Coosemans from comment #1) building for: FreeBSD 132amd64-test-test-lto 13.2-RELEASE-p10 FreeBSD 13.2-RELEASE-p10 amd64 FreeBSD clang version 14.0.5
In this case, it seems that BINARY_ALIAS= ranlib=llvm-ranlib can keep LTO safe. However, the environment that caused this same problem and confirmed that this would solve it is 12.4-STABLE :) A retest with a version that is not out of support is required.