This is the mail archive of the gcc-patches@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: [PATCH] Add support for Fuchsia (OS)


On 12/9/16 12:26 AM, Andrew Pinski wrote:
On Thu, Dec 8, 2016 at 2:55 PM, Josh Conner <joshconner@google.com> wrote:
This patch adds support to gcc for the Fuchsia OS
(https://fuchsia.googlesource.com/).

OK for mainline?
A few comments:
+/* Build with PIC by default.  */
+#undef  CC1_SPEC
+#define CC1_SPEC "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}"
Is it PIC by default or really PIE by default?
Also how does this interact with the -fpie/-fPIE options?

The intent was to make it PIE by default - I was mistakenly under the impression that this meant
building with -fpic/PIC, a la the android builds. Does this seem more reasonable:

#define CC1_SPEC "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC:" \
                   "%{!fno-pie:%{!fno-PIE:%{!fpie:%{!fPIE: -fPIC}}}}}}}}"

?

Thanks -

Josh


Thanks,
Andrew


Thanks -

Josh


2016-12-08  Joshua Conner  <joshconner@google.com>


     * config/arm/fuchsia-elf.h: New file.

     * config/fuchsia.h: New file.

     * config.gcc (*-*-fuchsia*): Set native_system_header_dir.

     (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
targets.

     * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.




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