bring freebsd linker config up-to-date (same as dragonfly)
This commit is contained in:
parent
f4046deb20
commit
6115f2effe
|
@ -16,13 +16,20 @@ pub fn opts() -> TargetOptions {
|
|||
linker: "cc".to_string(),
|
||||
dynamic_linking: true,
|
||||
executables: true,
|
||||
linker_is_gnu: true,
|
||||
has_rpath: true,
|
||||
pre_link_args: vec![
|
||||
pre_link_args: vec!(
|
||||
// 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.
|
||||
"-Wl,--as-needed".to_string(),
|
||||
|
||||
// Always enable NX protection when it is available
|
||||
"-Wl,-z,noexecstack".to_string(),
|
||||
],
|
||||
),
|
||||
position_independent_executables: true,
|
||||
exe_allocation_crate: super::maybe_jemalloc(),
|
||||
|
||||
.. Default::default()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue