Skip to contentSkip to conversation

package/qt5/qt5base: put back riscv32 patch

PATCH Applied Fabrice Fontaine 3 participants 3 messages Feb 17, 2022 – Mar 5, 2022 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/qt5/qt5base: put back riscv32 patch

Commit 5770a645a3a49a3f0f02972131a4ff5283b4c11e wrongly removed riscv32 patch resulting in the following build failure:

In file included from thread/qmutex_linux.cpp:45,

                 from thread/qmutex.cpp:806:
thread/qfutex_p.h: In function 'int QtLinuxFutex::_q_futex(int*, int, int, quintptr, int*, int)':
thread/qfutex_p.h:116:30: error: '__NR_futex' was not declared in this scope; did you mean '_q_futex'?
  116 |         int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
      |                              ^~~~~~~~~~
      |                              _q_futex

Fixes:
- http://autobuild.buildroot.org/results/ff90bc7680acf1487ed58e5e25cf1a5f13dfaedb

---
 .../qt5base/0007-Fix-build-on-riscv32.patch   | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/qt5/qt5base/0007-Fix-build-on-riscv32.patch
package/qt5/qt5base/0007-Fix-build-on-riscv32.patch new file +46 -0
new file mode 100644
index 0000000000..5561acb9ae
@@ -0,0 +1,46 @@
+From 035dc537bee26e3b63a211b2835d8560439e161f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 27 Aug 2021 16:28:32 +0200
+Subject: Fix build on riscv32
+
+riscv32 fails to build because __NR_futex is not defined on this
+architecture:
+
+In file included from thread/qmutex_linux.cpp:45,
+                 from thread/qmutex.cpp:804:
+thread/qfutex_p.h: In function 'int QtLinuxFutex::_q_futex(int*, int, int, quintptr, int*, int)':
+thread/qfutex_p.h:116:30: error: '__NR_futex' was not declared in this scope; did you mean '_q_futex'?
+  116 |         int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
+      |                              ^~~~~~~~~~
+      |                              _q_futex
+
+Pick-to: 6.1 6.2
+Fixes: QTBUG-96067
+Change-Id: Ib6a9bcc496f37e69ac39362cb0a021fccaf311f5
+Reviewed-by: Thiago Macieira <[email protected]>
+[Retrieved from:
+https://code.qt.io/cgit/qt/qtbase.git/commit/?id=035dc537bee26e3b63a211b2835d8560439e161f]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ src/corelib/thread/qfutex_p.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h
+index 40482b6fc1..037207a5c0 100644
+--- a/src/corelib/thread/qfutex_p.h
++++ b/src/corelib/thread/qfutex_p.h
+@@ -103,6 +103,11 @@ QT_END_NAMESPACE
+ // if not defined in linux/futex.h
+ #  define FUTEX_PRIVATE_FLAG        128         // added in v2.6.22
+ 
++// RISC-V does not supply __NR_futex
++#  ifndef __NR_futex
++#    define __NR_futex __NR_futex_time64
++#  endif
++
+ QT_BEGIN_NAMESPACE
+ namespace QtLinuxFutex {
+     constexpr inline bool futexAvailable() { return true; }
+-- 
+cgit v1.2.1
+
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Reviewed-by on v1 1/1
#1 lore raw

Hello Fabrice,

Quoted 11 lines · Fabrice Fontaine

Commit 5770a645a3a49a3f0f02972131a4ff5283b4c11e wrongly removed riscv32 patch resulting in the following build failure:

In file included from thread/qmutex_linux.cpp:45,

                 from thread/qmutex.cpp:806:
thread/qfutex_p.h: In function 'int QtLinuxFutex::_q_futex(int*, int, int, quintptr, int*, int)':
thread/qfutex_p.h:116:30: error: '__NR_futex' was not declared in this scope; did you mean '_q_futex'?
  116 |         int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
      |                              ^~~~~~~~~~
      |                              _q_futex
Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/ff90bc7680acf1487ed58e5e25cf1a5f13dfaedb

Regards,
Peter

Quoted 47 lines
---
 .../qt5base/0007-Fix-build-on-riscv32.patch   | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/qt5/qt5base/0007-Fix-build-on-riscv32.patch
package/qt5/qt5base/0007-Fix-build-on-riscv32.patch new file +36 -0
new file mode 100644
index 0000000000..5561acb9ae
@@ -0,0 +1,46 @@
+From 035dc537bee26e3b63a211b2835d8560439e161f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 27 Aug 2021 16:28:32 +0200
+Subject: Fix build on riscv32
+
+riscv32 fails to build because __NR_futex is not defined on this
+architecture:
+
+In file included from thread/qmutex_linux.cpp:45,
+                 from thread/qmutex.cpp:804:
+thread/qfutex_p.h: In function 'int QtLinuxFutex::_q_futex(int*, int, int, quintptr, int*, int)':
+thread/qfutex_p.h:116:30: error: '__NR_futex' was not declared in this scope; did you mean '_q_futex'?
+  116 |         int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
+      |                              ^~~~~~~~~~
+      |                              _q_futex
+
+Pick-to: 6.1 6.2
+Fixes: QTBUG-96067
+Change-Id: Ib6a9bcc496f37e69ac39362cb0a021fccaf311f5
+Reviewed-by: Thiago Macieira <[email protected]>
+[Retrieved from:
+https://code.qt.io/cgit/qt/qtbase.git/commit/?id=035dc537bee26e3b63a211b2835d8560439e161f]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ src/corelib/thread/qfutex_p.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h
+index 40482b6fc1..037207a5c0 100644
+--- a/src/corelib/thread/qfutex_p.h
++++ b/src/corelib/thread/qfutex_p.h
+@@ -103,6 +103,11 @@ QT_END_NAMESPACE
+ // if not defined in linux/futex.h
+ #  define FUTEX_PRIVATE_FLAG        128         // added in v2.6.22
+
++// RISC-V does not supply __NR_futex

package/qt5/qt5base/0007-Fix-build-on-riscv32.patch line 46

Quoted 10 lines
package/qt5/qt5base/0007-Fix-build-on-riscv32.patch new file +10 -0
++#  ifndef __NR_futex
++#    define __NR_futex __NR_futex_time64
++#  endif
++
+ QT_BEGIN_NAMESPACE
+ namespace QtLinuxFutex {
+     constexpr inline bool futexAvailable() { return true; }
+--
+cgit v1.2.1
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Fabrice Fontaine
Quoted 11 lines · Fabrice Fontaine

Commit 5770a645a3a49a3f0f02972131a4ff5283b4c11e wrongly removed riscv32 patch resulting in the following build failure:

In file included from thread/qmutex_linux.cpp:45,

                  from thread/qmutex.cpp:806:
thread/qfutex_p.h: In function 'int QtLinuxFutex::_q_futex(int*, int, int, quintptr, int*, int)':
thread/qfutex_p.h:116:30: error: '__NR_futex' was not declared in this scope; did you mean '_q_futex'?
   116 |         int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
       |                              ^~~~~~~~~~
       |                              _q_futex
Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/ff90bc7680acf1487ed58e5e25cf1a5f13dfaedb

Applied to master, thanks.

Regards,
Arnout

Quoted 47 lines
---
  .../qt5base/0007-Fix-build-on-riscv32.patch   | 46 +++++++++++++++++++
  1 file changed, 46 insertions(+)

create mode 100644 package/qt5/qt5base/0007-Fix-build-on-riscv32.patch

package/qt5/qt5base/0007-Fix-build-on-riscv32.patch new file +36 -0
new file mode 100644
index 0000000000..5561acb9ae
@@ -0,0 +1,46 @@
+From 035dc537bee26e3b63a211b2835d8560439e161f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 27 Aug 2021 16:28:32 +0200
+Subject: Fix build on riscv32
+
+riscv32 fails to build because __NR_futex is not defined on this
+architecture:
+
+In file included from thread/qmutex_linux.cpp:45,
+                 from thread/qmutex.cpp:804:
+thread/qfutex_p.h: In function 'int QtLinuxFutex::_q_futex(int*, int, int, quintptr, int*, int)':
+thread/qfutex_p.h:116:30: error: '__NR_futex' was not declared in this scope; did you mean '_q_futex'?
+  116 |         int result = syscall(__NR_futex, addr, op | FUTEX_PRIVATE_FLAG, val, val2, addr2, val3);
+      |                              ^~~~~~~~~~
+      |                              _q_futex
+
+Pick-to: 6.1 6.2
+Fixes: QTBUG-96067
+Change-Id: Ib6a9bcc496f37e69ac39362cb0a021fccaf311f5
+Reviewed-by: Thiago Macieira <[email protected]>
+[Retrieved from:
+https://code.qt.io/cgit/qt/qtbase.git/commit/?id=035dc537bee26e3b63a211b2835d8560439e161f]
+Signed-off-by: Fabrice Fontaine <[email protected]>
+---
+ src/corelib/thread/qfutex_p.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/corelib/thread/qfutex_p.h b/src/corelib/thread/qfutex_p.h
+index 40482b6fc1..037207a5c0 100644
+--- a/src/corelib/thread/qfutex_p.h
++++ b/src/corelib/thread/qfutex_p.h
+@@ -103,6 +103,11 @@ QT_END_NAMESPACE
+ // if not defined in linux/futex.h
+ #  define FUTEX_PRIVATE_FLAG        128         // added in v2.6.22
+
++// RISC-V does not supply __NR_futex

package/qt5/qt5base/0007-Fix-build-on-riscv32.patch line 46

Quoted 10 lines
package/qt5/qt5base/0007-Fix-build-on-riscv32.patch new file +10 -0
++#  ifndef __NR_futex
++#    define __NR_futex __NR_futex_time64
++#  endif
++
+ QT_BEGIN_NAMESPACE
+ namespace QtLinuxFutex {
+     constexpr inline bool futexAvailable() { return true; }
+--
+cgit v1.2.1
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot