On Thu, 2022-06-23 at 19:20 -0400, David Malcolm wrote:
> On Fri, 2022-06-24 at 00:00 +0530, Mir Immad wrote:

[...snip...]

> > +
> > +enum access_mode
> > +fd_state_machine::get_access_mode_from_flag (int flag) const
> > +{
> > +  /* FIXME: this code assumes the access modes on the host and
> > +          target are the same, which in practice might not be the
> > case. */
> 
> Thanks for moving this into a subroutine.
> 
> Joseph says we should introduce a target hook for this:
>   https://gcc.gnu.org/pipermail/gcc/2022-June/238961.html
> 
> You can see an example of adding a target hook in commit
> 8cdcea51c0fd753e6a652c9b236e91b3a6e0911c.
> 
> As noted above, I think we can leave adding the target hook until a
> followup patch, if this is only going to be an issue with cross-
> compilation between Hurd and non-Hurd systems.

FWIW, for reference, I've filed 
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106302
about this; it strikes me that there are other flags we might
eventually want to test e.g. for mmap we'd want to look at
MAP_ANONYMOUS and the various PROT_* values.

Dave

Reply via email to