From 8754edd0ec2acb9adff6949db1f80e7fe51bd7e4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 24 Mar 2023 12:47:36 +0000 Subject: gentoo auto-resync : 24:03:2023 - 12:47:36 --- .../files/userspace-rcu-0.13.1-loong.patch | 3 ++ .../files/userspace-rcu-0.14.0-c11.patch | 61 ++++++++++++++++++++++ .../files/userspace-rcu-0.14.0-noreturn.patch | 51 ++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 dev-libs/userspace-rcu/files/userspace-rcu-0.14.0-c11.patch create mode 100644 dev-libs/userspace-rcu/files/userspace-rcu-0.14.0-noreturn.patch (limited to 'dev-libs/userspace-rcu/files') diff --git a/dev-libs/userspace-rcu/files/userspace-rcu-0.13.1-loong.patch b/dev-libs/userspace-rcu/files/userspace-rcu-0.13.1-loong.patch index 22daddedb61c..c21d2c02a105 100644 --- a/dev-libs/userspace-rcu/files/userspace-rcu-0.13.1-loong.patch +++ b/dev-libs/userspace-rcu/files/userspace-rcu-0.13.1-loong.patch @@ -1,6 +1,9 @@ This is https://github.com/loongarch64/userspace-rcu/pull/2, yet to be upstreamed but already reviewed and accepted by the LoongArch porting community. + +(and https://github.com/urcu/userspace-rcu/pull/11) + From 213197eea1a711da2f7cc0c04cdf33acb1b3c50e Mon Sep 17 00:00:00 2001 From: Wang Jing Date: Tue, 8 Jun 2021 19:44:49 +0800 diff --git a/dev-libs/userspace-rcu/files/userspace-rcu-0.14.0-c11.patch b/dev-libs/userspace-rcu/files/userspace-rcu-0.14.0-c11.patch new file mode 100644 index 000000000000..c931e052c432 --- /dev/null +++ b/dev-libs/userspace-rcu/files/userspace-rcu-0.14.0-c11.patch @@ -0,0 +1,61 @@ +https://github.com/urcu/userspace-rcu/commit/6fa8b4f80f1d2efbc90fc6d2a5fb0dc1d7fd2a19 + +From 6fa8b4f80f1d2efbc90fc6d2a5fb0dc1d7fd2a19 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= +Date: Fri, 17 Mar 2023 16:44:10 +0100 +Subject: [PATCH] Fix: use __noreturn__ for C11-compatibility +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The noreturn convenience macro provided by stdnoreturn.h might get +included before urcu headers, use __noreturn__ for better compatibility +with code using header. + +Signed-off-by: Ondřej Surý +Signed-off-by: Mathieu Desnoyers +--- a/include/urcu/uatomic/generic.h ++++ b/include/urcu/uatomic/generic.h +@@ -38,7 +38,7 @@ extern "C" { + #endif + + #if !defined __OPTIMIZE__ || defined UATOMIC_NO_LINK_ERROR +-static inline __attribute__((always_inline, noreturn)) ++static inline __attribute__((always_inline, __noreturn__)) + void _uatomic_link_error(void) + { + #ifdef ILLEGAL_INSTR +--- a/src/urcu-call-rcu-impl.h ++++ b/src/urcu-call-rcu-impl.h +@@ -1064,7 +1064,7 @@ void urcu_register_rculfhash_atfork(struct urcu_atfork *atfork) + * This unregistration function is deprecated, meant only for internal + * use by rculfhash. + */ +-__attribute__((noreturn)) ++__attribute__((__noreturn__)) + void urcu_unregister_rculfhash_atfork(struct urcu_atfork *atfork __attribute__((unused))) + { + urcu_die(EPERM); +--- a/tests/regression/rcutorture.h ++++ b/tests/regression/rcutorture.h +@@ -572,7 +572,7 @@ int stresstest(int nreaders) + */ + + static +-void usage(char *argv[]) __attribute__((noreturn)); ++void usage(char *argv[]) __attribute__((__noreturn__)); + + static + void usage(char *argv[]) +--- a/tests/utils/tap.h ++++ b/tests/utils/tap.h +@@ -41,7 +41,7 @@ __attribute__((format(TAP_PRINTF_FORMAT, 5, 6))) + unsigned int _gen_result(int, const char *, const char *, unsigned int, const char *, ...); + + int plan_no_plan(void); +-__attribute__((noreturn)) ++__attribute__((__noreturn__)) + int plan_skip_all(const char *); + int plan_tests(unsigned int); + + diff --git a/dev-libs/userspace-rcu/files/userspace-rcu-0.14.0-noreturn.patch b/dev-libs/userspace-rcu/files/userspace-rcu-0.14.0-noreturn.patch new file mode 100644 index 000000000000..c8798092f158 --- /dev/null +++ b/dev-libs/userspace-rcu/files/userspace-rcu-0.14.0-noreturn.patch @@ -0,0 +1,51 @@ +https://github.com/urcu/userspace-rcu/commit/106ed13754b1b836f4b59405f4e02aea4bf5eef0 + +From 106ed13754b1b836f4b59405f4e02aea4bf5eef0 Mon Sep 17 00:00:00 2001 +From: Michael Jeanson +Date: Thu, 23 Mar 2023 14:23:55 -0400 +Subject: [PATCH] fix: warning 'noreturn' function does return on ppc + +On a ppc64 system with gcc 9.5.0 I get the following error when building +with -O0 : + +/usr/include/urcu/uatomic/generic.h: In function 'void _uatomic_link_error()': +/usr/include/urcu/uatomic/generic.h:53:1: warning: 'noreturn' function does return + 53 | } + | ^ + +Split the inline function in 2 variants and apply the noreturn attribute +only on the builtin_trap one. + +Change-Id: I5ae8e764c4cc27af0463924a653b9eaa9f698c34 +Signed-off-by: Michael Jeanson +Signed-off-by: Mathieu Desnoyers +--- a/include/urcu/uatomic/generic.h ++++ b/include/urcu/uatomic/generic.h +@@ -38,19 +38,23 @@ extern "C" { + #endif + + #if !defined __OPTIMIZE__ || defined UATOMIC_NO_LINK_ERROR +-static inline __attribute__((always_inline, __noreturn__)) ++#ifdef ILLEGAL_INSTR ++static inline __attribute__((always_inline)) + void _uatomic_link_error(void) + { +-#ifdef ILLEGAL_INSTR + /* + * generate an illegal instruction. Cannot catch this with + * linker tricks when optimizations are disabled. + */ + __asm__ __volatile__(ILLEGAL_INSTR); ++} + #else ++static inline __attribute__((always_inline, __noreturn__)) ++void _uatomic_link_error(void) ++{ + __builtin_trap(); +-#endif + } ++#endif + + #else /* #if !defined __OPTIMIZE__ || defined UATOMIC_NO_LINK_ERROR */ + extern void _uatomic_link_error(void); + -- cgit v1.2.3