Skip to contentSkip to conversation

libevl and __USE_TIME_BITS64 on 32bit ARMv7

EVL_XENOMAI-4 Steub, Peter 2 participants 4 messages Jul 9, 2025

lore
Share & tools
lore
#0 lore raw

I just realized, that my application is using 32bit time values, which is not what I want and need. So I added " -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" to my toolchain. Now the evl api is not working anymore. All functions with "timespec" like "evl_read_clock()" fail since "timespec" has changed from 32bit seconds to 64bit seconds.

What is the right way to fix this, I guess I need to build libevl with 64bit time values but I did not find how to do it right.

Evl (R51) is cross build through a Yocto build.

Thank you.

Mit freundlichen Grüßen / kind regards

i. A. Peter Steub

#1 lore raw
Quoted 10 lines · Peter

I just realized, that my application is using 32bit time values, which is not what I want and need. So I added " -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" to my toolchain. Now the evl api is not working anymore. All functions with "timespec" like "evl_read_clock()" fail since "timespec" has changed from 32bit seconds to 64bit seconds.

What is the right way to fix this, I guess I need to build libevl with 64bit time values but I did not find how to do it right.

Evl (R51) is cross build through a Yocto build.

Thank you.

Mit freundlichen Grüßen / kind regards

Since Yocto 4.3 nanbield, 64bit time and largefile support are automatically enabled for 32bit architectures such as armv7. I'm building libevl from Yocto styhead ATM, with sizeof(struct timespec) == 16 as observed by libevl, as expected. There is no specific tuning needed by libevl regarding this, if the toolchain building it does the right thing.

Which Yocto release are you using?

Signature · 1 line
Philippe.
#2 lore raw
Quoted 32 lines

-----Ursprüngliche Nachricht-----
Von: Philippe Gerum <[email protected]>
Gesendet: Mittwoch, 9. Juli 2025 10:28
An: Steub, Peter <[email protected]>
Cc: [email protected]
Betreff: Re: [EVL_XENOMAI-4] libevl and __USE_TIME_BITS64 on 32bit ARMv7

Quoted 1 line · Peter

I just realized, that my application is using 32bit time values, which is not

what I want and need. So I added " -D_TIME_BITS=64 - D_FILE_OFFSET_BITS=64" to my toolchain. Now the evl api is not working anymore. All functions with "timespec" like "evl_read_clock()" fail since "timespec" has changed from 32bit seconds to 64bit seconds.

Quoted 2 lines

What is the right way to fix this, I guess I need to build libevl with 64bit time

values but I did not find how to do it right.

Quoted 7 lines

Evl (R51) is cross build through a Yocto build.

Thank you.

Mit freundlichen Grüßen / kind regards

Since Yocto 4.3 nanbield, 64bit time and largefile support are automatically enabled for 32bit architectures such as armv7. I'm building libevl from Yocto styhead ATM, with sizeof(struct timespec) ==
16 as observed by libevl, as expected. There is no specific tuning needed by libevl regarding this, if the toolchain building it does the right thing.

Quoted 4 lines

Which Yocto release are you using?

--
Philippe.

Hmm I am on 4.0 (kirkstone), so I probably should just build libevl with 64bit time and large file support, I do not want to break some random package. Can you tell me what to set in the libevl recipe to build it with 64bit time value and large file support?

Thank you.

Mit freundlichen Grüßen / kind regards

i. A. Peter Steub

#3 lore raw
Quoted 32 lines · Peter
Quoted 32 lines

-----Ursprüngliche Nachricht-----
Von: Philippe Gerum <[email protected]>
Gesendet: Mittwoch, 9. Juli 2025 10:28
An: Steub, Peter <[email protected]>
Cc: [email protected]
Betreff: Re: [EVL_XENOMAI-4] libevl and __USE_TIME_BITS64 on 32bit ARMv7

Quoted 1 line · Peter

I just realized, that my application is using 32bit time values, which is not

what I want and need. So I added " -D_TIME_BITS=64 - D_FILE_OFFSET_BITS=64" to my toolchain. Now the evl api is not working anymore. All functions with "timespec" like "evl_read_clock()" fail since "timespec" has changed from 32bit seconds to 64bit seconds.

Quoted 2 lines

What is the right way to fix this, I guess I need to build libevl with 64bit time

values but I did not find how to do it right.

Quoted 7 lines

Evl (R51) is cross build through a Yocto build.

Thank you.

Mit freundlichen Grüßen / kind regards

Since Yocto 4.3 nanbield, 64bit time and largefile support are automatically enabled for 32bit architectures such as armv7. I'm building libevl from Yocto styhead ATM, with sizeof(struct timespec) ==
16 as observed by libevl, as expected. There is no specific tuning needed by libevl regarding this, if the toolchain building it does the right thing.

Quoted 8 lines
Quoted 4 lines

Which Yocto release are you using?

--
Philippe.

Hmm I am on 4.0 (kirkstone), so I probably should just build libevl with 64bit time and large file support, I do not want to break some random package. Can you tell me what to set in the libevl recipe to build it with 64bit time value and large file support?

I would enable this in the toolchain produced and used by bitbake (including in the one produced for the SDK), there is no provision for doing that in libevl separately. IOW, you may want to enable this support in Kirkstone. This is done by pulling in poky/meta/conf/distro/include/time64.inc these days. Kirkstone ships with glibc 2.35, so TIME_BITS is available there as well.

With the Yocto toolchain enabling 64bit time and largefile support for everything it builds, the issue would be solved. OTOH, even if you hacked the libevl recipe by passing extra CFLAGS to meson during the configuration step, this would still not cope well with other libs the libevl package might depend on built with 64bit time support disabled.

Signature · 1 line
Philippe.