-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Linking with ld/gold/rust-lld: unknown -z value: ,relro,-z,now #52634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the report! I believe the bug is here where we actually need to use multiple invocations of |
I suspected the same. Will PR shortly. |
bors
added a commit
that referenced
this issue
Jul 25, 2018
Format linker args in a way that works for gcc and ld Pass multiple linker arguments rather than concatenate with commas (fixes #52634). `-l library` -> `-llibrary` to work with apple's ld. To build with apple's ld I'm currently also passing `-C link-args="-arch x86_64 -macosx_version_min 10.13.0"`. I'll try and understand the latter flag better before PRing that. This PR currently works for me. Hopefully CI will pick up any grievous ramifications in other toolchains? Thanks to @alexcrichton for the pointer to the relevant code!
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
Jul 26, 2018
Format linker args in a way that works for gcc and ld Pass multiple linker arguments rather than concatenate with commas (fixes rust-lang#52634). `-l library` -> `-llibrary` to work with apple's ld. To build with apple's ld I'm currently also passing `-C link-args="-arch x86_64 -macosx_version_min 10.13.0"`. I'll try and understand the latter flag better before PRing that. This PR currently works for me. Hopefully CI will pick up any grievous ramifications in other toolchains? Thanks to @alexcrichton for the pointer to the relevant code!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiling with an gcc/ld-like
-C linker
other than gcc/clang results in the-z,relro,-z,now
argument not being recognised.It seems gcc and clang accept the argument
-Wl,-z,relro,-z,now
where other ld-like linkers expect-z relro -z now
.working:
not working:
The text was updated successfully, but these errors were encountered: