On Tue, 21 Jun 2022, David Malcolm via Gcc wrote:

> Joseph: is the target hook the way to go with this?  Would it look
> something like:
> 
> DEFHOOK (fd_access_mode, "FIXME", int (int))
> 
> taking the build configuration's O_ access mode, and returning the
> target configurations's access mode (so e.g fd_access_mode (O_RDONLY)
> would return the target's int) ?

I think it would probably take the GCC-specific READ_WRITE, READ_ONLY, 
WRITE_ONLY you suggested, rather than the host's O_*.  (Consider that it 
might make sense in future to have checks for other O_* flags, some of 
which might not be supported on the host.)

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

Reply via email to