abi::OsLinux => (loader::LINUX_DLL_PREFIX, loader::LINUX_DLL_SUFFIX),
abi::OsAndroid => (loader::ANDROID_DLL_PREFIX, loader::ANDROID_DLL_SUFFIX),
abi::OsFreebsd => (loader::FREEBSD_DLL_PREFIX, loader::FREEBSD_DLL_SUFFIX),
+ abi::OsDragonfly => (loader::DRAGONFLY_DLL_PREFIX, loader::DRAGONFLY_DLL_SUFFIX),
abi::OsiOS => unreachable!(),
};
out_filename.with_filename(format!("{}{}{}",
abi::OsLinux |
abi::OsAndroid |
abi::OsFreebsd |
+ abi::OsDragonfly |
abi::OsiOS => out_filename.clone(),
}
}
// the symbols
if (sess.targ_cfg.os == abi::OsMacos || sess.targ_cfg.os == abi::OsiOS)
&& (sess.opts.debuginfo != NoDebugInfo) {
- match Command::new("dsymutil").arg(out_filename).status() {
+ match Command::new("dsymutil").arg(out_filename).output() {
Ok(..) => {}
Err(e) => {
sess.err(format!("failed to run dsymutil: {}", e).as_slice());
cmd.arg("-Wl,--gc-sections");
}
- if sess.targ_cfg.os == abi::OsLinux {
+ if sess.targ_cfg.os == abi::OsLinux || sess.targ_cfg.os == abi::OsDragonfly {
// GNU-style linkers will use this to omit linking to libraries which
// don't actually fulfill any relocations, but only for libraries which
// follow this flag. Thus, use it before specifying libraries to link to.
"-L/usr/local/lib/gcc46",
"-L/usr/local/lib/gcc44"]);
}
+ else if sess.targ_cfg.os == abi::OsDragonfly {
+ cmd.args(["-L/usr/local/lib",
+ "-L/usr/lib/gcc47",
+ "-L/usr/lib/gcc44"]);
+ }
+
// FIXME (#2397): At some point we want to rpath our guesses as to
// where extern libraries might live, based on the