Fix get_library_dirs() on FreeBSD
Fix get_library_dirs() on FreeBSD to only return /usr/local/lib,
/usr/lib and /lib as the default location to look for libraries.
FreeBSD does not use lib/${platform} or lib64 by default.  In general,
those directories should not exist, but in case they do, ensure they're
not picked up.
@@ -680,6 +680,8 @@ def get_library_dirs() -> List[str]:
# problematic, please raise the issue on the mailing list.
unixdirs = ['/usr/local/lib', '/usr/lib', '/lib']
+ if is_freebsd():
+ return unixdirs
# FIXME: this needs to be further genericized for aarch64 etc.
machine = platform.machine()
if machine in ('i386', 'i486', 'i586', 'i686'):
