Re: switching ARC to 64-bit time_t (Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64)
- To: Lukasz Majewski <lukma@denx.de>
- Cc: Andreas Schwab <schwab@suse.de>, Arnd Bergmann <arnd@arndb.de>, Florian Weimer <fweimer@redhat.com>, Helmut Grohne <helmutg@debian.org>, GNU C Library <libc-alpha@sourceware.org>, Vineet Gupta <Vineet.Gupta1@synopsys.com>, Palmer Dabbelt <palmerdabbelt@google.com>, Zong Li <zongbox@gmail.com>, <debian-arm@lists.debian.org>, Alistair Francis <alistair.francis@wdc.com>, Adhemerval Zanella <adhemerval.zanella@linaro.org>, "Maciej W. Rozycki" <macro@wdc.com>, Alistair Francis <alistair23@gmail.com>, arcml <linux-snps-arc@lists.infradead.org>
- Subject: Re: switching ARC to 64-bit time_t (Re: [RFC v6 07/23] RISC-V: Use 64-bit time_t and off_t for RV32 and RV64)
- From: Joseph Myers <joseph@codesourcery.com>
- Date: Tue, 25 Feb 2020 14:36:48 +0000
- Message-id: <[🔎] alpine.DEB.2.21.2002251427240.25788@digraph.polyomino.org.uk>
- In-reply-to: <[🔎] 20200225123945.10ec1c25@jawa>
- References: <cover.1578824547.git.alistair.francis@wdc.com> <4e95f95966d8d7c6a8339160dc62d81c1f6a1bfb.1578824547.git.alistair.francis@wdc.com> <00574bfb-981a-3a1c-cbdf-b2fee4eddc32@gmail.com> <CAKmqyKMyf2psPp+-EHoidvbPbSXv0=dP26GjVQnT5BUriLc1gA@mail.gmail.com> <alpine.DEB.2.21.2002120123230.3988@digraph.polyomino.org.uk> <CAKmqyKOgFRfMOws_-48GqMnuS3ygmN9A4DzLg6UtEjRXVoM82A@mail.gmail.com> <8a9784b3-fc52-adc3-4595-33142b059388@synopsys.com> <20200220001136.2f14236e@jawa> <[🔎] CAK8P3a1b73K+RjfHONWLy_dFUucXxwd+0jTnHmkf6YqwRjit4w@mail.gmail.com> <[🔎] 20200220103716.2f526933@jawa> <[🔎] CAK8P3a2n6fRm4C5Ywyk5ys92jSOAc5SwvBVZyFOY9=4rB2pyjw@mail.gmail.com> <[🔎] 20200224100051.2511d797@jawa> <[🔎] mvmpne4xqpb.fsf@suse.de> <[🔎] 20200224111424.33759b2e@jawa> <[🔎] mvmh7zgxozs.fsf@suse.de> <[🔎] 20200224113658.275ea702@jawa> <[🔎] alpine.DEB.2.21.2002242353570.23654@digraph.polyomino.org.uk> <[🔎] 20200225123945.10ec1c25@jawa>
On Tue, 25 Feb 2020, Lukasz Majewski wrote:
> Lets consider for example __mq_timedsend_time64.
>
> With lib<name>_hidden_def/proto kept (NOT removed as in [1]):
> GDB:
> __GI___mq_timedsend_time64 [*]
>
> (No build errors, linking with test setup works as expected).
What is the actual testcase, and the exact command line used to compile
it?
_TIME_BITS=64 redirection is only relevant for programs built with glibc,
using the installed headers - not for building glibc itself.
lib<name>_hidden_proto is only relevant for building glibc, with its
internal headers - not for programs built with glibc.
If you're talking about a glibc testcase, such tests should be in tests
not tests-internal, so _ISOMAC is defined when they are built, so the
glibc internal headers just wrap the public ones without defining anything
else. In particular, the asm redirections from public headers should be
in effect when tests are compiled, but not the lib<name>_hidden_proto
redirections (but even for internal tests, lib<name>_hidden_proto
shouldn't do anything because the build process knows they are tests not
part of libc).
You should look at the preprocessed source from building the test with
-save-temps and find out why the asm redirection from the public header
isn't being effective (or if it is effective in the .o file for the test,
look at what happens afterwards in glibc). Since lib<name>_hidden_proto
should not be called in the parts of headers included when building a
test, its presence or absence should have no effect on the preprocessed
source of the test.
> hidden_def (__mq_timedsend)
> weak_alias (__mq_timedsend, mq_timedsend) [**]
> hidden_weak (mq_timedsend)
If you have lib<name>_hidden_weak note you also need a corresponding
lib<name>_hidden_proto, for the name of the weak alias. But you probably
don't need to have lib<name>_hidden* for the weak alias at all, just make
sure internal calls use the internal name.
--
Joseph S. Myers
joseph@codesourcery.com
Reply to: