Final check on PCI options; for Darwin these are not dependent on the PIE
ones, although PIE does require PIC to support it. Specifically, for Darwin,
"fPIC fno-PIE" should result in the same as "-fno-PIE -fPIC".
2019-07-07 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_override_options): Make a final check on PIC
options.
From-SVN: r273181
+2019-07-07 Iain Sandoe <iain@sandoe.co.uk>
+
+ * config/darwin.c (darwin_override_options): Make a final check on PIC
+ options.
+
2019-07-07 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_override_options): Don't jam symbol stubs
&& write_symbols == DWARF2_DEBUG)
flag_var_tracking_uninit = flag_var_tracking;
+ /* Final check on PCI options; for Darwin these are not dependent on the PIE
+ ones, although PIE does require PIC to support it. */
if (MACHO_DYNAMIC_NO_PIC_P)
{
if (flag_pic)
" %<-fpie%> or %<-fPIE%>");
flag_pic = 0;
}
- else if (flag_pic == 1)
+ else if (flag_pic == 1
+ || (flag_pic == 0 && !(flag_mkernel || flag_apple_kext)))
{
- /* Darwin's -fpic is -fPIC. */
+ /* Darwin's -fpic is -fPIC.
+ We only support "static" code in the kernel and kernel exts. */
flag_pic = 2;
}