On 5/19/15 5:23 PM, Baptiste Daroussin wrote:
Author: bapt
Date: Tue May 19 22:23:15 2015
New Revision: 283132
URL: https://svnweb.freebsd.org/changeset/base/283132

Log:
   Fix underlinking


I recommend always doing a full clean build when adding or removing libraries to libraries when targetting under/over link problems. Often an exp-run may even make sense. Many library consumers have benefited from overlinking for a long time and no one has realized they were missing direct links. I've added build-time tests into our build at work to force all libraries to not be over or under linked by using -Wl,--no-undefined and tools/build/check-links.sh (this gets tricky with WORLDTMP btw). In most cases of fixing an overlink issue I found that consumers were underlinked. It was a cascading issue.

As an update to the clang++ -lm link, I modified it at work to use --as-needed -lm and had no fallout. I need to test build it in FreeBSD and get an exp-run for it. That will make check-links.sh happier on many of the PROG_CXX/LIB_CXX FreeBSD has.

As for prebuild_libs, it seems that most of the time it is touched in the past year it is done wrong and without good testing. Please seek out reviews and consider dependencies. The libproc one committed currently is still wrong as it is depending on lib/libc++ (rather than lib/libc++__L) and libproc does not even use libc++, it uses libcxxrt. So it should be depending on libcxxrt__L. Not to mention it actually still errors too due to other bugs in it.



--
Regards,
Bryan Drewery
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to