summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2024-03-06 07:42:13 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-07 17:25:02 +0000
commit5406ff0bc60cbc026d36cb3458c5913faf0f1017 (patch)
tree6c5dee532222b7b74a9acfd3a1f0165ae0d28e88
parentc6819eaaa7532a33c6d966c77d524e076df2446b (diff)
downloadpoky-5406ff0bc60cbc026d36cb3458c5913faf0f1017.tar.gz
libusb1: upgrade 1.0.26 -> 1.0.27
(From OE-Core rev: 4d371bc44735c4e30f454b3522f785df6687a164) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/libusb/libusb1/0001-configure.ac-Link-with-latomic-only-if-no-atomic-bui.patch46
-rw-r--r--meta/recipes-support/libusb/libusb1_1.0.27.bb (renamed from meta/recipes-support/libusb/libusb1_1.0.26.bb)7
2 files changed, 3 insertions, 50 deletions
diff --git a/meta/recipes-support/libusb/libusb1/0001-configure.ac-Link-with-latomic-only-if-no-atomic-bui.patch b/meta/recipes-support/libusb/libusb1/0001-configure.ac-Link-with-latomic-only-if-no-atomic-bui.patch
deleted file mode 100644
index 3c223e0822..0000000000
--- a/meta/recipes-support/libusb/libusb1/0001-configure.ac-Link-with-latomic-only-if-no-atomic-bui.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From 95e601ce116dd46ea7915c171976b85ea0905d58 Mon Sep 17 00:00:00 2001
2From: Lonnie Abelbeck <lonnie@abelbeck.com>
3Date: Sun, 8 May 2022 14:05:56 -0500
4Subject: [PATCH] configure.ac: Link with -latomic only if no atomic builtins
5
6Follow-up to 561dbda, a check of GCC atomic builtins needs to be done
7first.
8
9I'm no autoconf guru, but using this:
10https://github.com/mesa3d/mesa/blob/0df485c285b73c34ba9062f0c27e55c3c702930d/configure.ac#L469
11as inspiration, I created a pre-check before calling AC_SEARCH_LIBS(...)
12
13Fixes #1135
14Closes #1139
15Upstream-Status: Backport [https://github.com/kraj/libusb/commit/95e601ce116dd46ea7915c171976b85ea0905d58]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 configure.ac | 16 +++++++++++++++-
19 libusb/version_nano.h | 2 +-
20 2 files changed, 16 insertions(+), 2 deletions(-)
21
22--- a/configure.ac
23+++ b/configure.ac
24@@ -153,7 +153,21 @@ if test "x$platform" = xposix; then
25 AC_SEARCH_LIBS([pthread_create], [pthread],
26 [test "x$ac_cv_search_pthread_create" != "xnone required" && AC_SUBST(THREAD_LIBS, [-lpthread])],
27 [], [])
28- AC_SEARCH_LIBS([__atomic_fetch_add_4], [atomic])
29+ dnl Check for new-style atomic builtins. We first check without linking to -latomic.
30+ AC_MSG_CHECKING(whether __atomic_load_n is supported)
31+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
32+ #include <stdint.h>
33+ int main() {
34+ struct {
35+ uint64_t *v;
36+ } x;
37+ return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
38+ (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
39+ }]])], GCC_ATOMIC_BUILTINS_SUPPORTED=yes, GCC_ATOMIC_BUILTINS_SUPPORTED=no)
40+ AC_MSG_RESULT($GCC_ATOMIC_BUILTINS_SUPPORTED)
41+ if test "x$GCC_ATOMIC_BUILTINS_SUPPORTED" != xyes; then
42+ AC_SEARCH_LIBS([__atomic_fetch_add_4], [atomic])
43+ fi
44 elif test "x$platform" = xwindows; then
45 AC_DEFINE([PLATFORM_WINDOWS], [1], [Define to 1 if compiling for a Windows platform.])
46 else
diff --git a/meta/recipes-support/libusb/libusb1_1.0.26.bb b/meta/recipes-support/libusb/libusb1_1.0.27.bb
index 2af6fcdea7..f2431d75c8 100644
--- a/meta/recipes-support/libusb/libusb1_1.0.26.bb
+++ b/meta/recipes-support/libusb/libusb1_1.0.27.bb
@@ -11,14 +11,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
11BBCLASSEXTEND = "native nativesdk" 11BBCLASSEXTEND = "native nativesdk"
12 12
13SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libusb-${PV}.tar.bz2 \ 13SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libusb-${PV}.tar.bz2 \
14 file://0001-configure.ac-Link-with-latomic-only-if-no-atomic-bui.patch \
15 file://run-ptest \ 14 file://run-ptest \
16 " 15 "
17 16
18GITHUB_BASE_URI = "https://github.com/libusb/libusb/releases" 17GITHUB_BASE_URI = "https://github.com/libusb/libusb/releases"
19UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$" 18UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$"
20 19
21SRC_URI[sha256sum] = "12ce7a61fc9854d1d2a1ffe095f7b5fac19ddba095c259e6067a46500381b5a5" 20SRC_URI[sha256sum] = "ffaa41d741a8a3bee244ac8e54a72ea05bf2879663c098c82fc5757853441575"
22 21
23S = "${WORKDIR}/libusb-${PV}" 22S = "${WORKDIR}/libusb-${PV}"
24 23
@@ -41,7 +40,7 @@ do_compile_ptest() {
41} 40}
42 41
43do_install_ptest() { 42do_install_ptest() {
44 install -m 755 ${B}/tests/.libs/stress ${D}${PTEST_PATH} 43 install -m 755 ${B}/tests/stress ${D}${PTEST_PATH}
45} 44}
46 45
47FILES:${PN} += "${base_libdir}/*.so.*" 46FILES:${PN} += "${base_libdir}/*.so.*"