Building rustc on FreeBSD: Can't find libstdc++


What configuration are you using when building for FreeBSD (not cross compile)?

The default does not work because /usr/bin/ld can not find libstdc++ in /usr/local/lib/gcc49

Event though building with clang is supposed to use libc++, I can’t seem to be able to override. No matter what options or env vars I use, it always tries to link to libstdc++ instead of libc++.

Edit: I want to build a compiler with debug enabled…

Edit2: The failing component is “rustc_llvm”