Skip to content

Latest changes in nightly cause it to produce executable named "-pie" in the crate directory. #48884

Closed
@berkus

Description

@berkus

Updated to rustc 1.26.0-nightly (2789b067d 2018-03-06) via rustup.

I have a custom target file and additional cargo configs which specify additional rustc arguments.

Now if I run

export RUST_TARGET_PATH=$(pwd)/targets/
xargo run --target aarch64-vesper-metta

The build will succeed but then fail to run qemu because

     Running `qemu-system-aarch64 -M raspi3 -d in_asm -serial stdio -kernel target/aarch64-vesper-metta/debug/vesper`
qemu-system-aarch64: could not load kernel 'target/aarch64-vesper-metta/debug/vesper'

Instead, there's a file named -pie in the directory where xargo was run from.

To fix this I had to change the target json file with these options:

-  "linker-is-gnu": true,
+  "linker-is-gnu": false,

I'm afraid this could subtly break my builds elsewhere, as the linker is, in fact, GNU ld.

I believe this is related to the latest -pie/-no-pie patches which somehow interfere with custom cargo linker arguments specifications (where -pie ends up landing instead of output file name).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions