From: Jeff Law <jeffreyalaw@gmail.com>
To: "CHIGOT, CLEMENT" <clement.chigot@atos.net>,
David Malcolm <dmalcolm@redhat.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] aix: handle 64bit inodes for include directories
Date: Thu, 19 Aug 2021 12:23:40 -0600 [thread overview]
Message-ID: <fb5847e1-6666-4d9c-c8d8-564c5d3cfc69@gmail.com> (raw)
In-Reply-To: <PA4PR02MB66863E302016DC45E2ADA82BEA039@PA4PR02MB6686.eurprd02.prod.outlook.com>
On 6/28/2021 1:16 AM, CHIGOT, CLEMENT wrote:
>> On 6/23/2021 12:53 AM, CHIGOT, CLEMENT via Gcc-patches wrote:
>>> Hi David,
>>>
>>> Did you have a chance to take look at this patch ?
>>>
>>> Thanks,
>>> Clément
>>>
>>>
>>>> +DavidMalcolm
>>>>
>>>> Can you review this patch when you have a moment?
>>>>
>>>> Thanks, David
>>>>
>>>> On Mon, May 17, 2021 at 3:05 PM David Edelsohn <dje.gcc@gmail.com> wrote:
>>>>> The aix.h change is okay with me, but you need to get approval for the
>>>>> incpath.c and cpplib.h parts of the patch from the appropriate
>>>>> maintainers.
>>>>>
>>>>> Thanks, David
>>>>>
>>>>> On Mon, May 17, 2021 at 7:44 AM CHIGOT, CLEMENT <clement.chigot@atos.net> wrote:
>>>>>> On AIX, stat will store inodes in 32bit even when using LARGE_FILES.
>>>>>> If the inode is larger, it will return -1 in st_ino.
>>>>>> Thus, in incpath.c when comparing include directories, if several
>>>>>> of them have 64bit inodes, they will be considered as duplicated.
>>>>>>
>>>>>> gcc/ChangeLog:
>>>>>> 2021-05-06 Clément Chigot <clement.chigot@atos.net>
>>>>>>
>>>>>> * configure.ac: Check sizeof ino_t and dev_t.
>>>>>> * config.in: Regenerate.
>>>>>> * configure: Regenerate.
>>>>>> * config/rs6000/aix.h (HOST_STAT_FOR_64BIT_INODES): New define.
>>>>>> * incpath.c (HOST_STAT_FOR_64BIT_INODES): New define.
>>>>>> (remove_duplicates): Use it.
>>>>>>
>>>>>> libcpp/ChangeLog:
>>>>>> 2021-05-06 Clément Chigot <clement.chigot@atos.net>
>>>>>>
>>>>>> * configure.ac: Check sizeof ino_t and dev_t.
>>>>>> * config.in: Regenerate.
>>>>>> * configure: Regenerate.
>>>>>> * include/cpplib.h (INO_T_CPP): Change for AIX.
>>>>>> (DEV_T_CPP): New macro.
>>>>>> (struct cpp_dir): Use it.
>> 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.
Sorry about the delay,
jeff
next prev parent reply other threads:[~2021-08-19 18:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 11:44 CHIGOT, CLEMENT
2021-05-17 19:05 ` David Edelsohn
2021-05-22 23:42 ` David Edelsohn
2021-06-23 6:53 ` CHIGOT, CLEMENT
2021-06-24 19:17 ` Jeff Law
2021-06-28 7:16 ` CHIGOT, CLEMENT
2021-08-11 11:48 ` CHIGOT, CLEMENT
2021-08-19 18:23 ` Jeff Law [this message]
2021-08-24 7:57 ` CHIGOT, CLEMENT
2021-10-12 8:35 ` CHIGOT, CLEMENT
2021-10-26 14:51 ` CHIGOT, CLEMENT
2021-11-16 8:45 ` CHIGOT, CLEMENT
2021-12-30 16:43 ` David Edelsohn
2021-12-30 18:27 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb5847e1-6666-4d9c-c8d8-564c5d3cfc69@gmail.com \
--to=jeffreyalaw@gmail.com \
--cc=clement.chigot@atos.net \
--cc=dje.gcc@gmail.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).