* Glibc on target 32 bits with 64-bit time support
@ 2023-05-15 18:25 Alain GUILLEMOT
2023-05-15 20:11 ` Florian Weimer
0 siblings, 1 reply; 7+ messages in thread
From: Alain GUILLEMOT @ 2023-05-15 18:25 UTC (permalink / raw)
To: libc-help
[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]
Hello
I would like to test the transition to 2038 on a 32-bit machine.
For that I would like to compile the glibc in 32 bits with the 64-bit "time_t" options.
But I don't know how to proceed.
In which file I have to add the option "-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64", or are these options to be passed on the command line?
Currently I change the "configure" adding to CFLAGS/CXXFLAGS flags, and also exporting CPPFLAGS with same options. But I always have compilation errors.
/tmp/ccb7zYZG.s: Assembler messages:
/tmp/ccb7zYZG.s:641: Error: symbol `__sigtimedwait64' is already defined
make[2]: *** [/tmp/obj/sysd-rules:111: /tmp/obj/signal/sigtimedwait.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../sysdeps/generic/hp-timing.h:22,
from ../nptl/descr.h:26,
from ../sysdeps/arm/nptl/tls.h:39,
from ../sysdeps/unix/sysv/linux/arm/tls.h:23,
from ../sysdeps/unix/sysv/linux/arm/sysdep.h:28,
from ../sysdeps/unix/sysv/linux/internal-signals.h:28,
from ../sysdeps/posix/signal.c:22:
../include/time.h:21:1: warning: asm declaration ignored due to conflict with previous rename [-Wpragmas]
21 | libc_hidden_proto (mktime)
| ^~~~~~~~~~~~~~~~~
../include/time.h:22:1: warning: asm declaration ignored due to conflict with previous rename [-Wpragmas]
22 | libc_hidden_proto (timelocal)
Thank's.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Glibc on target 32 bits with 64-bit time support
2023-05-15 18:25 Glibc on target 32 bits with 64-bit time support Alain GUILLEMOT
@ 2023-05-15 20:11 ` Florian Weimer
2023-05-16 17:20 ` Alain GUILLEMOT
2023-05-18 10:31 ` Alain GUILLEMOT
0 siblings, 2 replies; 7+ messages in thread
From: Florian Weimer @ 2023-05-15 20:11 UTC (permalink / raw)
To: Alain GUILLEMOT; +Cc: libc-help
* Alain GUILLEMOT:
> In which file I have to add the option "-D_FILE_OFFSET_BITS=64
> -D_TIME_BITS=64", or are these options to be passed on the command
> line?
All ABI variants are automatically built. You don't have to do anything
while building glibc. These flags are for building applications with
glibc.
Thanks,
Florian
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Glibc on target 32 bits with 64-bit time support
2023-05-15 20:11 ` Florian Weimer
@ 2023-05-16 17:20 ` Alain GUILLEMOT
2023-05-16 17:53 ` Florian Weimer
2023-05-18 10:31 ` Alain GUILLEMOT
1 sibling, 1 reply; 7+ messages in thread
From: Alain GUILLEMOT @ 2023-05-16 17:20 UTC (permalink / raw)
To: Florian Weimer; +Cc: libc-help
[-- Attachment #1: Type: text/plain, Size: 1001 bytes --]
Hi Florian
In « glibc-2.34/configure » file, for " CFLAGS="-g -O2 -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64"" and CXXFLAGS, and with CPPFLAGS environment variable.
A+
De : Florian Weimer <fweimer@redhat.com>
Envoyé : lundi 15 mai 2023 22:12
À : Alain GUILLEMOT <alain.guillemot@asn.com>
Cc : libc-help@sourceware.org
Objet : Re: Glibc on target 32 bits with 64-bit time support
* Alain GUILLEMOT: > In which file I have to add the option "-D_FILE_OFFSET_BITS=64 > -D_TIME_BITS=64", or are these options to be passed on the command > line? All ABI variants are automatically built. You don't have to do anything
* Alain GUILLEMOT:
> In which file I have to add the option "-D_FILE_OFFSET_BITS=64
> -D_TIME_BITS=64", or are these options to be passed on the command
> line?
All ABI variants are automatically built. You don't have to do anything
while building glibc. These flags are for building applications with
glibc.
Thanks,
Florian
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Glibc on target 32 bits with 64-bit time support
2023-05-15 20:11 ` Florian Weimer
2023-05-16 17:20 ` Alain GUILLEMOT
@ 2023-05-18 10:31 ` Alain GUILLEMOT
2023-05-18 10:46 ` Lukasz Majewski
1 sibling, 1 reply; 7+ messages in thread
From: Alain GUILLEMOT @ 2023-05-18 10:31 UTC (permalink / raw)
To: Florian Weimer; +Cc: libc-help
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
Hi Florian
OK, that means that since glibc 2.34, glibc automatically recognizes whether the time_t structure is 32 or 64 bits.
And therefore only the applications must be recompiled with the flags "-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" ).
This is correct ?
De : Florian Weimer <fweimer@redhat.com>
Envoyé : lundi 15 mai 2023 22:12
À : Alain GUILLEMOT <alain.guillemot@asn.com>
Cc : libc-help@sourceware.org
Objet : Re: Glibc on target 32 bits with 64-bit time support
* Alain GUILLEMOT: > In which file I have to add the option "-D_FILE_OFFSET_BITS=64 > -D_TIME_BITS=64", or are these options to be passed on the command > line? All ABI variants are automatically built. You don't have to do anything
* Alain GUILLEMOT:
> In which file I have to add the option "-D_FILE_OFFSET_BITS=64
> -D_TIME_BITS=64", or are these options to be passed on the command
> line?
All ABI variants are automatically built. You don't have to do anything
while building glibc. These flags are for building applications with
glibc.
Thanks,
Florian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Glibc on target 32 bits with 64-bit time support
2023-05-18 10:31 ` Alain GUILLEMOT
@ 2023-05-18 10:46 ` Lukasz Majewski
2023-05-18 19:49 ` Alain GUILLEMOT
0 siblings, 1 reply; 7+ messages in thread
From: Lukasz Majewski @ 2023-05-18 10:46 UTC (permalink / raw)
To: Alain GUILLEMOT; +Cc: Florian Weimer, libc-help
[-- Attachment #1: Type: text/plain, Size: 1657 bytes --]
Hi Alain,
> Hi Florian
>
> OK, that means that since glibc 2.34, glibc automatically recognizes
> whether the time_t structure is 32 or 64 bits.
>
> And therefore only the applications must be recompiled with the
> flags "-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" ).
>
>
> This is correct ?
In principle yes.
Please find some extra information regarding glibc integration with 64
bit time support.
https://github.com/lmajewski/meta-y2038#readme
>
>
> De : Florian Weimer <fweimer@redhat.com>
> Envoyé : lundi 15 mai 2023 22:12
> À : Alain GUILLEMOT <alain.guillemot@asn.com>
> Cc : libc-help@sourceware.org
> Objet : Re: Glibc on target 32 bits with 64-bit time support
>
> * Alain GUILLEMOT: > In which file I have to add the option
> "-D_FILE_OFFSET_BITS=64 > -D_TIME_BITS=64", or are these options to
> be passed on the command > line? All ABI variants are automatically
> built. You don't have to do anything
>
>
> * Alain GUILLEMOT:
>
>
>
> > In which file I have to add the option "-D_FILE_OFFSET_BITS=64
>
> > -D_TIME_BITS=64", or are these options to be passed on the command
>
> > line?
>
>
>
> All ABI variants are automatically built. You don't have to do
> anything
>
> while building glibc. These flags are for building applications with
>
> glibc.
>
>
>
> Thanks,
>
> Florian
>
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Glibc on target 32 bits with 64-bit time support
2023-05-18 10:46 ` Lukasz Majewski
@ 2023-05-18 19:49 ` Alain GUILLEMOT
0 siblings, 0 replies; 7+ messages in thread
From: Alain GUILLEMOT @ 2023-05-18 19:49 UTC (permalink / raw)
To: Lukasz Majewski; +Cc: Florian Weimer, libc-help
Thank's for the answer, I will test it next week.
A+
-----Message d'origine-----
De : Lukasz Majewski <lukma@denx.de>
Envoyé : jeudi 18 mai 2023 12:47
À : Alain GUILLEMOT <alain.guillemot@asn.com>
Cc : Florian Weimer <fweimer@redhat.com>; libc-help@sourceware.org
Objet : Re: Glibc on target 32 bits with 64-bit time support
Hi Alain,
> Hi Florian
>
> OK, that means that since glibc 2.34, glibc automatically recognizes
> whether the time_t structure is 32 or 64 bits.
>
> And therefore only the applications must be recompiled with the flags
> "-D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" ).
>
>
> This is correct ?
In principle yes.
Please find some extra information regarding glibc integration with 64 bit time support.
https://urldefense.com/v3/__https://github.com/lmajewski/meta-y2038*readme__;Iw!!HqwE!OnXimeUXo9KINuxtprxS7lYTXshhXz0xlRq3nBN_xR8FktKu9dTiEthPRSULKfz-5PbSfmtj0NvSWjUN$
>
>
> De : Florian Weimer <fweimer@redhat.com> Envoyé : lundi 15 mai 2023
> 22:12 À : Alain GUILLEMOT <alain.guillemot@asn.com> Cc :
> libc-help@sourceware.org Objet : Re: Glibc on target 32 bits with
> 64-bit time support
>
> * Alain GUILLEMOT: > In which file I have to add the option
> "-D_FILE_OFFSET_BITS=64 > -D_TIME_BITS=64", or are these options to be
> passed on the command > line? All ABI variants are automatically
> built. You don't have to do anything
>
>
> * Alain GUILLEMOT:
>
>
>
> > In which file I have to add the option "-D_FILE_OFFSET_BITS=64
>
> > -D_TIME_BITS=64", or are these options to be passed on the command
>
> > line?
>
>
>
> All ABI variants are automatically built. You don't have to do
> anything
>
> while building glibc. These flags are for building applications with
>
> glibc.
>
>
>
> Thanks,
>
> Florian
>
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-18 19:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-15 18:25 Glibc on target 32 bits with 64-bit time support Alain GUILLEMOT
2023-05-15 20:11 ` Florian Weimer
2023-05-16 17:20 ` Alain GUILLEMOT
2023-05-16 17:53 ` Florian Weimer
2023-05-18 10:31 ` Alain GUILLEMOT
2023-05-18 10:46 ` Lukasz Majewski
2023-05-18 19:49 ` Alain GUILLEMOT
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).