Enable pic for i686

Although i686 itself does not support pic, but gcc returns the value of current eip by calling and then getting the return value. I don't know if llvm has similar support, but considering that gcc supports indirect implementation of pic, can rust consider setting Is the static_position_independent_executables of i686 true?

Note: Because you want to compile musl executable with pie for static link

This is not an answer to your question, but I believe LLVM has supported a PIC workaround for i686 (and i386, etc.) for some time now (at least since 2015, I think).

But rust disable static_position_independent_executables for i686 default.I means that can rust enable in feature version?

Should enable static_position_independent_executables for i686 · Issue #106815 · rust-lang/rust (github.com)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.