Enable combining +crt-static and relocation-model=pic on x86_64-unknown-linux-gnu

This commit is contained in:
Andy Caldwell 2021-06-16 19:56:38 +01:00
parent f2707fec04
commit b94da2bace
No known key found for this signature in database
GPG Key ID: D4204541AC1D228D
2 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,7 @@ pub fn target() -> Target {
base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m64".to_string());
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
base.stack_probes = StackProbeType::Call;
base.static_position_independent_executables = true;
base.supported_sanitizers = SanitizerSet::ADDRESS
| SanitizerSet::CFI
| SanitizerSet::LEAK

View File

@ -1,9 +1,11 @@
-include ../../run-make-fulldeps/tools.mk
# only-x86_64-unknown-linux-musl
# only-x86_64
# only-linux
# ignore-gnux32
# How to manually run this
# $ ./x.py test --target x86_64-unknown-linux-musl src/test/run-make/static-pie
# $ ./x.py test --target x86_64-unknown-linux-[musl,gnu] src/test/run-make/static-pie
all:
$(RUSTC) --target $(TARGET) -C target-feature=+crt-static test-aslr.rs