>>> So my worry here is this is really a host property -- ie, this is
>>> behavior of where GCC runs, not the target for which GCC is generating code.
>>>
>>> That implies that the change in aix.h is wrong.  aix.h is for the
>>> target, not the host -- you don't want to define something like
>>> HOST_STAT_FOR_64BIT_INODES there.
>>>
>>> You'd want to be triggering this behavior via a host fragment, x-aix, or
>>> better yet via an autoconf test.
>> Indeed, would this version be better ? I'm not sure about the configure test.
>> But as we are retrieving the size of dev_t and ino_t just above, I'm assuming
>> that the one being used in stat directly. At least, that's the case on AIX, 
>> and
>> this test is only made for AIX.
> It's a clear improvement.  It's still checking for the aix target though:
>
> +# Select the right stat being able to handle 64bit inodes, if needed.
> +if test "$enable_largefile" != no; then
> +  case "$target" in
> +    *-*-aix*)
> +      if test "$ac_cv_sizeof_ino_t" == "4" -a "$ac_cv_sizeof_dev_t" ==
> 4; then
> +
> +$as_echo "#define HOST_STAT_FOR_64BIT_INODES stat64x" >>confdefs.h
> +
> +      fi;;
> +  esac
> +fi
>
> Again, we're dealing with a host property.  You might be able to just
> change $target above to $host.  Hmm, that makes me wonder about canadian
> crosses where host != build.    We may need to do this for both the aix
> host and aix build.

Yes, my bad, I've updated the case. I don't know if there is a usual way
to check both $build and $host. I've tried to avoid code duplication so
tell me if it's okay or if you'd rather have a case for $build and one
for $host.

Thanks,
Clément

Attachment: 0001-aix-handle-64bit-inodes-for-include-directories.patch
Description: 0001-aix-handle-64bit-inodes-for-include-directories.patch

Reply via email to