pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/cyclone{,-bootstrap}: fix building with GCC-14.3



Module Name:	pkgsrc-wip
Committed By:	Yorick Hardy <yorickhardy%gmail.com@localhost>
Pushed By:	yhardy
Date:		Sat Dec 27 21:30:35 2025 +0000
Changeset:	3db699008ab9e778c96619eaad44b8d2c4c62e3c

Modified Files:
	cyclone-bootstrap/distinfo
	cyclone-bootstrap/patches/patch-Makefile.config
	cyclone/distinfo
	cyclone/patches/patch-Makefile.config
Added Files:
	cyclone-bootstrap/patches/patch-gc.c
	cyclone/patches/patch-gc.c

Log Message:
wip/cyclone{,-bootstrap}: fix building with GCC-14.3

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3db699008ab9e778c96619eaad44b8d2c4c62e3c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 cyclone-bootstrap/distinfo                      |  3 ++-
 cyclone-bootstrap/patches/patch-Makefile.config | 12 ++++++++++++
 cyclone-bootstrap/patches/patch-gc.c            | 22 ++++++++++++++++++++++
 cyclone/distinfo                                |  3 ++-
 cyclone/patches/patch-Makefile.config           | 12 ++++++++++++
 cyclone/patches/patch-gc.c                      | 22 ++++++++++++++++++++++
 6 files changed, 72 insertions(+), 2 deletions(-)

diffs:
diff --git a/cyclone-bootstrap/distinfo b/cyclone-bootstrap/distinfo
index f56043647e..2756b39d4a 100644
--- a/cyclone-bootstrap/distinfo
+++ b/cyclone-bootstrap/distinfo
@@ -4,5 +4,6 @@ BLAKE2s (cyclone-bootstrap/v0.36.0.tar.gz) = 24afeaa923381ea26a001f720556429a292
 SHA512 (cyclone-bootstrap/v0.36.0.tar.gz) = 477534602baa4acbae0450e664617ad70302a79c552005741080c4e4d2993805ff1d25703bd2c43c82764a477a4b26fb4b88c8787a82e99fa5a6fc88d9f914f2
 Size (cyclone-bootstrap/v0.36.0.tar.gz) = 3967729 bytes
 SHA1 (patch-Makefile) = ba2033dda259957f2a5f86f786888621193cc51c
-SHA1 (patch-Makefile.config) = b9da31fed22a76dbe5882e0f78818f9f8e279687
+SHA1 (patch-Makefile.config) = 26e1276fdf8084327ecd883e62c838fbc3437e07
+SHA1 (patch-gc.c) = 5d7a663c77a19d2feb3c669e7fab6770fb5c54f4
 SHA1 (patch-include_cyclone_types.h) = 22f4ac2fd4cfb63729d5620006dc40143cf2a09b
diff --git a/cyclone-bootstrap/patches/patch-Makefile.config b/cyclone-bootstrap/patches/patch-Makefile.config
index 83b66e497d..be49a91cbc 100644
--- a/cyclone-bootstrap/patches/patch-Makefile.config
+++ b/cyclone-bootstrap/patches/patch-Makefile.config
@@ -2,6 +2,7 @@ $NetBSD$
 
 1) Set the RPATH when creating executables and shared libraries.
 2) Use pkgsrc libtommath instead of cyclone libtommath (cyclonebn).
+3) Fix the tests for open_memstream and fmemopen.
 
 --- Makefile.config.orig	2024-02-14 02:29:41.000000000 +0000
 +++ Makefile.config
@@ -29,3 +30,14 @@ $NetBSD$
  # /usr/local is not in the search path by default on FreeBSD, so if libtommath and/or 
  # concurrencykit was installed via Ports, it won't be picked up without explicitly looking
  # for it here
+@@ -91,8 +97,8 @@ DESTDIR   ?=
+ 
+ # Automatically detect platform-specific flags, instead of using autoconf
+ #CYC_PLATFORM_HAS_MEMSTREAM ?= 1
+-CYC_PLATFORM_HAS_MEMSTREAM := $(shell echo "main(){char *buf; int len; open_memstream(&buf, &len);}" | $(CC) -xc - >/dev/null 2>/dev/null && echo 1 || echo 0)
+-CYC_PLATFORM_HAS_FMEMOPEN := $(shell echo "main(){char *buf; fmemopen(&buf, 0, \"r\");}" | $(CC) -xc - >/dev/null 2>/dev/null && echo 1 || echo 0)
++CYC_PLATFORM_HAS_MEMSTREAM := $(shell echo "int main(){char *buf; int len; open_memstream(&buf, &len);}" | $(CC) -xc -include stdio.h - >/dev/null 2>/dev/null && echo 1 || echo 0)
++CYC_PLATFORM_HAS_FMEMOPEN := $(shell echo "int main(){char *buf; fmemopen(&buf, 0, \"r\");}" | $(CC) -xc -include stdio.h - >/dev/null 2>/dev/null && echo 1 || echo 0)
+ 
+ # code from chibi's makefile to detect platform
+ ifndef PLATFORM
diff --git a/cyclone-bootstrap/patches/patch-gc.c b/cyclone-bootstrap/patches/patch-gc.c
new file mode 100644
index 0000000000..b92e7b600b
--- /dev/null
+++ b/cyclone-bootstrap/patches/patch-gc.c
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Concurrencykit returns an integer as a pointer here, and the warning
+-Wint-conversion results in a compiler error. Concurrencykit is
+choosing an integer size to match the pointer size (using implementations
+which are per-compiler/architecture), so just cast to (void*) to
+give a valid pointer type for ck_pr_add_ptr.
+
+--- gc.c.orig	2025-12-27 10:58:55.457517996 +0000
++++ gc.c
+@@ -2763,9 +2763,9 @@ void gc_merge_all_heaps(gc_thread_data *
+     if (hdest && hsrc) {
+       gc_heap_merge(hdest, hsrc);
+       ck_pr_add_ptr(&(dest->cached_heap_total_sizes[heap_type]),
+-                    ck_pr_load_ptr(&(src->cached_heap_total_sizes[heap_type])));
++                    (void*)ck_pr_load_ptr(&(src->cached_heap_total_sizes[heap_type])));
+       ck_pr_add_ptr(&(dest->cached_heap_free_sizes[heap_type]),
+-                    ck_pr_load_ptr(&(src->cached_heap_free_sizes[heap_type])));
++                    (void*)ck_pr_load_ptr(&(src->cached_heap_free_sizes[heap_type])));
+     }
+   }
+   ck_pr_add_int(&(dest->heap_num_huge_allocations),
diff --git a/cyclone/distinfo b/cyclone/distinfo
index 8a336bb627..b6a88d6657 100644
--- a/cyclone/distinfo
+++ b/cyclone/distinfo
@@ -4,8 +4,9 @@ BLAKE2s (cyclone-0.36.0.tar.gz) = 1777c4452a676b992c0b5ed968cd6b72b358fbd5517e72
 SHA512 (cyclone-0.36.0.tar.gz) = 6dfa3ff80b1a8397608483e6d914c25b1fee521d620991fb70f1bcf77303d290477100cbd82fbd9c939b5f2c91f72240f58711d9ab023721c15c8ad9b15998fd
 Size (cyclone-0.36.0.tar.gz) = 5237987 bytes
 SHA1 (patch-Makefile) = d5e8d8a25d9472601708778ec9e220a987da4128
-SHA1 (patch-Makefile.config) = 1cb1559cbe9779d5fa8bda998db14951af99716a
+SHA1 (patch-Makefile.config) = b62fb06268ee9dc327ba9d9f75550c70fb2e4bb6
 SHA1 (patch-cyclone.scm) = e624dd62369d92b88501f8770d3504e78e311321
+SHA1 (patch-gc.c) = 5d7a663c77a19d2feb3c669e7fab6770fb5c54f4
 SHA1 (patch-include_cyclone_types.h) = caf0f87ec67d42aad59d7041c50de12fac20c932
 SHA1 (patch-issue-560) = 8c46b08f5741622de75d26af6920d1f5ba31b39a
 SHA1 (patch-scheme_base.sld) = b9aaeb494572eb4fddecf25d30eae7cafe77163f
diff --git a/cyclone/patches/patch-Makefile.config b/cyclone/patches/patch-Makefile.config
index e4fdc9302e..53724c7150 100644
--- a/cyclone/patches/patch-Makefile.config
+++ b/cyclone/patches/patch-Makefile.config
@@ -2,6 +2,7 @@ $NetBSD$
 
 1) Set the RPATH when creating executables and shared libraries.
 2) Use pkgsrc libtommath instead of cyclone libtommath (cyclonebn).
+3) Fix the tests for open_memstream and fmemopen.
 
 --- Makefile.config.orig	2024-02-14 02:31:23.000000000 +0000
 +++ Makefile.config
@@ -26,3 +27,14 @@ $NetBSD$
  # /usr/local is not in the search path by default on FreeBSD, so if libtommath and/or 
  # concurrencykit was installed via Ports, it won't be picked up without explicitly looking
  # for it here
+@@ -91,8 +94,8 @@ DESTDIR   ?=
+ 
+ # Automatically detect platform-specific flags, instead of using autoconf
+ #CYC_PLATFORM_HAS_MEMSTREAM ?= 1
+-CYC_PLATFORM_HAS_MEMSTREAM := $(shell echo "main(){char *buf; int len; open_memstream(&buf, &len);}" | $(CC) -xc - >/dev/null 2>/dev/null && echo 1 || echo 0)
+-CYC_PLATFORM_HAS_FMEMOPEN := $(shell echo "main(){char *buf; fmemopen(&buf, 0, \"r\");}" | $(CC) -xc - >/dev/null 2>/dev/null && echo 1 || echo 0)
++CYC_PLATFORM_HAS_MEMSTREAM := $(shell echo "int main(){char *buf; int len; open_memstream(&buf, &len);}" | $(CC) -xc -include stdio.h - >/dev/null 2>/dev/null && echo 1 || echo 0)
++CYC_PLATFORM_HAS_FMEMOPEN := $(shell echo "int main(){char *buf; fmemopen(&buf, 0, \"r\");}" | $(CC) -xc -include stdio.h - >/dev/null 2>/dev/null && echo 1 || echo 0)
+ 
+ # code from chibi's makefile to detect platform
+ ifndef PLATFORM
diff --git a/cyclone/patches/patch-gc.c b/cyclone/patches/patch-gc.c
new file mode 100644
index 0000000000..b92e7b600b
--- /dev/null
+++ b/cyclone/patches/patch-gc.c
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Concurrencykit returns an integer as a pointer here, and the warning
+-Wint-conversion results in a compiler error. Concurrencykit is
+choosing an integer size to match the pointer size (using implementations
+which are per-compiler/architecture), so just cast to (void*) to
+give a valid pointer type for ck_pr_add_ptr.
+
+--- gc.c.orig	2025-12-27 10:58:55.457517996 +0000
++++ gc.c
+@@ -2763,9 +2763,9 @@ void gc_merge_all_heaps(gc_thread_data *
+     if (hdest && hsrc) {
+       gc_heap_merge(hdest, hsrc);
+       ck_pr_add_ptr(&(dest->cached_heap_total_sizes[heap_type]),
+-                    ck_pr_load_ptr(&(src->cached_heap_total_sizes[heap_type])));
++                    (void*)ck_pr_load_ptr(&(src->cached_heap_total_sizes[heap_type])));
+       ck_pr_add_ptr(&(dest->cached_heap_free_sizes[heap_type]),
+-                    ck_pr_load_ptr(&(src->cached_heap_free_sizes[heap_type])));
++                    (void*)ck_pr_load_ptr(&(src->cached_heap_free_sizes[heap_type])));
+     }
+   }
+   ck_pr_add_int(&(dest->heap_num_huge_allocations),


Home | Main Index | Thread Index | Old Index