diff options
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-devtools')
4 files changed, 77 insertions, 1 deletions
diff --git a/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Fix-build-on-riscv32.patch new file mode 100644 index 000000000..e7c9b43c2 --- /dev/null +++ b/meta-openembedded/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-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb index 9a44133c5..e874e4a5e 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb +++ b/meta-openembedded/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" diff --git a/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_git.bb b/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_git.bb index c4f821648..cc9039416 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/luajit/luajit_git.bb +++ b/meta-openembedded/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" diff --git a/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.9.4.bb b/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.9.4.bb index cfe461b8d..c33fa048c 100644 --- a/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.9.4.bb +++ b/meta-openembedded/meta-oe/recipes-devtools/uftrace/uftrace_0.9.4.bb @@ -11,7 +11,7 @@ DEPENDS_append_libc-musl = " argp-standalone" inherit autotools # v0.9.4 -SRCREV = "5e422c0ec87b41d14e9ce8527983406718ef64e0" +SRCREV = "d648bbffedef529220896283fb59e35531c13804" SRC_URI = "git://github.com/namhyung/${BPN} \ " S = "${WORKDIR}/git" |