This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can the GCC toolchain be built AS a PIE?




On 06/11/2015 03:17 PM, Cyd Haselton wrote:
Advance apologies if this question has been asked previously, Google searches only turned up results for using -fPIE/-fPIC.

Is it possible to build GCC as a PIE? If so, would it be a matter of including the -FPIC/-FPIE params for CFLAGS and/or LDFLAGS and running configure && make, or are there issues I should be aware of (for example, should I set parameters for cross-building)?

You should just try it out (with the CFLAGS and LDFLAGS changes). I expect it would work, gcc isn't particularly exotic.

Background: Android 5.0 requires PIE, which means that upgrading will break my existing native build environment...unless I can build a PIE GCC first, then re-build all of my utilities with it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]