[llvm-bugs] [Bug 48109] Clang does not pass `-pie` to the linker when using `-fPIE`
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Nov 13 23:31:30 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48109
Fangrui Song <i at maskray.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
CC| |i at maskray.me
--- Comment #1 from Fangrui Song <i at maskray.me> ---
This is invalid. -fPIE is a compilation option while -pie is a driver option
affecting linking. -fPIE does not imply -pie in GCC.
What you want is something similar to GCC's configure-time --enable-default-pie
(introduced in GCC 6:
https://gcc.gnu.org/git/?p=gcc.git&a=commit;h=428b381275bc95032274440f02d7719225de2c17)
Some folks had the same question
http://lists.llvm.org/pipermail/cfe-dev/2020-June/065684.html but no decision
is made whether we should do it (personally I do not favor the idea much as it
just made the default behavior different on different distributions where the
distros can just provide default CFLAGS/LDFLAGS).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201114/ab1c787f/attachment.html>
More information about the llvm-bugs
mailing list