Files
ports/lang/clisp/files/patch-src__makemake.in
T
Dimitry Andric d8ec68ea76 lang/clisp: fix build with clang >= 20
With clang 20 or higher lang/clisp fails to build, with errors similar to:

    ./lisp.run -B . -N locale -E UTF-8 -Emisc 1:1 -Epathname 1:1 -norc -m 2MW -M interpreted.mem -q -c compiler.lisp -o ./
    ;; Compiling file /wrkdirs/usr/ports/lang/clisp/work/clisp-c3ec11bab87cfdbeba01523ed88ac2a16b22304d/src/compiler.lisp ...
    *** - LIST-INIT-START: start index 44801 too large for
           (#(NIL
              #S(HASH-TABLE :TEST STABLEHASH-EQ
              #:WARN-IF-NEEDS-REHASH-AFTER-GC T
                 (#<BUILT-IN-CLASS SYMBOL> .
                  #<COMPILED-FUNCTION CLOS::MAKE-INSTANCE-<EMF-1>-1>)
                 (#<STANDARD-CLASS FUNCALLABLE-STANDARD-CLASS> .
                  #<SYSTEM-FUNCTION CLOS::%MAKE-INSTANCE>)
                 (#<STANDARD-CLASS STANDARD-CLASS> .
                  #<SYSTEM-FUNCTION CLOS::%MAKE-INSTANCE>)))
            CLOS::COMPUTE-APPLICABLE-METHODS-EFFECTIVE-METHOD
            #<STANDARD-GENERIC-FUNCTION MAKE-INSTANCE>)

    0 errors, 0 warnings
    *** Error code 1

The problems are caused by clisp's usage of -fwrapv, where the
developers implicitly assume this also makes pointer wrapping defined.

After https://github.com/llvm/llvm-project/commit/1295aa2e814 however,
-fwrapv no longer implies that, and you either have to add a clang
specific -fwrapv-pointer option, or use -fno-strict-overflow, which
works for both clang and gcc.

PR:		292672
Approved by:	maintainer timeout (2 weeks)
MFH:		2026Q1
2026-02-10 20:28:50 +01:00

21 lines
671 B
Plaintext

--- src/makemake.in.orig 2024-12-28 07:47:59 UTC
+++ src/makemake.in
@@ -1362,7 +1362,7 @@ if [ $XCC_GCC = true ] ; then
case "$XCC_GCC_VERSION" in
2.* | 3.[1-3]*) ;;
*)
- Z_XCFLAGS=$Z_XCFLAGS' -fwrapv'
+ Z_XCFLAGS=$Z_XCFLAGS' -fwrapv -fno-strict-overflow'
;;
esac
fi
@@ -2258,7 +2258,7 @@ echol "libdir = ${LIBDIR}"
echol "psdir = ${PSDIR}"
echol "pdfdir = ${PDFDIR}"
echol "libdir = ${LIBDIR}"
-echol "lisplibdir = \$(libdir)${NEXT_}\$(TOPDIR)"
+echol "lisplibdir = \$(libdir)${NEXT_}clisp"
test -n "$USE_GETTEXT" && echol "localedir = ${LOCALEDIR}"
echol "elispdir = ${ELISPDIR}"
echol "vimdir = ${VIMDIR}"