mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
4f6c3de859
author Dimitry Andric <dim () FreeBSD.org> 2026-01-23 09:33:18 +0000
committer Dimitry Andric <dim () FreeBSD.org> 2026-02-10 19:28:50 +0000
commit d8ec68ea76d97ff43e709b813629c862a6bf8211 (patch)
tree 2250ed0cb1c604a11e64a8772bb2f48d77297877
parent 32b3ec1883f39d8d5fcb4ec827cdf249350f5e16 (diff)
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.
68 lines
1.6 KiB
Makefile
68 lines
1.6 KiB
Makefile
ONLY_FOR_ARCHS = amd64 i386 powerpc sparc64
|
|
|
|
COMMENT = ANSI Common Lisp implementation
|
|
|
|
DISTNAME= clisp-2.49
|
|
REVISION = 7
|
|
CATEGORIES= lang
|
|
HOMEPAGE= https://clisp.sourceforge.io/
|
|
|
|
# GPLv2
|
|
PERMIT_PACKAGE= Yes
|
|
|
|
WANTLIB = avcall c callback iconv intl m curses pthread readline sigsegv
|
|
|
|
LIB_DEPENDS = devel/gettext,-runtime \
|
|
devel/libsigsegv \
|
|
devel/ffcall>=1.10p1
|
|
|
|
SITES= ${SITE_SOURCEFORGE:=clisp/}
|
|
EXTRACT_SUFX= .tar.bz2
|
|
|
|
USE_GMAKE= Yes
|
|
|
|
SEPARATE_BUILD= Yes
|
|
|
|
CONFIGURE_STYLE= gnu old
|
|
CONFIGURE_ARGS= --fsstnd=openbsd \
|
|
--disable-mmap \
|
|
--with-gettext \
|
|
--mandir=${PREFIX}/man \
|
|
--docdir=${PREFIX}/share/doc/clisp \
|
|
--elispdir=${PREFIX}/share/emacs/site-lisp \
|
|
--vimdir=${PREFIX}/share/doc/clisp \
|
|
--srcdir=${WRKSRC} ${WRKBUILD} \
|
|
--without-dynamic-modules
|
|
|
|
# Override some mmap, shm tests: their fixed addresses may conflict
|
|
# with ASLR, and a random 'no' might break the build.
|
|
CONFIGURE_ENV = ac_cv_prog_DVIPDF='' \
|
|
ac_cv_prog_GROFF='' \
|
|
ac_cv_prog_PS2PDF='' \
|
|
cl_cv_func_mmap_anon=yes \
|
|
cl_cv_func_mmap_anonymous=yes \
|
|
cl_cv_func_mmap_devzero=yes \
|
|
cl_cv_func_mmap_works=yes \
|
|
cl_cv_func_shmctl_attachable=yes \
|
|
cl_cv_sys_shm_works=yes
|
|
|
|
CFLAGS += -fno-strict-overflow
|
|
|
|
.if ${MACHINE_ARCH} == "sparc64"
|
|
CFLAGS += -DSAFETY=2 -DNO_ASM
|
|
.endif
|
|
|
|
.if ${MACHINE_ARCH} == "powerpc"
|
|
CONFIGURE_ARGS += --with-gmalloc
|
|
CFLAGS += -fno-pie
|
|
LDFLAGS += -nopie
|
|
CONFIGURE_ENV += LDFLAGS="${LDFLAGS}"
|
|
.else
|
|
CONFIGURE_ARGS += --without-gmalloc
|
|
.endif
|
|
|
|
pre-build:
|
|
ln -sf ${LOCALBASE}/bin/gmake ${WRKDIR}/bin/make
|
|
|
|
.include <bsd.port.mk>
|