[PATCH][RFC] Extend locations where to seach for Fortran pre-include.
Martin Liška
mliska@suse.cz
Mon Jan 14 14:09:00 GMT 2019
On 1/11/19 7:06 PM, Joseph Myers wrote:
> On Fri, 11 Jan 2019, Martin Liška wrote:
>
>> +/* Same as add_prefix, but prepending target_sysroot_hdrs_suffix to prefix. */
>
> Actually, it should be prepending target_system_root, but followed by
> target_sysroot_hdrs_suffix rather than target_sysroot_suffix. That is,
> this function should be following add_sysrooted_prefix more closely.
>
>> + if (target_sysroot_hdrs_suffix)
>
> So this should be "if (target_system_root)" - it needs to be sysrooted
> even if there is no sysroot headers suffix.
>
>> + {
>> + char *sysroot_no_trailing_dir_separator
>> + = xstrdup (target_sysroot_hdrs_suffix);
>> + size_t sysroot_len = strlen (target_sysroot_hdrs_suffix);
>
> And again this would use target_system_root.
>
>> + if (sysroot_len > 0
>> + && target_sysroot_hdrs_suffix[sysroot_len - 1] == DIR_SEPARATOR)
>> + sysroot_no_trailing_dir_separator[sysroot_len - 1] = '\0';
>
> Likewise.
>
>> + if (target_sysroot_suffix)
>> + prefix = concat (sysroot_no_trailing_dir_separator,
>> + target_sysroot_suffix, prefix, NULL);
>
> While this would use target_sysroot_hdrs_suffix.
>
Thanks for review, fixed that in updated version of the patch.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
Ready to be installed?
Thanks,
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Extend-locations-where-to-seach-for-Fortran-pre-incl.patch
Type: text/x-patch
Size: 6008 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190114/3ae2df1f/attachment.bin>
More information about the Fortran
mailing list