public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] flag-o-matic.eclass: add append-time64-flags
@ 2022-10-30 15:48 Sam James
  2022-10-31 10:37 ` Mickaël Bucas
  0 siblings, 1 reply; 4+ messages in thread
From: Sam James @ 2022-10-30 15:48 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Sam James

Signed-off-by: Sam James <sam@gentoo.org>
---
 eclass/flag-o-matic.eclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 365741a6dddf..d9149ebee4a5 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -301,6 +301,19 @@ append-lfs-flags() {
 	append-cppflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
 }
 
+# @FUNCTION: append-time64-flags
+# @DESCRIPTION:
+# Add flags that enable 64-bit time_t. Implies Large File Support
+# (calls append-lfs-flags) automatically.
+append-time64-flags() {
+        [[ $# -ne 0 ]] && die "append-lfs-flags takes no arguments"
+
+	# time64 needs LFS
+	append-lfs-flags
+
+	append-cppflags -D_TIME_BITS=64
+}
+
 # @FUNCTION: append-ldflags
 # @USAGE: <flags>
 # @DESCRIPTION:
-- 
2.38.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] [PATCH] flag-o-matic.eclass: add append-time64-flags
  2022-10-30 15:48 [gentoo-dev] [PATCH] flag-o-matic.eclass: add append-time64-flags Sam James
@ 2022-10-31 10:37 ` Mickaël Bucas
  2022-11-09  6:25   ` Sam James
  0 siblings, 1 reply; 4+ messages in thread
From: Mickaël Bucas @ 2022-10-31 10:37 UTC (permalink / raw
  To: gentoo-dev; +Cc: toolchain, Sam James

Le dim. 30 oct. 2022 à 16:48, Sam James <sam@gentoo.org> a écrit :
>
> Signed-off-by: Sam James <sam@gentoo.org>
> ---
>  eclass/flag-o-matic.eclass | 13 +++++++++++++
>  1 file changed, 13 insertions(+)

> +# @FUNCTION: append-time64-flags
> +# @DESCRIPTION:
> +# Add flags that enable 64-bit time_t. Implies Large File Support
> +# (calls append-lfs-flags) automatically.

Hello Sam

As a simple user, can you explain to me or point me to a resource
about the link between Large File Support and time64 configuration ?

Thanks
Best regards

Mickaël Bucas


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] [PATCH] flag-o-matic.eclass: add append-time64-flags
  2022-10-31 10:37 ` Mickaël Bucas
@ 2022-11-09  6:25   ` Sam James
  2022-11-14  4:37     ` [gentoo-dev] " Duncan
  0 siblings, 1 reply; 4+ messages in thread
From: Sam James @ 2022-11-09  6:25 UTC (permalink / raw
  To: gentoo-dev; +Cc: Gentoo Toolchain, Mickaël Bucas

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]



> On 31 Oct 2022, at 10:37, Mickaël Bucas <mbucas@gmail.com> wrote:
> 
> Le dim. 30 oct. 2022 à 16:48, Sam James <sam@gentoo.org> a écrit :
>> 
>> Signed-off-by: Sam James <sam@gentoo.org>
>> ---
>> eclass/flag-o-matic.eclass | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
> 
>> +# @FUNCTION: append-time64-flags
>> +# @DESCRIPTION:
>> +# Add flags that enable 64-bit time_t. Implies Large File Support
>> +# (calls append-lfs-flags) automatically.

> Hello Sam
> 

Hi Mickaël,

> As a simple user, can you explain to me or point me to a resource
> about the link between Large File Support and time64 configuration ?
> 

This is a good question -- the answer is two-fold:
1. glibc requires LFS to enable time64
2. Both can involve an ABI break if an off_t or time_t for example
are in an exposed structure, so it's best to do them at the same time.

But I've had second thoughts about this and I want to rethink
if we want to take this approach in the patch I sent.

I think we may want to do a hard-switch for defaults
instead in new profiles. I need to reflect on it a bit more.

Plans and notes are at https://wiki.gentoo.org/wiki/Project:Toolchain/time64_migration
if interested!

> Thanks
> Best regards
> 

Best,
sam


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 358 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-dev] Re: [PATCH] flag-o-matic.eclass: add append-time64-flags
  2022-11-09  6:25   ` Sam James
@ 2022-11-14  4:37     ` Duncan
  0 siblings, 0 replies; 4+ messages in thread
From: Duncan @ 2022-11-14  4:37 UTC (permalink / raw
  To: gentoo-dev

Sam James posted on Wed, 9 Nov 2022 06:25:38 +0000 as excerpted:

>> On 31 Oct 2022, at 10:37, Mickaël Bucas <mbucas@gmail.com> wrote:
>> 
>> Le dim. 30 oct. 2022 à 16:48, Sam James <sam@gentoo.org> a écrit :
>>> 
>>> Signed-off-by: Sam James <sam@gentoo.org>
>>> ---
>>> eclass/flag-o-matic.eclass | 13 +++++++++++++
>>> 1 file changed, 13 insertions(+)
>> 
>>> +# @FUNCTION: append-time64-flags
>>> +# @DESCRIPTION:
>>> +# Add flags that enable 64-bit time_t. Implies Large File Support
>>> +# (calls append-lfs-flags) automatically.
> 
>> As a simple user

And as another user...

> Plans and notes are at
> https://wiki.gentoo.org/wiki/Project:Toolchain/time64_migration if
> interested!

... just in case anyone (else) needed to be sure, quoting from the above 
link:

>>>> For 32-bit arches <snip>

>>>> Obviously 64-bit arches are already fine. 

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-14  4:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-30 15:48 [gentoo-dev] [PATCH] flag-o-matic.eclass: add append-time64-flags Sam James
2022-10-31 10:37 ` Mickaël Bucas
2022-11-09  6:25   ` Sam James
2022-11-14  4:37     ` [gentoo-dev] " Duncan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox