Just so I don't forget xv6: set the linker to /usr/local/bin/ld, not the FreeBSD one also, delete -nodefaultlibs [...]