Skip to contentSkip to conversation

package/jack2: Fix build on xtensa

PATCH New Bernd Kuhls 2 participants 5 messages May 23, 2016 – May 26, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/jack2: Fix build on xtensa

Fixes
http://autobuild.buildroot.net/results/1ee/1ee48356d8da5e0ebf3e5b61b02fed81704a01dd/

---
 package/jack2/0003-Add-support-for-xtensa.patch | 34 +++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/jack2/0003-Add-support-for-xtensa.patch
package/jack2/0003-Add-support-for-xtensa.patch new file +34 -0
new file mode 100644
index 0000000..f4e7180
@@ -0,0 +1,34 @@
+From bf35254cf21bf27a1cb79d5612ee02032c6ec39e Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Mon, 23 May 2016 17:42:39 +0200
+Subject: [PATCH 1/2] Add support for xtensa
+
+When compiling jack on nios2, compilation fails because NGREGS is not
+defined. Since this is only for debug output on segmentation faults, stub
+the debug print out like it's been done for other platforms before.
+
+Inspired by
+https://github.com/jackaudio/jack2/commit/d11bb095291d8880508c87adfe625bf2bcab1456
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+(Patch sent upstream: https://github.com/jackaudio/jack2/pull/210)
+---
+ dbus/sigsegv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dbus/sigsegv.c b/dbus/sigsegv.c
+index ee12f91..137adf1 100644
+--- a/dbus/sigsegv.c
++++ b/dbus/sigsegv.c
+@@ -104,7 +104,7 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
+     jack_error("info.si_errno = %d", info->si_errno);
+     jack_error("info.si_code  = %d (%s)", info->si_code, si_code_str);
+     jack_error("info.si_addr  = %p", info->si_addr);
+-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) && !defined(nios2)
++#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) && !defined(nios2) && !defined(__XTENSA__)
+     for(i = 0; i < NGREG; i++)
+         jack_error("reg[%02d]       = 0x" REGFORMAT, i, 
+ #if defined(__powerpc64__)
+-- 
+2.8.1
+
Signature · 1 line
2.8.1
#1 lore raw

PATCH 2/2 package/jack2: Fix build on arc

Fixes
http://autobuild.buildroot.net/results/483/48367bdc5e2f466ea12eb573ba9f5265887a62f4/

---
 package/jack2/0004-Add-support-for-arc.patch | 34 ++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/jack2/0004-Add-support-for-arc.patch
package/jack2/0004-Add-support-for-arc.patch new file +34 -0
new file mode 100644
index 0000000..d594e52
@@ -0,0 +1,34 @@
+From 0d78be7887bd4a86f9b4065faee5c4827a67d667 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Mon, 23 May 2016 17:44:09 +0200
+Subject: [PATCH 2/2] Add support for arc
+
+When compiling jack on nios2, compilation fails because NGREGS is not
+defined. Since this is only for debug output on segmentation faults, stub
+the debug print out like it's been done for other platforms before.
+
+Inspired by
+https://github.com/jackaudio/jack2/commit/d11bb095291d8880508c87adfe625bf2bcab1456
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+(Patch sent upstream: https://github.com/jackaudio/jack2/pull/210)
+---
+ dbus/sigsegv.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dbus/sigsegv.c b/dbus/sigsegv.c
+index 137adf1..f521ae9 100644
+--- a/dbus/sigsegv.c
++++ b/dbus/sigsegv.c
+@@ -104,7 +104,7 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) {
+     jack_error("info.si_errno = %d", info->si_errno);
+     jack_error("info.si_code  = %d (%s)", info->si_code, si_code_str);
+     jack_error("info.si_addr  = %p", info->si_addr);
+-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) && !defined(nios2) && !defined(__XTENSA__)
++#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) && !defined(nios2) && !defined(__XTENSA__) && !defined(__arc__)
+     for(i = 0; i < NGREG; i++)
+         jack_error("reg[%02d]       = 0x" REGFORMAT, i, 
+ #if defined(__powerpc64__)
+-- 
+2.8.1
+
Signature · 1 line
2.8.1
#2 lore raw

PATCH 1/2 package/jack2: Fix build on xtensa

In reply to Bernd Kuhls

Hello,

Quoted 8 lines · Bernd Kuhls

Fixes
http://autobuild.buildroot.net/results/1ee/1ee48356d8da5e0ebf3e5b61b02fed81704a01dd/

---
 package/jack2/0003-Add-support-for-xtensa.patch | 34 +++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/jack2/0003-Add-support-for-xtensa.patch

So we've already added an exclusion for nios2, now xtensa and arc, and the list was already long.

Isn't it time to find a better solution, like the below patch?

(Took me a while to cook, I had never used this waf thing until now...)

I've tested that it properly detects the absence of NGREG on Xtensa. However, I have not tested on architectures where it exists, so I hope I didn't do any typo.

Best regards,

Thomas

#3 lore raw

PATCH 1/2 package/jack2: Fix build on xtensa

Hello,

Quoted 3 lines · Thomas Petazzoni

I've tested that it properly detects the absence of NGREG on Xtensa. However, I have not tested on architectures where it exists, so I hope I didn't do any typo.

Bernd, do you think you will have some time to propose a patch based on something similar to what I suggested, to fix the NGREG jack2 failure?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/2 package/jack2: Fix build on xtensa

[posted and mailed]

Thomas Petazzoni <thomas.petazzoni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8 @public.gmane.org> wrote in news:20160526204326.2308bcad at free-electrons.com:

Quoted 2 lines

Bernd, do you think you will have some time to propose a patch based on something similar to what I suggested, to fix the NGREG jack2 failure?

Hi Thomas,

honestly not this month, sorry; if it is not urgent I will have a look at it in the coming weeks. I am not using jack2 myself so my testing capabilities are limited to compilation tests.

Regards, Bernd