Skip to contentSkip to conversation

fatcat: Enable 64bit off_t

PATCH New Khem Raj 1 participant 3 messages Dec 18, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 fatcat: Enable 64bit off_t

Replace lseek64 with lseek
Update patch status accordingly

---
 ...d.h-not-argp.h-for-all-POSIX-systems.patch |  2 +-
 .../fatcat/0002-Enable-64bit-off_t.patch      | 71 +++++++++++++++++++
 .../recipes-utils/fatcat/fatcat_1.1.1.bb      |  1 +
 3 files changed, 73 insertions(+), 1 deletion(-)
 create mode 100644 meta-filesystems/recipes-utils/fatcat/fatcat/0002-Enable-64bit-off_t.patch
meta-filesystems/recipes-utils/fatcat/fatcat/0001-Use-unistd.h-not-argp.h-for-all-POSIX-systems.patch +1 -1
index fd8e22abca..7e215e3080 100644
@@ -8,8 +8,8 @@ of any of the GNU specific argp extensions. Include unistd.h directly to
 allow building with musl on linux, whilst retaining compatibility with
 glibc and other unices.
 
+Upstream-status: Submitted [https://github.com/Gregwar/fatcat/pull/34]
 Signed-off-by: Alex Kiernan <[email protected]>
-Upstream-status: Pending
 ---
  src/fatcat.cpp | 8 ++------
  1 file changed, 2 insertions(+), 6 deletions(-)
meta-filesystems/recipes-utils/fatcat/fatcat/0002-Enable-64bit-off_t.patch new file +71 -0

71 lines not on this page · raw message

meta-filesystems/recipes-utils/fatcat/fatcat_1.1.1.bb +1 -0
index e344eda154..982a52d62f 100644
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=57fbbfebd0dd1d6ff21b8cecb552a03f"
 
 SRC_URI = "git://github.com/Gregwar/fatcat.git;branch=master;protocol=https \
            file://0001-Use-unistd.h-not-argp.h-for-all-POSIX-systems.patch \
+           file://0002-Enable-64bit-off_t.patch \
            "
 
 SRCREV = "99cb99fc86eb1601ac7ae27f5bba23add04d2543"
Signature · 1 line
2.39.0
author
#1 lore raw

PATCH 2/3 stressapptest: Fix build with largefile support and musl

Update status of patches as they are submitted upstream

---
 .../0001-configure-Add-with-cpu.patch         |  37 +++++++
 ...-Replace-lfs64-functions-and-defines.patch | 103 ++++++++++++++++++
 ...for-pthread_rwlockattr_setkind_np-be.patch |  43 ++++++++
 .../stressapptest/libcplusplus-compat.patch   |   2 +-
 .../read_sysfs_for_cachesize.patch            |   2 +-
 .../stressapptest/stressapptest_1.0.9.bb      |  10 +-
 6 files changed, 194 insertions(+), 3 deletions(-)
 create mode 100644 meta-oe/recipes-benchmark/stressapptest/stressapptest/0001-configure-Add-with-cpu.patch
 create mode 100644 meta-oe/recipes-benchmark/stressapptest/stressapptest/0002-Replace-lfs64-functions-and-defines.patch
 create mode 100644 meta-oe/recipes-benchmark/stressapptest/stressapptest/0003-configure-Check-for-pthread_rwlockattr_setkind_np-be.patch
meta-oe/recipes-benchmark/stressapptest/stressapptest/0001-configure-Add-with-cpu.patch new file +37 -0
new file mode 100644
index 0000000000..41fb456c6c
@@ -0,0 +1,37 @@
+From 73049e5a9e3698cc6d51471d70ac5e06bed803cc Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 17 Dec 2022 10:24:48 -0800
+Subject: [PATCH] configure: Add --with-cpu
+
+Some cross build systems e.g. yocto may use architectures different from cross compiler target tuple
+arm-yoe-gnueabi but build for armv7a, AC_CANONICAL_HOST will fail in
+this case even though target will be armv7a it will detect it as arm and
+disable armv7a specific optimization paths. This option provides the
+needed knob so it can be set explicitly e.g. --with-cpu=armv7a etc. if needed.
+
+Upstream-Status: Submitted [https://github.com/stressapptest/stressapptest/pull/100]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ configure.ac | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c839c87..403728c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -11,7 +11,14 @@ else
+   AC_MSG_NOTICE([Compiling with dynamically linked libraries.])
+ fi
+ 
+-AC_CANONICAL_HOST
++AC_ARG_WITH(cpu, [  --with-cpu            define host cpu])
++
++if test -z "$with_cpu"
++then
++  AC_CANONICAL_HOST
++else
++  host_cpu=$with_cpu
++fi
+ # Checking for target cpu and setting custom configuration
+ # for the different platforms
+ AS_CASE(["$host_cpu"],
meta-oe/recipes-benchmark/stressapptest/stressapptest/0002-Replace-lfs64-functions-and-defines.patch new file +103 -0

103 lines not on this page · raw message

meta-oe/recipes-benchmark/stressapptest/stressapptest/0003-configure-Check-for-pthread_rwlockattr_setkind_np-be.patch new file +43 -0

43 lines not on this page · raw message

meta-oe/recipes-benchmark/stressapptest/stressapptest/libcplusplus-compat.patch +1 -1
index f5e7da359d..8754e40697 100644
@@ -11,7 +11,7 @@ Fixes
 ./sattypes.h:33:17: error: expected namespace name
 using namespace __gnu_cxx; //NOLINT
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/stressapptest/stressapptest/pull/100]
 Signed-off-by: Khem Raj <[email protected]>
 
 --- stressapptest-1.0.9.orig/src/sattypes.h
meta-oe/recipes-benchmark/stressapptest/stressapptest/read_sysfs_for_cachesize.patch +1 -1
index 8c251aeb97..19261657ac 100644
@@ -2,7 +2,7 @@ sysconf params like _SC_LEVEL1_DCACHE_LINESIZE are not universally
 implemented, therefore check for them being available, if not there
 then read the sysfs directly to get the value
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://github.com/stressapptest/stressapptest/pull/100]
 Signed-off-by: Khem Raj <[email protected]>
 --- a/src/sat.cc
 +++ b/src/sat.cc
meta-oe/recipes-benchmark/stressapptest/stressapptest_1.0.9.bb +9 -1
index c8b9ca7cb9..02144c558a 100644
@@ -13,10 +13,18 @@ SRCREV = "9146a8bfe3e3daefa95f7a61b75183e5fc64af2c"
 
 PV .= "+1.0.10git${SRCPV}"
 
+EXTRA_AUTOCONF:append:armv7a = " --with-cpu=armv7a"
+EXTRA_AUTOCONF:append:armv7ve = " --with-cpu=armv7a"
+
+GI_DATA_ENABLED:libc-musl:armv7a = "False"
+GI_DATA_ENABLED:libc-musl:armv7ve = "False"
 SRC_URI = "git://github.com/stressapptest/stressapptest;branch=master;protocol=https \
            file://libcplusplus-compat.patch \
            file://read_sysfs_for_cachesize.patch \
-          "
+           file://0001-configure-Add-with-cpu.patch \
+           file://0002-Replace-lfs64-functions-and-defines.patch \
+           file://0003-configure-Check-for-pthread_rwlockattr_setkind_np-be.patch \
+           "
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.39.0
author
#2 lore raw

PATCH 3/3 nspr: Upgrade to 4.35

In reply to Khem Raj

Use -D_PR_HAVE_LARGE_OFF_T instead of -D_PR_HAVE_OFF64_T on musl Drop remove-srcdir-from-configure-in.patch its fixed upstream

---
 .../nspr/0001-md-Fix-build-with-musl.patch    | 17 +++-----
 .../nspr/nspr/0002-Add-nios2-support.patch    | 39 +++++++------------
 .../remove-srcdir-from-configure-in.patch     | 19 ---------
 .../nspr/{nspr_4.29.bb => nspr_4.35.bb}       |  8 ++--
 4 files changed, 21 insertions(+), 62 deletions(-)
 delete mode 100644 meta-oe/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch
 rename meta-oe/recipes-support/nspr/{nspr_4.29.bb => nspr_4.35.bb} (93%)
meta-oe/recipes-support/nspr/nspr/0001-md-Fix-build-with-musl.patch +5 -12
index d2b9bf6420..09855a03dc 100644
@@ -1,4 +1,4 @@
-From 147f3c2acbd96d44025cec11800ded0282327764 Mon Sep 17 00:00:00 2001
+From 5f6fcaeb0b7a319c8afd32ddb48b3515b63a6c0c Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Mon, 18 Sep 2017 17:22:43 -0700
 Subject: [PATCH] md: Fix build with musl
@@ -6,24 +6,17 @@ Subject: [PATCH] md: Fix build with musl
 The MIPS specific header <sgidefs.h> is not provided by musl
 linux kernel headers provide <asm/sgidefs.h> which has same definitions
 
-Signed-off-by: Khem Raj <[email protected]>
----
 Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
 
+---
  pr/include/md/_linux.cfg | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
+index aa3af78..899826f 100644
 --- a/pr/include/md/_linux.cfg
 +++ b/pr/include/md/_linux.cfg
-@@ -499,7 +499,7 @@
- #elif defined(__mips__)
- 
- /* For _ABI64 */
--#include <sgidefs.h>
-+#include <asm/sgidefs.h>
- 
- #ifdef __MIPSEB__
- #define IS_BIG_ENDIAN 1
 @@ -511,7 +511,7 @@
  #error "Unknown MIPS endianness."
  #endif
meta-oe/recipes-support/nspr/nspr/0002-Add-nios2-support.patch +13 -26
index 3a04d426a8..dab2a4e291 100644
@@ -1,4 +1,4 @@
-From 95bda64fb4cf1825fea745e918cfe8202843f0ba Mon Sep 17 00:00:00 2001
+From 4760065a58153e4dae24e4e437a5136592c624bc Mon Sep 17 00:00:00 2001
 From: Marek Vasut <[email protected]>
 Date: Sat, 30 Jan 2016 07:18:02 +0100
 Subject: [PATCH] Add nios2 support
@@ -7,15 +7,14 @@ Add support for the nios2 CPU.
 
 Signed-off-by: Marek Vasut <[email protected]>
 Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1244421 ]
+
 ---
- nspr/pr/include/md/_linux.cfg | 45 +++++++++++++++++++++++++++++++++++++++++++
- nspr/pr/include/md/_linux.h   | 14 ++++++++++++++
- 2 files changed, 59 insertions(+)
+ pr/include/md/_linux.cfg | 45 +++++++++++++++++++++++++++++++++++
+ pr/include/md/_linux.h   |  4 +++-
+ 2 files changed, 48 insertions(+), 1 deletion(-)
 
-Index: nspr/pr/include/md/_linux.cfg
-===================================================================
---- nspr.orig/pr/include/md/_linux.cfg
-+++ nspr/pr/include/md/_linux.cfg
+--- a/pr/include/md/_linux.cfg
++++ b/pr/include/md/_linux.cfg
 @@ -975,6 +975,51 @@
  #define PR_BYTES_PER_WORD_LOG2   2
  #define PR_BYTES_PER_DWORD_LOG2  3
@@ -68,10 +67,8 @@ Index: nspr/pr/include/md/_linux.cfg
  #elif defined(__or1k__)
  
  #undef  IS_LITTLE_ENDIAN
-Index: nspr/pr/include/md/_linux.h
-===================================================================
---- nspr.orig/pr/include/md/_linux.h
-+++ nspr/pr/include/md/_linux.h
+--- a/pr/include/md/_linux.h
++++ b/pr/include/md/_linux.h
 @@ -55,6 +55,8 @@
  #define _PR_SI_ARCHITECTURE "avr32"
  #elif defined(__m32r__)
@@ -81,22 +78,12 @@ Index: nspr/pr/include/md/_linux.h
  #elif defined(__or1k__)
  #define _PR_SI_ARCHITECTURE "or1k"
  #elif defined(__riscv) && (__riscv_xlen == 32)
-@@ -129,6 +131,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRIn
+@@ -143,7 +145,7 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRIn
  #define _MD_ATOMIC_SET                _PR_x86_64_AtomicSet
  #endif
  
-+#if defined(__nios2__)
-+#if defined(__GNUC__)
-+/* Use GCC built-in functions */
-+#define _PR_HAVE_ATOMIC_OPS
-+#define _MD_INIT_ATOMIC()
-+#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
-+#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
-+#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
-+#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
-+#endif
-+#endif
-+
- #if defined(__or1k__)
+-#if defined(__loongarch__)
++#if defined(__loongarch__) || defined(__nios2__)
  #if defined(__GNUC__)
  /* Use GCC built-in functions */
+ #define _PR_HAVE_ATOMIC_OPS
meta-oe/recipes-support/nspr/nspr/remove-srcdir-from-configure-in.patch deleted +0 -19
deleted file mode 100644
index bde715c5dc..0000000000
@@ -1,19 +0,0 @@
-the $srcdir is not defined at the time of gnu-configurize.
-
-Upstream-Status: Inappropriate [OE-Core specific]
-
-Signed-off-by: Saul Wold <[email protected]>
-
-Index: nspr/configure.in
-===================================================================
---- nspr.orig/configure.in
-+++ nspr/configure.in
-@@ -8,7 +8,7 @@ AC_PREREQ(2.61)
- AC_INIT
- AC_CONFIG_SRCDIR([pr/include/nspr.h])
- 
--AC_CONFIG_AUX_DIR(${srcdir}/build/autoconf)
-+AC_CONFIG_AUX_DIR(build/autoconf)
- AC_CANONICAL_TARGET
- 
- dnl ========================================================
meta-oe/recipes-support/nspr/nspr_4.35.bb renamed from meta-oe/recipes-support/nspr/nspr_4.29.bb +3 -5
similarity index 93%
rename from meta-oe/recipes-support/nspr/nspr_4.29.bb
rename to meta-oe/recipes-support/nspr/nspr_4.35.bb
index 92c5234c34..c8cb618bc9 100644
@@ -8,24 +8,22 @@ SECTION = "libs/network"
 SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
            file://remove-rpath-from-tests.patch \
            file://fix-build-on-x86_64.patch \
-           file://remove-srcdir-from-configure-in.patch \
            file://0002-Add-nios2-support.patch \
            file://0001-md-Fix-build-with-musl.patch \
            file://Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch \
            file://0001-config-nspr-config.in-don-t-pass-LDFLAGS.patch \
            file://nspr.pc.in \
-"
+           "
 
 CACHED_CONFIGUREVARS:append:libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
-                                          -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
+                                          -D_PR_HAVE_LARGE_OFF_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
                                           -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
                                           -D_PR_INET6_PROBE -DNO_DLOPEN_NULL'"
 
 UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
 UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
 
-SRC_URI[md5sum] = "a546926d3c8e887be02c668c1293da92"
-SRC_URI[sha256sum] = "22286bdb8059d74632cc7c2865c139e63953ecfb33bf4362ab58827e86e92582"
+SRC_URI[sha256sum] = "7ea3297ea5969b5d25a5dd8d47f2443cda88e9ee746301f6e1e1426f8a6abc8f"
 
 CVE_PRODUCT = "netscape_portable_runtime"
 
Signature · 1 line
2.39.0