All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH 1/6] luajit: Disable on rv32
@ 2020-04-30  5:31 Khem Raj
  2020-04-30  5:31 ` [meta-oe][PATCH 2/6] abseil-cpp: Fix build on riscv32 Khem Raj
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Khem Raj @ 2020-04-30  5:31 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Not ported to rv32 yet

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-devtools/luajit/luajit_git.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta-oe/recipes-devtools/luajit/luajit_git.bb b/meta-oe/recipes-devtools/luajit/luajit_git.bb
index c4f8216480..cc90394163 100644
--- a/meta-oe/recipes-devtools/luajit/luajit_git.bb
+++ b/meta-oe/recipes-devtools/luajit/luajit_git.bb
@@ -97,3 +97,4 @@ COMPATIBLE_HOST_powerpc = "null"
 COMPATIBLE_HOST_powerpc64 = "null"
 COMPATIBLE_HOST_powerpc64le = "null"
 COMPATIBLE_HOST_riscv64 = "null"
+COMPATIBLE_HOST_riscv32 = "null"
-- 
2.26.2


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

* [meta-oe][PATCH 2/6] abseil-cpp: Fix build on riscv32
  2020-04-30  5:31 [meta-oe][PATCH 1/6] luajit: Disable on rv32 Khem Raj
@ 2020-04-30  5:31 ` Khem Raj
  2020-04-30  5:31 ` [meta-oe][PATCH 3/6] rsyslog: Enable atomic builtins on rv32 Khem Raj
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2020-04-30  5:31 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-Fix-build-on-riscv32.patch           | 74 +++++++++++++++++++
 .../abseil-cpp/abseil-cpp_git.bb              |  1 +
 2 files changed, 75 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch

diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch
new file mode 100644
index 0000000000..e7c9b43c29
--- /dev/null
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch
@@ -0,0 +1,74 @@
+From 04e28fdda03b545a0f7b446a784ec2fa7249cbb8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 29 Apr 2020 15:37:40 -0700
+Subject: [PATCH] Fix build on riscv32
+
+Define __NR_mmap in terms of __NR_mmap2 and __NR_futex interms of
+__NR_futex_time64 for rv32, since there calls dont exist for rv32
+
+Also recognise rv32 as a new 32bit platform
+
+Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/675]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ absl/base/internal/direct_mmap.h        | 5 +++++
+ absl/base/internal/spinlock_linux.inc   | 4 ++++
+ absl/synchronization/internal/waiter.cc | 4 ++++
+ 3 files changed, 13 insertions(+)
+
+diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
+index 5618867..90cfeca 100644
+--- a/absl/base/internal/direct_mmap.h
++++ b/absl/base/internal/direct_mmap.h
+@@ -26,6 +26,10 @@
+ 
+ #ifdef __linux__
+ 
++#if !defined(__NR_mmap) && defined(__riscv) && __riscv_xlen == 32
++# define __NR_mmap __NR_mmap2
++#endif
++
+ #include <sys/types.h>
+ #ifdef __BIONIC__
+ #include <sys/syscall.h>
+@@ -72,6 +76,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
+ #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \
+     (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) ||                   \
+     (defined(__PPC__) && !defined(__PPC64__)) ||                             \
++    (defined(__riscv) && __riscv_xlen == 32)  ||                             \
+     (defined(__s390__) && !defined(__s390x__))
+   // On these architectures, implement mmap with mmap2.
+   static int pagesize = 0;
+diff --git a/absl/base/internal/spinlock_linux.inc b/absl/base/internal/spinlock_linux.inc
+index 323edd6..3dca444 100644
+--- a/absl/base/internal/spinlock_linux.inc
++++ b/absl/base/internal/spinlock_linux.inc
+@@ -14,6 +14,10 @@
+ //
+ // This file is a Linux-specific part of spinlock_wait.cc
+ 
++#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
++# define __NR_futex __NR_futex_time64
++#endif
++
+ #include <linux/futex.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
+diff --git a/absl/synchronization/internal/waiter.cc b/absl/synchronization/internal/waiter.cc
+index 2949f5a..7411042 100644
+--- a/absl/synchronization/internal/waiter.cc
++++ b/absl/synchronization/internal/waiter.cc
+@@ -24,6 +24,10 @@
+ #include <unistd.h>
+ #endif
+ 
++#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
++# define __NR_futex __NR_futex_time64
++#endif
++
+ #ifdef __linux__
+ #include <linux/futex.h>
+ #include <sys/syscall.h>
+-- 
+2.26.2
+
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
index 9a44133c56..e874e4a5ea 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
@@ -16,6 +16,7 @@ SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH}                \
            file://0003-Add-fPIC-option.patch                                  \
            file://0001-Add-RISCV-support-to-GetProgramCounter.patch \
            file://0001-absl-always-use-asm-sgidefs.h.patch \
+           file://0001-Fix-build-on-riscv32.patch \
           "
 
 S = "${WORKDIR}/git"
-- 
2.26.2


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

* [meta-oe][PATCH 3/6] rsyslog: Enable atomic builtins on rv32
  2020-04-30  5:31 [meta-oe][PATCH 1/6] luajit: Disable on rv32 Khem Raj
  2020-04-30  5:31 ` [meta-oe][PATCH 2/6] abseil-cpp: Fix build on riscv32 Khem Raj
@ 2020-04-30  5:31 ` Khem Raj
  2020-04-30  5:31 ` [meta-python][PATCH 4/6] python3-grpcio: Fix build with riscv32 Khem Raj
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2020-04-30  5:31 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Fixes
rsyslog-8.2002.0/runtime/../action.c:1666: undefined reference to `__sync_bool_compare_and_swap_8'
collect2: error: ld returned 1 exit status

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-oe/recipes-extended/rsyslog/rsyslog_8.2002.0.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2002.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2002.0.bb
index 8605145ebc..ca8fddc713 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2002.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2002.0.bb
@@ -41,6 +41,7 @@ EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes"
 EXTRA_OECONF += "--enable-imfile-tests"
 EXTRA_OECONF_remove_mipsarch = "ap_cv_atomic_builtins=yes"
 EXTRA_OECONF_remove_powerpc = "ap_cv_atomic_builtins=yes"
+EXTRA_OECONF_remove_riscv32 = "ap_cv_atomic_builtins=yes"
 
 # first line is default yes in configure
 PACKAGECONFIG ??= " \
-- 
2.26.2


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

* [meta-python][PATCH 4/6] python3-grpcio: Fix build with riscv32
  2020-04-30  5:31 [meta-oe][PATCH 1/6] luajit: Disable on rv32 Khem Raj
  2020-04-30  5:31 ` [meta-oe][PATCH 2/6] abseil-cpp: Fix build on riscv32 Khem Raj
  2020-04-30  5:31 ` [meta-oe][PATCH 3/6] rsyslog: Enable atomic builtins on rv32 Khem Raj
@ 2020-04-30  5:31 ` Khem Raj
  2020-04-30  5:31 ` [meta-networking][PATCH 5/6] waf: Add cross answers for riscv32 Khem Raj
  2020-04-30  5:31 ` [meta-gnome][PATCH 6/6] libnma: Fix build on riscv32 Khem Raj
  4 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2020-04-30  5:31 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Ensure libseil-cpp can build for rv32 and boringssl riscv patch
considers rv32 separate from rv64

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-Fix-build-on-riscv32.patch           | 65 +++++++++++++++++++
 .../python3-grpcio/riscv64_support.patch      | 13 ++--
 .../python/python3-grpcio_1.27.1.bb           |  1 +
 3 files changed, 75 insertions(+), 4 deletions(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-grpcio/0001-Fix-build-on-riscv32.patch

diff --git a/meta-python/recipes-devtools/python/python3-grpcio/0001-Fix-build-on-riscv32.patch b/meta-python/recipes-devtools/python/python3-grpcio/0001-Fix-build-on-riscv32.patch
new file mode 100644
index 0000000000..920fc1169d
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-grpcio/0001-Fix-build-on-riscv32.patch
@@ -0,0 +1,65 @@
+From 04e28fdda03b545a0f7b446a784ec2fa7249cbb8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 29 Apr 2020 15:37:40 -0700
+Subject: [PATCH] Fix build on riscv32
+
+Define __NR_mmap in terms of __NR_mmap2 and __NR_futex interms of
+__NR_futex_time64 for rv32, since there calls dont exist for rv32
+
+Also recognise rv32 as a new 32bit platform
+
+Upstream-Status: Submitted [https://github.com/abseil/abseil-cpp/pull/675]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ absl/base/internal/direct_mmap.h        | 5 +++++
+ absl/base/internal/spinlock_linux.inc   | 4 ++++
+ absl/synchronization/internal/waiter.cc | 4 ++++
+ 3 files changed, 13 insertions(+)
+
+--- a/third_party/abseil-cpp/absl/base/internal/direct_mmap.h
++++ b/third_party/abseil-cpp/absl/base/internal/direct_mmap.h
+@@ -26,6 +26,10 @@
+ 
+ #ifdef __linux__
+ 
++#if !defined(__NR_mmap) && defined(__riscv) && __riscv_xlen == 32
++# define __NR_mmap __NR_mmap2
++#endif
++
+ #include <sys/types.h>
+ #ifdef __BIONIC__
+ #include <sys/syscall.h>
+@@ -72,6 +76,7 @@ inline void* DirectMmap(void* start, siz
+ #if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \
+     (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) ||                   \
+     (defined(__PPC__) && !defined(__PPC64__)) ||                             \
++    (defined(__riscv) && __riscv_xlen == 32)  ||                             \
+     (defined(__s390__) && !defined(__s390x__))
+   // On these architectures, implement mmap with mmap2.
+   static int pagesize = 0;
+--- a/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc
++++ b/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc
+@@ -14,6 +14,10 @@
+ //
+ // This file is a Linux-specific part of spinlock_wait.cc
+ 
++#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
++# define __NR_futex __NR_futex_time64
++#endif
++
+ #include <linux/futex.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
+--- a/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc
++++ b/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc
+@@ -24,6 +24,10 @@
+ #include <unistd.h>
+ #endif
+ 
++#if !defined(__NR_futex) && defined(__riscv) && __riscv_xlen == 32
++# define __NR_futex __NR_futex_time64
++#endif
++
+ #ifdef __linux__
+ #include <linux/futex.h>
+ #include <sys/syscall.h>
diff --git a/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch b/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch
index b55d50bde5..8c9ffa21b7 100644
--- a/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch
+++ b/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch
@@ -4,13 +4,18 @@ Upstream-Status: Pending
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 --- a/third_party/boringssl/include/openssl/base.h
 +++ b/third_party/boringssl/include/openssl/base.h
-@@ -108,6 +108,9 @@ extern "C" {
+@@ -108,6 +108,14 @@ extern "C" {
  #elif defined(__mips__) && defined(__LP64__)
  #define OPENSSL_64_BIT
  #define OPENSSL_MIPS64
-+#elif defined(__riscv) && defined(__riscv_xlen)
-+#define OPENSSL_64_BIT
-+#define OPENSSL_RISCV64
++#elif defined(__riscv)
++# if (__riscv_xlen == 64)
++#  define OPENSSL_64_BIT
++#  define OPENSSL_RISCV64
++# elif(__riscv_xlen == 32)
++#  define OPENSSL_32_BIT
++#  define OPENSSL_RISCV32
++# endif
  #elif defined(__pnacl__)
  #define OPENSSL_32_BIT
  #define OPENSSL_PNACL
diff --git a/meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb b/meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb
index 83d3671016..129bb35bcc 100644
--- a/meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb
+++ b/meta-python/recipes-devtools/python/python3-grpcio_1.27.1.bb
@@ -9,6 +9,7 @@ DEPENDS += "${PYTHON_PN}-protobuf"
 SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch"
 SRC_URI_append_class-target = " file://ppc-boringssl-support.patch \
                                 file://riscv64_support.patch \
+                                file://0001-Fix-build-on-riscv32.patch \
 "
 SRC_URI[md5sum] = "ccaf4e7eb4f031d926fb80035d193b98"
 SRC_URI[sha256sum] = "a899725d34769a498ecd3be154021c4368dd22bdc69473f6ec46779696f626c4"
-- 
2.26.2


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

* [meta-networking][PATCH 5/6] waf: Add cross answers for riscv32
  2020-04-30  5:31 [meta-oe][PATCH 1/6] luajit: Disable on rv32 Khem Raj
                   ` (2 preceding siblings ...)
  2020-04-30  5:31 ` [meta-python][PATCH 4/6] python3-grpcio: Fix build with riscv32 Khem Raj
@ 2020-04-30  5:31 ` Khem Raj
  2020-04-30  5:31 ` [meta-gnome][PATCH 6/6] libnma: Fix build on riscv32 Khem Raj
  4 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2020-04-30  5:31 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../cross-answers-riscv32.txt                 | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 meta-networking/files/waf-cross-answers/cross-answers-riscv32.txt

diff --git a/meta-networking/files/waf-cross-answers/cross-answers-riscv32.txt b/meta-networking/files/waf-cross-answers/cross-answers-riscv32.txt
new file mode 100644
index 0000000000..759afe8f92
--- /dev/null
+++ b/meta-networking/files/waf-cross-answers/cross-answers-riscv32.txt
@@ -0,0 +1,41 @@
+Checking uname sysname type: "Linux"
+Checking uname version type: "# Wed May 20 10:34:39 UTC 2015"
+Checking simple C program: "hello world"
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: "1"
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: NO
+Checking for HAVE_IFACE_IFCONF: NO
+Checking for HAVE_IFACE_IFREQ: NO
+Checking for large file support without additional flags: NO
+Checking for -D_FILE_OFFSET_BITS=64: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
+Checking whether the WRFILE -keytab is supported: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether POSIX capabilities are available: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+vfs_fileid checking for statfs() and struct statfs.f_fsid: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: NO
+Checking whether the realpath function allows a NULL argument: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking for small off_t: NO
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking whether fcntl lock supports open file description locks: OK
+Checking for a 64-bit host to support lmdb: NO
-- 
2.26.2


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

* [meta-gnome][PATCH 6/6] libnma: Fix build on riscv32
  2020-04-30  5:31 [meta-oe][PATCH 1/6] luajit: Disable on rv32 Khem Raj
                   ` (3 preceding siblings ...)
  2020-04-30  5:31 ` [meta-networking][PATCH 5/6] waf: Add cross answers for riscv32 Khem Raj
@ 2020-04-30  5:31 ` Khem Raj
  4 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2020-04-30  5:31 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Khem Raj

Disable vapi which needs introspection

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta-gnome/recipes-connectivity/libnma/libnma_1.8.28.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta-gnome/recipes-connectivity/libnma/libnma_1.8.28.bb b/meta-gnome/recipes-connectivity/libnma/libnma_1.8.28.bb
index 8cb0bbc857..3b1698e72e 100644
--- a/meta-gnome/recipes-connectivity/libnma/libnma_1.8.28.bb
+++ b/meta-gnome/recipes-connectivity/libnma/libnma_1.8.28.bb
@@ -18,8 +18,9 @@ PACKAGECONFIG[gcr] = "-Dgcr=true,-Dgcr=false,gcr"
 PACKAGECONFIG[iso_codes] = "-Diso_codes=true,-Diso_codes=false,iso-codes,iso-codes"
 PACKAGECONFIG[mobile_broadband_provider_info] = "-Dmobile_broadband_provider_info=true,-Dmobile_broadband_provider_info=false,mobile-broadband-provider-info,mobile-broadband-provider-info"
 
-# go introspection is not supported for mipsn32, but vapi needs it
+# go introspection is not supported for mipsn32/riscv32, but vapi needs it
 #
 EXTRA_OEMESON_mipsarchn32_append = " -Dvapi=false"
+EXTRA_OEMESON_riscv32_append = " -Dvapi=false"
 
 GTKDOC_MESON_OPTION = "gtk_doc"
-- 
2.26.2


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

end of thread, other threads:[~2020-04-30  5:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30  5:31 [meta-oe][PATCH 1/6] luajit: Disable on rv32 Khem Raj
2020-04-30  5:31 ` [meta-oe][PATCH 2/6] abseil-cpp: Fix build on riscv32 Khem Raj
2020-04-30  5:31 ` [meta-oe][PATCH 3/6] rsyslog: Enable atomic builtins on rv32 Khem Raj
2020-04-30  5:31 ` [meta-python][PATCH 4/6] python3-grpcio: Fix build with riscv32 Khem Raj
2020-04-30  5:31 ` [meta-networking][PATCH 5/6] waf: Add cross answers for riscv32 Khem Raj
2020-04-30  5:31 ` [meta-gnome][PATCH 6/6] libnma: Fix build on riscv32 Khem Raj

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.