Message ID | 20240725082703.615109-1-dm.chestnykh@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [v3,RESEND] package/uclibc-ng-test: Fix musl build | expand |
On Thu, 25 Jul 2024 11:27:03 +0300 Dmitry Chestnykh <dm.chestnykh@gmail.com> wrote: > Musl doesn't provide sys/asm.h header > so we should add some defines inside > mips-specific header file to avoid build errors > > Fixes: > http://autobuild.buildroot.net/results/af7a1d00930485f87f77762b34cae01873a8cd41/ > > Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com> > --- > Musl doesn't provide sys/asm.h header. > I think no one has enabled this test before for mips musl builds > so perhaps this error has only appeared now > --- > .../0001-Fix-error-absent-sys-asm-h.patch | 61 +++++++++++++++++++ > 1 file changed, 61 insertions(+) > create mode 100644 package/uclibc-ng-test/0001-Fix-error-absent-sys-asm-h.patch Applied to master, thanks. Thomas
>>>>> "Dmitry" == Dmitry Chestnykh <dm.chestnykh@gmail.com> writes: > Musl doesn't provide sys/asm.h header > so we should add some defines inside > mips-specific header file to avoid build errors > Fixes: > http://autobuild.buildroot.net/results/af7a1d00930485f87f77762b34cae01873a8cd41/ > Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com> > --- > Musl doesn't provide sys/asm.h header. > I think no one has enabled this test before for mips musl builds > so perhaps this error has only appeared now Committed to 2024.02.x and 2024.05.x, thanks.
diff --git a/package/uclibc-ng-test/0001-Fix-error-absent-sys-asm-h.patch b/package/uclibc-ng-test/0001-Fix-error-absent-sys-asm-h.patch new file mode 100644 index 0000000000..0c396d4e38 --- /dev/null +++ b/package/uclibc-ng-test/0001-Fix-error-absent-sys-asm-h.patch @@ -0,0 +1,61 @@ +From a99d5bdb51bdab92a303c508b2b938ee0789d614 Mon Sep 17 00:00:00 2001 +From: Dmitry Chestnykh <dm.chestnykh@gmail.com> +Date: Thu, 25 Jul 2024 09:15:11 +0300 +Subject: [PATCH] Fix errors due to absent sys/asm.h in mips64 musl build + +Upstream: + https://patchwork.ozlabs.org/project/uclibc-ng/patch/20240725081519.611076-1-dm.chestnykh@gmail.com/ + +Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com> +--- + test/tls/tls-macros-mips.h | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/test/tls/tls-macros-mips.h b/test/tls/tls-macros-mips.h +index eed0938..bd4c5c4 100644 +--- a/test/tls/tls-macros-mips.h ++++ b/test/tls/tls-macros-mips.h +@@ -1,7 +1,40 @@ + /* Macros to support TLS testing in times of missing compiler support. */ + + #include <sys/cdefs.h> ++#if defined(__has_include) && __has_include(<sys/asm.h>) + #include <sys/asm.h> ++#else ++ ++#define __STRING(x) #x ++ ++#if ((_MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _ABI32) && _MIPS_SZPTR == 32) ++#define PTR_ADDIU addiu ++#define PTR_L lw ++#endif ++ ++#if _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _NABI32 ++ ++#if !defined __mips_isa_rev || __mips_isa_rev < 6 ++#define PTR_ADDU add ++#define PTR_ADDIU addi ++#else ++#define PTR_ADDU addu ++#define PTR_ADDIU addiu ++#endif ++ ++#define PTR_L lw ++#endif ++ ++#if ((_MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _ABI32) && _MIPS_SZPTR == 64) \ ++ || _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _ABIN32 ++ ++#define PTR_ADDU daddu ++#define PTR_ADDIU daddiu ++#define PTR_L ld ++ ++#endif ++ ++#endif + + #define __STRING2(X) __STRING(X) + #define ADDU __STRING2(PTR_ADDU) +-- +2.45.2 +
Musl doesn't provide sys/asm.h header so we should add some defines inside mips-specific header file to avoid build errors Fixes: http://autobuild.buildroot.net/results/af7a1d00930485f87f77762b34cae01873a8cd41/ Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com> --- Musl doesn't provide sys/asm.h header. I think no one has enabled this test before for mips musl builds so perhaps this error has only appeared now --- .../0001-Fix-error-absent-sys-asm-h.patch | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 package/uclibc-ng-test/0001-Fix-error-absent-sys-asm-h.patch