* [Buildroot] [PATCH] package/uclibc: fix mips64 n32 big endian issue
@ 2024-09-11 4:31 Waldemar Brodkorb
2024-09-15 10:05 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Waldemar Brodkorb @ 2024-09-11 4:31 UTC (permalink / raw)
To: buildroot
Add a real fix for the time64 issue instead of disabling
time64 for mips64 n32 big endian.
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
...r-n32-ABI-breaks-a-lot-of-tests-disa.patch | 28 ---------------
...time64-Select-correct-_dl_fstat-impl.patch | 34 +++++++++++++++++++
2 files changed, 34 insertions(+), 28 deletions(-)
delete mode 100644 package/uclibc/0001-mips64-time64-for-n32-ABI-breaks-a-lot-of-tests-disa.patch
create mode 100644 package/uclibc/0001-mips64n32-time64-Select-correct-_dl_fstat-impl.patch
diff --git a/package/uclibc/0001-mips64-time64-for-n32-ABI-breaks-a-lot-of-tests-disa.patch b/package/uclibc/0001-mips64-time64-for-n32-ABI-breaks-a-lot-of-tests-disa.patch
deleted file mode 100644
index 5a12231b42..0000000000
--- a/package/uclibc/0001-mips64-time64-for-n32-ABI-breaks-a-lot-of-tests-disa.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From dd01754e21da71706af07f3e56eade66fc9164fb Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Fri, 16 Aug 2024 16:59:28 +0200
-Subject: [PATCH] mips64: time64 for n32 ABI breaks a lot of tests, disable it
- for now
-
-Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
-Upstream: https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=dd01754e21da71706af07f3e56eade66fc9164fb
----
- extra/Configs/Config.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
-index 454b6ddb8..86bd20d76 100644
---- a/extra/Configs/Config.in
-+++ b/extra/Configs/Config.in
-@@ -1032,7 +1032,7 @@ config UCLIBC_USE_TIME64
- TARGET_i386 || \
- TARGET_m68k || \
- TARGET_microblaze || \
-- (TARGET_mips && !CONFIG_MIPS_N64_ABI) || \
-+ (TARGET_mips && !(CONFIG_MIPS_N64_ABI || CONFIG_MIPS_N32_ABI)) || \
- TARGET_or1k || \
- TARGET_powerpc || \
- TARGET_riscv32 || \
---
-2.30.2
-
diff --git a/package/uclibc/0001-mips64n32-time64-Select-correct-_dl_fstat-impl.patch b/package/uclibc/0001-mips64n32-time64-Select-correct-_dl_fstat-impl.patch
new file mode 100644
index 0000000000..c27e606b89
--- /dev/null
+++ b/package/uclibc/0001-mips64n32-time64-Select-correct-_dl_fstat-impl.patch
@@ -0,0 +1,34 @@
+From 0dedba1051d781bfb3dd3b50101aa0e880cb6cde Mon Sep 17 00:00:00 2001
+From: Dmitry Chestnykh <dm.chestnykh@gmail.com>
+Date: Sat, 7 Sep 2024 10:48:47 +0300
+Subject: [PATCH] mips64n32, time64: Select correct _dl_fstat impl
+
+With time64 enabled we have to use statx() instead of stat() or fstat()
+If the _dl_fstat implementation isn't selected correctly
+we can have multiple errors inside dynamic linker
+during startup of the system and of the almost every process
+Add sparc exclusion like in other places inside this header
+
+Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+Upstream: https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=0dedba1051d781bfb3dd3b50101aa0e880cb6cde
+---
+ ldso/include/dl-syscall.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
+index 180d03012..c143b8d45 100644
+--- a/ldso/include/dl-syscall.h
++++ b/ldso/include/dl-syscall.h
+@@ -168,7 +168,7 @@ static __always_inline int _dl_stat(const char *file_name,
+ #if defined __NR_fstat64 && !defined __NR_fstat && (!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__))
+ # define __NR__dl_fstat __NR_fstat64
+ static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf)
+-#elif defined __NR_fstat
++#elif defined __NR_fstat && !defined __UCLIBC_USE_TIME64__ || defined(__sparc__)
+ # define __NR__dl_fstat __NR_fstat
+ static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf)
+ #elif defined __NR_statx && defined __UCLIBC_HAVE_STATX__
+--
+2.30.2
+
--
2.30.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] package/uclibc: fix mips64 n32 big endian issue
2024-09-11 4:31 [Buildroot] [PATCH] package/uclibc: fix mips64 n32 big endian issue Waldemar Brodkorb
@ 2024-09-15 10:05 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-09-15 10:05 UTC (permalink / raw)
To: Waldemar Brodkorb; +Cc: buildroot
On Wed, 11 Sep 2024 06:31:32 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:
> Add a real fix for the time64 issue instead of disabling
> time64 for mips64 n32 big endian.
>
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
> ---
> ...r-n32-ABI-breaks-a-lot-of-tests-disa.patch | 28 ---------------
> ...time64-Select-correct-_dl_fstat-impl.patch | 34 +++++++++++++++++++
> 2 files changed, 34 insertions(+), 28 deletions(-)
> delete mode 100644 package/uclibc/0001-mips64-time64-for-n32-ABI-breaks-a-lot-of-tests-disa.patch
> create mode 100644 package/uclibc/0001-mips64n32-time64-Select-correct-_dl_fstat-impl.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-15 10:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-11 4:31 [Buildroot] [PATCH] package/uclibc: fix mips64 n32 big endian issue Waldemar Brodkorb
2024-09-15 10:05 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox