On Wed, 16 Jan 2019, Jakub Jelinek wrote:

> Perhaps easier would be to add optional if clause to the !GCC$ builtin
> with constant expression argument which if present and evaluates to .false.
> would tell us to ignore the attribute.  Or, add !GCC$ if/else/end if which
> would act like preprocessing conditionals or something similar.
> Not really sure one can query in Fortran what the multilib is some way (say
> look at size of a pointer etc.).

If something like that is done, I'd suggest doing it in a form which 
allows each multilib's information about glibc functions to go in a 
separate generated header (so having !GCC$ include or similar to include a 
per-multilib file, under appropriate conditionals).  Otherwise you need to 
bring back logic in glibc to make a compiler building glibc for one 
multilib use appropriate -D and -U options to get its C headers to define 
things appropriately for another multilib, so that the all-multilib 
Fortran header can be generated in a single glibc build.  (Like the old 
logic for generating bits/syscall.h that was removed in commits 
2dba5ce7b8115d6a2789bf279892263621088e74 and 
ee17d4e99af9e49378217209d3708053ef148032.)

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to