Linking MSP430 Code fails with unrecognized option '-znoexecstack'
#85948
Labels
C-bug
Category: This is a bug.
P-medium
Medium priority
regression-untriaged
Untriaged performance or correctness regression.
cargo-bisect-rustc
Outputsearched nightlies: from nightly-2021-04-19 to nightly-2021-06-01
regressed nightly: nightly-2021-05-23
searched commits: from 5dc8789 to e4ca166
regressed commit: 21e1cd9
bisected with cargo-bisect-rustc v0.6.0
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
Instructions
cargo-bisect-rustc
, and optionallyjust
are installed.git clone https://github.com/cr1901/msp430-size
. Use commit51af8f8
specifically.cargo-bisect-rustc --script=./test-noexec.sh --preserve-target --preserve --start=2021-04-19 --end=2021-06-01 --with-src -v
. The bisector will usetest-noexec.sh
to look for whether compiling msp430 code succeeds or fails.Error
On recent nightlies, msp430 linking using Rust will fail with something like this:
When #85531 was merged, the default value for
linker_is_gnu
option changed fromfalse
totrue
. msp430 appears to have not been changed by #85531, solinker_is_gnu
is now set for msp430. Iflinker_is_gnu
is set, Rust unconditionally adds-znoexecstack
to the linker options, which msp430 doesn't support. But technically, the msp430 backend does use the GNU linker.This is a bit of a bikeshed, but: I could set
linker_is_gnu
back tofalse
with a comment, or perhaps special case the logic to add the-znoexecstack
option? Doeslinker_is_gnu
mean only "uses the GNU linker", or does it mean "uses the GNU linker plus specific options"? Thus, I'm opening an issue for possible feedback before fixing.Other Context
Inline contents of
test_noexec.sh
The text was updated successfully, but these errors were encountered: