https://people.freebsd.org/~bdrewery/patches/clangcxx-libm.diff Please exp-run this. It avoids overlinking libm. It is possible some ports are underlinked to libm and need to add an explicit -lm.
Exp-run results: http://package18.nyi.freebsd.org/jail.html?mastername=headamd64PR203936-default http://pb2.nyi.freebsd.org/jail.html?mastername=headi386PR203936-default 3 new failures (and 2 new skipped): + {"origin"=>"devel/spatialindex", "pkgname"=>"spatialindex-1.8.5", "phase"=>"build", "errortype"=>"linker_error"} + {"origin"=>"lang/squirrel", "pkgname"=>"squirrel-2.2.5", "phase"=>"build", "errortype"=>"linker_error"} + {"origin"=>"net/udt", "pkgname"=>"udt-4.11_1", "phase"=>"build", "errortype"=>"linker_error"} Failure logs: http://package18.nyi.freebsd.org/data/headamd64PR203936-default/2015-10-29_14h41m45s/logs/errors/spatialindex-1.8.5.log http://package18.nyi.freebsd.org/data/headamd64PR203936-default/2015-10-29_14h41m45s/logs/errors/squirrel-2.2.5.log http://package18.nyi.freebsd.org/data/headamd64PR203936-default/2015-10-29_14h41m45s/logs/errors/udt-4.11_1.log
Thanks!
Did the patch land?
(In reply to Jan Beich from comment #3) > Did the patch land? Does not appear so; running clang++ -v hello.cc shows the linker being invoked with -lm not wrapped by --as-needed / --no-as-needed.
Bryan, do we still need this? Otherwise I'd like to commit it upstream.