Make -no-pie option work for native Windows
commit2bdf17de1d0ad7a75d3474e672a3a2110919862f
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 12 Aug 2021 07:30:31 +0000 (12 09:30 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 12 Aug 2021 07:33:31 +0000 (12 09:33 +0200)
treeb83d823081328b71715a0191454e0c5d5ed7552a
parent95e1eca43d106d821720744ac6ff1f5df41a1e78
Make -no-pie option work for native Windows

Binutils 2.36/2.37 generate PIE executables by default on native Windows
(because --dynamicbase is the default) so it makes sense to have a simple
way to counter that and -no-pie seems appropriate, all the more so that
it is automatically passed when building the compiler itself.

gcc/
* configure.ac (PE linker --disable-dynamicbase support): New check.
* configure: Regenerate.
* config.in: Likewise.
* config/i386/mingw32.h (LINK_SPEC_DISABLE_DYNAMICBASE): New define.
(LINK_SPEC): Use it.
* config/i386/mingw-w64.h (LINK_SPEC_DISABLE_DYNAMICBASE): Likewise.
(LINK_SPEC): Likewise.
gcc/config.in
gcc/config/i386/mingw-w64.h
gcc/config/i386/mingw32.h
gcc/configure
gcc/configure.ac