git: ec4c6e9a74cf - main - devel/rubygem-concurrent-ruby-ext: Fix build with Clang 15 and remove the workaround
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Jun 2023 07:22:11 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=ec4c6e9a74cf31f3279bd64609078e5aa833334e
commit ec4c6e9a74cf31f3279bd64609078e5aa833334e
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-06-30 07:07:05 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-06-30 07:07:05 +0000
devel/rubygem-concurrent-ruby-ext: Fix build with Clang 15 and remove the workaround
atomic_reference.c:108:53: error: incompatible integer to pointer conversion passing 'VALUE' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
if (__sync_bool_compare_and_swap(&DATA_PTR(self), expect_value, new_value)) {
^~~~~~~~~~~~
atomic_reference.c:108:67: error: incompatible integer to pointer conversion passing 'VALUE' (aka 'unsigned long') to parameter of type 'void *' [-Wint-conversion]
if (__sync_bool_compare_and_swap(&DATA_PTR(self), expect_value, new_value)) {
^~~~~~~~~
2 errors generated.
---
devel/rubygem-concurrent-ruby-ext/Makefile | 6 ------
devel/rubygem-concurrent-ruby-ext/files/patch-clang15 | 11 +++++++++++
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/devel/rubygem-concurrent-ruby-ext/Makefile b/devel/rubygem-concurrent-ruby-ext/Makefile
index 90cda04607c3..e2f16ba8293f 100644
--- a/devel/rubygem-concurrent-ruby-ext/Makefile
+++ b/devel/rubygem-concurrent-ruby-ext/Makefile
@@ -14,10 +14,4 @@ RUN_DEPENDS= rubygem-concurrent-ruby>=${PORTVERSION}<${PORTVERSION}_99:devel/rub
USES= gem
-.include <bsd.port.options.mk>
-
-.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 ))
-CONFIGURE_ARGS+= --with-cflags="-Wno-error=int-conversion"
-.endif
-
.include <bsd.port.mk>
diff --git a/devel/rubygem-concurrent-ruby-ext/files/patch-clang15 b/devel/rubygem-concurrent-ruby-ext/files/patch-clang15
new file mode 100644
index 000000000000..6dc21f68ba35
--- /dev/null
+++ b/devel/rubygem-concurrent-ruby-ext/files/patch-clang15
@@ -0,0 +1,11 @@
+--- ext/concurrent-ruby-ext/atomic_reference.c.orig 2023-06-13 15:43:55 UTC
++++ ext/concurrent-ruby-ext/atomic_reference.c
+@@ -105,7 +105,7 @@ VALUE ir_compare_and_set(volatile VALUE self, VALUE ex
+ return Qtrue;
+ }
+ #else
+- if (__sync_bool_compare_and_swap(&DATA_PTR(self), expect_value, new_value)) {
++ if (__sync_bool_compare_and_swap(&DATA_PTR(self), (void *) expect_value, (void *) new_value)) {
+ return Qtrue;
+ }
+ #endif