[PATCH] Add support for Fuchsia (OS)

Josh Conner joshconner@google.com
Fri Dec 9 19:43:00 GMT 2016


Sorry, that should have been:

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

(default to PIE, not PIC)

On Fri, Dec 9, 2016 at 11:33 AM, Josh Conner <joshconner@google.com> wrote:
> 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.
>>>
>>>
>



More information about the Gcc-patches mailing list