From 38ca840a8bb4db0406c087672a60b45f7e893f5c Mon Sep 17 00:00:00 2001 From: Camm Maguire Date: Fri, 7 Mar 2025 11:04:42 -0500 Subject: [PATCH] Bug-Debian: https://bugs.debian.org/1096165 Bug-Debian: https://bugs.debian.org/1096684 TODO: Put a short summary on the line above and replace this paragraph with a longer explanation of this change. Complete the meta-information with other relevant fields (see below for details). To make it easier, the information below has been extracted from the changelog. Adjust it or drop it. gcl (2.6.14-17) unstable; urgency=medium * Version_2_6_15pre16 * Bug fix: "ftbfs with GCC-15", thanks to Matthias Klose (Closes: #1096684). * Bug fix: "outdated debconf version constraint; inhibits support for debconf-2.0/cdebconf", thanks to Gioele Barabucci (Closes: #1096165). Gbp-Pq: Name Version_2_6_15pre16 --- configure | 1 + configure.in | 1 + git.tag | 2 +- h/386-gnu.h | 8 ++++++-- h/mach64_i386_reloc.h | 2 +- o/alloc.c | 4 ++++ o/gmp_big.c | 2 +- o/sfaslmacho.c | 8 -------- 8 files changed, 15 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 3366719f..ce6fb387 100755 --- a/configure +++ b/configure @@ -4547,6 +4547,7 @@ printf "%s\n" "removing $1 from LDFLAGS" >&6; } add_args_to_cflags -fsigned-char -pipe -fcommon \ -fno-builtin-malloc -fno-builtin-free \ -fno-PIE -fno-pie -fno-PIC -fno-pic \ + -std=gnu17 \ -Wall \ -Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \ -Wno-unused-but-set-variable diff --git a/configure.in b/configure.in index b6343351..2eca4106 100644 --- a/configure.in +++ b/configure.in @@ -258,6 +258,7 @@ remove_arg_from_ldflags() { add_args_to_cflags -fsigned-char -pipe -fcommon \ -fno-builtin-malloc -fno-builtin-free \ -fno-PIE -fno-pie -fno-PIC -fno-pic \ + -std=gnu17 \ -Wall \ -Wno-builtin-requires-header -Wno-empty-body -Wno-self-assign \ -Wno-unused-but-set-variable diff --git a/git.tag b/git.tag index 885a5f3d..43276fcb 100644 --- a/git.tag +++ b/git.tag @@ -1 +1 @@ -"Version_2_6_15pre15" +"Version_2_6_15pre16" diff --git a/h/386-gnu.h b/h/386-gnu.h index beccec37..522ee5b5 100755 --- a/h/386-gnu.h +++ b/h/386-gnu.h @@ -54,11 +54,15 @@ #endif #define PATH_MAX 4096 /*fixme dynamic*/ #define MAXPATHLEN 4096 /*fixme dynamic*/ -#define MAX_BRK 0x70000000 /*GNU Hurd fragmentation bug*/ +/* #define MAX_BRK 0x70000000 */ /*GNU Hurd fragmentation bug*/ #define RELOC_H "elf32_i386_reloc.h" #define NEED_STACK_CHK_GUARD #undef HAVE_D_TYPE /*FIXME defined, but not implemented in readdir*/ -#define NO_FILE_LOCKING /*FIXME*/ +/* #define NO_FILE_LOCKING */ /*FIXME*/ + +#define INITIALIZE_BRK \ + massert(!brk(gcl_alloc_initialized ? core_end : \ + ({extern ufixnum _end;(void *)ROUNDUP((ufixnum)&_end,PAGESIZE);}))) diff --git a/h/mach64_i386_reloc.h b/h/mach64_i386_reloc.h index a4614528..009bf141 100644 --- a/h/mach64_i386_reloc.h +++ b/h/mach64_i386_reloc.h @@ -6,7 +6,7 @@ case X86_64_RELOC_UNSIGNED: // for absolute addresses if (ri->r_extern || !ri->r_pcrel) - add_val(q,~0L,ri->r_pcrel ? a-rel : a); + store_val(q,~0L,ri->r_pcrel ? a-rel : a); break; case X86_64_RELOC_GOT_LOAD: // a MOVQ load of a GOT entry diff --git a/o/alloc.c b/o/alloc.c index 1e1350a5..2f76ad1f 100644 --- a/o/alloc.c +++ b/o/alloc.c @@ -1266,6 +1266,10 @@ gcl_init_alloc(void *cs_start) { #endif +#ifdef INITIALIZE_BRK + INITIALIZE_BRK; +#endif + update_real_maxpage(); if (gcl_alloc_initialized) { diff --git a/o/gmp_big.c b/o/gmp_big.c index d3b0c2eb..a6341b41 100755 --- a/o/gmp_big.c +++ b/o/gmp_big.c @@ -461,7 +461,7 @@ integer_quotient_remainder_1(object x, object y, object *qp, object *rp,fixnum d if (type_of(x)==t_fixnum && type_of(y)==t_fixnum) { fixnum fx=fix(x),fy=fix(y); - if (fx!=-fx) {/*MOST_NEGATIVE_FIX*/ + if (fx!=MOST_NEGATIVE_FIX) { if (qp) { fixnum z=fixnum_div(fx,fy,d); if (rp) *rp=make_fixnum(fx-fy*z); diff --git a/o/sfaslmacho.c b/o/sfaslmacho.c index c39f52fa..947192c4 100644 --- a/o/sfaslmacho.c +++ b/o/sfaslmacho.c @@ -65,14 +65,6 @@ store_val(ul *w,ul m,ul v) { } -static int -add_val(ul *w,ul m,ul v) { - - return store_val(w,m,v+(*w&m)); - -} - - #ifndef _LP64 /*redirect trampolines gcc-4.0 gives no reloc for stub sections on x86 only*/ static int -- 2.30.2