All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/libcap: add patch to fix build on ARC, OpenRISC, Microblaze
@ 2025-04-18 21:41 Thomas Petazzoni via buildroot
  2025-04-19 11:19 ` Julien Olivain
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-04-18 21:41 UTC (permalink / raw)
  To: buildroot; +Cc: Thomas Petazzoni, Bernd Kuhls

Following the bump of libcap to version 2.76 in commit
e2eb2ee58b9f70ebb83231537cca19bd28fa48de, the build started failing on
ARC, OpenRISC, Microblaze. The bug was reported upstream at
https://bugzilla.kernel.org/show_bug.cgi?id=219915 and was
subsequently fixed by upstream commit:

  https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=7a2eee56607218d017af8d26c2c41dba83629708

Which we backport in this commit.

Fixes:

  http://autobuild.buildroot.net/results/c99f461ac757d2934a353818a302a67ef3ad5cf5/ (ARC)
  http://autobuild.buildroot.net/results/8cae72f02d25a48287320d9c991f41761487e353/ (Microblaze)
  http://autobuild.buildroot.net/results/74e2c4d37c5b0ae2749c7d77ca7431bd0d510971/ (OpenRISC)

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 ...-PSX-support-for-microblaze-arc-and-.patch | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 package/libcap/0001-First-attempt-at-PSX-support-for-microblaze-arc-and-.patch

diff --git a/package/libcap/0001-First-attempt-at-PSX-support-for-microblaze-arc-and-.patch b/package/libcap/0001-First-attempt-at-PSX-support-for-microblaze-arc-and-.patch
new file mode 100644
index 0000000000..3f569d6d2c
--- /dev/null
+++ b/package/libcap/0001-First-attempt-at-PSX-support-for-microblaze-arc-and-.patch
@@ -0,0 +1,56 @@
+From 7a2eee56607218d017af8d26c2c41dba83629708 Mon Sep 17 00:00:00 2001
+From: "Andrew G. Morgan" <morgan@kernel.org>
+Date: Thu, 17 Apr 2025 20:20:09 -0700
+Subject: [PATCH] First attempt at PSX support for microblaze, arc and
+ openrisc.
+
+I found some confusing macrology for openrisc. I'm optimistic that
+this is recognized with the __or1k__ gcc macro.
+
+See for details:
+
+  https://bugzilla.kernel.org/show_bug.cgi?id=219915
+
+Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
+Upstream: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=7a2eee56607218d017af8d26c2c41dba83629708
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+---
+ psx/psx_calls.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/psx/psx_calls.c b/psx/psx_calls.c
+index 9662fbd..8195964 100644
+--- a/psx/psx_calls.c
++++ b/psx/psx_calls.c
+@@ -48,7 +48,8 @@
+     || defined(__mips__) || defined(__loongarch__) \
+     || defined(__powerpc__) || defined(__s390__) || defined(__riscv) \
+     || defined(__alpha__) || defined(__hppa__) || defined(__sh__) \
+-    || defined(__m68k__) || defined(__sparc__)
++    || defined(__m68k__) || defined(__sparc__) || defined(__arc__) \
++    || defined(__microblaze__) || defined(__or1k__)
+ 
+ #undef _NSIG
+ #undef _NSIG_BPW
+@@ -69,7 +70,8 @@
+ 
+ #if defined(__x86_64__) || defined(__i386__) \
+     || defined(__arm__) \
+-    || defined(__powerpc__)
++    || defined(__powerpc__) \
++    || defined(__arc__)
+ /* field used */
+ #define SA_RESTORER  0x04000000
+ #endif /* architectures that use SA_RESTORER */
+@@ -201,6 +203,8 @@ static void psx_posix_syscall_actor(int signum, siginfo_t *info, void *ignore) {
+ 	    __asm__ __volatile__("\npsx_restorer:\n\tmov r7,#173\n\tswi 0\n");
+ #elif defined(__powerpc__)
+ 	    __asm__ __volatile__("\npsx_restorer:\n\tli 0, 172\n\tsc\n");
++#elif defined(__arc__)
++	    __asm__ __volatile__("\npsx_restorer:\n\tmov r8, 139\n\ttrap_s 0\n");
+ #else
+ #error "unsupported architecture - https://bugzilla.kernel.org/show_bug.cgi?id=219687"
+ #endif /* supported architectures */
+-- 
+2.49.0
+
-- 
2.49.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/libcap: add patch to fix build on ARC, OpenRISC, Microblaze
  2025-04-18 21:41 [Buildroot] [PATCH] package/libcap: add patch to fix build on ARC, OpenRISC, Microblaze Thomas Petazzoni via buildroot
@ 2025-04-19 11:19 ` Julien Olivain
  2025-04-19 13:29   ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Olivain @ 2025-04-19 11:19 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: buildroot, Bernd Kuhls

Hi Thomas,

On 18/04/2025 23:41, Thomas Petazzoni via buildroot wrote:
> Following the bump of libcap to version 2.76 in commit
> e2eb2ee58b9f70ebb83231537cca19bd28fa48de, the build started failing on
> ARC, OpenRISC, Microblaze. The bug was reported upstream at
> https://bugzilla.kernel.org/show_bug.cgi?id=219915 and was
> subsequently fixed by upstream commit:
> 
>   
> https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=7a2eee56607218d017af8d26c2c41dba83629708
> 
> Which we backport in this commit.
> 
> Fixes:
> 
>   
> http://autobuild.buildroot.net/results/c99f461ac757d2934a353818a302a67ef3ad5cf5/ 
> (ARC)
>   
> http://autobuild.buildroot.net/results/8cae72f02d25a48287320d9c991f41761487e353/ 
> (Microblaze)
>   
> http://autobuild.buildroot.net/results/74e2c4d37c5b0ae2749c7d77ca7431bd0d510971/ 
> (OpenRISC)
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

This upstream patch seems to fix the build issues for the mentioned
architectures. I applied this patch on master.

I also tested with "test-pkg -a" and it seems the xtensa architecture
has the same problem. See:
https://gitlab.com/jolivain/buildroot/-/pipelines/1776425781
https://gitlab.com/jolivain/buildroot/-/jobs/9770003981

I believe a followup patch will be needed. Could you have
a look please?

Best regards,

Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/libcap: add patch to fix build on ARC, OpenRISC, Microblaze
  2025-04-19 11:19 ` Julien Olivain
@ 2025-04-19 13:29   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-04-19 13:29 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot, Bernd Kuhls

On Sat, 19 Apr 2025 13:19:29 +0200
Julien Olivain <ju.o@free.fr> wrote:

> I also tested with "test-pkg -a" and it seems the xtensa architecture
> has the same problem. See:
> https://gitlab.com/jolivain/buildroot/-/pipelines/1776425781
> https://gitlab.com/jolivain/buildroot/-/jobs/9770003981
> 
> I believe a followup patch will be needed. Could you have
> a look please?

Thanks for the report! I have reported this upstream, and will wait for
their feedback (they were very responsive on the
ARC/OpenRISC/Microblaze report).

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2025-04-19 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-18 21:41 [Buildroot] [PATCH] package/libcap: add patch to fix build on ARC, OpenRISC, Microblaze Thomas Petazzoni via buildroot
2025-04-19 11:19 ` Julien Olivain
2025-04-19 13:29   ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.