Accepting request 1198416 from devel:languages:misc

- Choose lto settings depending on architecture as otherwise
  we might see crashing clisp 

- Refresh clisp.spec and make it build on s390x as well by avoiding
  Position Independent Executables at compile and link time.

- Update to latest commit f5acef38 of devel version 2.49.93+ from 20240704
- Add modules libsvm and pari as well as feature ffcall
- Add source clhs.el as upstream has skipped this
- Drop patch
  * clisp-2.49-rpath.dif
  * clisp-2.49.92.tar.bz2
- Port patches
  * clisp-2.49-configure.dif
  * clisp-2.49-gctoken.dif
  * clisp-gcc14.patch
  * clisp-link.dif

- Add patch clisp-gcc14.patch to make it build again

OBS-URL: https://build.opensuse.org/request/show/1198416
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/clisp?expand=0&rev=52
This commit is contained in:
Dominique Leuenberger 2024-09-03 11:39:03 +00:00 committed by Git OBS Bridge
commit ab9d2840b7
10 changed files with 494 additions and 124 deletions

142
clhs.el Normal file
View File

@ -0,0 +1,142 @@
;;; clhs.el -- access the Common Lisp HyperSpec (CLHS)
;;; this works with both
;;; * the "long file name" version released by Harlequin and available
;;; at the MIT web site as
;;; <http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/FrontMatter/> and
;;; * the "8.3 file name" version released later by Xanalys and available at
;;; <http://www.xanalys.com/software_tools/reference/HyperSpec/>
;;; and downloadable as
;;; <http://www.xanalys.com/software_tools/reference/HyperSpec/HyperSpec-6-0.tar.gz>
;;; This is accomplished by not hard-wiring the symbol->file table
;;; but reading the Data/<map> file instead
;;; Copyright (C) 2002-2008, 2017 Sam Steingold <sds@gnu.org>
;;; Keywords: lisp, common lisp, emacs, ANSI CL, hyperspec
;;; released under the GNU GPL <http://www.gnu.org/copyleft/gpl.html>
;;; as a part of GNU CLISP <http://clisp.cons.org>, <http://www.clisp.org>
;;; Commentary:
;; Kent Pitman and the Harlequin Group (later Xanalys) have made the
;; text of the "American National Standard for Information Technology --
;; Programming Language -- Common Lisp", ANSI X3.226-1994 available on
;; the WWW, in the form of the Common Lisp HyperSpec. This package
;; makes it convenient to peruse this documentation from within Emacs.
;; This is inspired by the Erik Naggum's version of 1997.
;;; Code:
(eval-when-compile (require 'cl)) ; push
(require 'browse-url)
(require 'thingatpt)
(require 'url)
(defcustom common-lisp-hyperspec-root "http://clhs.lisp.se/"
;; "http://www.lispworks.com/documentation/HyperSpec/"
;; "http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/html/hyperspec/HyperSpec/"
;; "http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/"
"*The root of the Common Lisp HyperSpec URL.
If you copy the HyperSpec to your local system, set this variable to
something like \"file:/usr/local/doc/HyperSpec/\"."
:group 'lisp
:type 'string)
(defvar clhs-history nil
"History of symbols looked up in the Common Lisp HyperSpec so far.")
(defvar clhs-symbols nil)
(defun clhs-table-buffer (&optional root)
(unless root (setq root common-lisp-hyperspec-root))
(if (string-match "^file:/" root)
(with-current-buffer (get-buffer-create " *clhs-tmp-buf*")
(insert-file-contents-literally
(let* ((d (concat (substring root 6) "/Data/"))
(f (concat d "Map_Sym.txt")))
(if (file-exists-p f) f
(setq f (concat d "Symbol-Table.text"))
(if (file-exists-p f) f
(error "no symbol table at %s" root))))
nil nil nil t)
(goto-char 0)
(current-buffer))
(let* ((d (concat root "/Data/"))
(f (concat d "Map_Sym.txt")))
(set-buffer (url-retrieve-synchronously f))
(goto-char 0)
(unless (looking-at "^HTTP/.*200 *OK$")
(kill-buffer (current-buffer))
(setq f (concat d "Symbol-Table.text"))
(set-buffer (url-retrieve-synchronously f))
(goto-char 0)
(unless (looking-at "^HTTP/.*200 *OK$")
(kill-buffer (current-buffer))
(error "no symbol table at %s" root)))
;; skip to the first symbol
(search-forward "\n\n")
(current-buffer))))
(defun clhs-read-symbols ()
"read `clhs-symbols' from the current position in the current buffer"
(while (not (eobp))
(puthash (buffer-substring-no-properties ; symbol
(line-beginning-position) (line-end-position))
(progn (forward-line 1) ; file name
(buffer-substring-no-properties ; strip "../"
(+ 3 (line-beginning-position)) (line-end-position)))
clhs-symbols)
(forward-line 1)))
(defun clhs-symbols ()
"Get `clhs-symbols' from `common-lisp-hyperspec-root'."
(if (and clhs-symbols (not (= 0 (hash-table-count clhs-symbols))))
clhs-symbols
(with-current-buffer (clhs-table-buffer)
(unless clhs-symbols
(setq clhs-symbols (make-hash-table :test 'equal :size 1031)))
(clhs-read-symbols)
(kill-buffer (current-buffer))
clhs-symbols)))
(defun hash-table-complete (string table how)
"This makes it possible to use hash-tables with `completing-read'.
Actually, `completing-read' in Emacs 22 accepts hash-tables natively."
(let ((res nil) (st (upcase string)) (len (length string)))
(maphash (lambda (key val)
(when (and (<= len (length key))
(string= st (substring key 0 len)))
(push key res)))
table)
(if how
res ; `all-completions'
(if (cdr res)
(try-completion st (mapcar #'list res))
(if (string= st (car res))
t
(car res))))))
;;;###autoload
(defun common-lisp-hyperspec (symbol-name &optional kill)
"Browse the Common Lisp HyperSpec documentation for SYMBOL-NAME.
Finds the HyperSpec at `common-lisp-hyperspec-root'.
With prefix arg, save the URL in the `kill-ring' instead."
(interactive (list (let ((sym (thing-at-point 'symbol t))
(completion-ignore-case t))
(completing-read
"Look-up symbol in the Common Lisp HyperSpec: "
#'hash-table-complete (clhs-symbols)
t sym 'clhs-history))
current-prefix-arg))
(unless (= ?/ (aref common-lisp-hyperspec-root
(1- (length common-lisp-hyperspec-root))))
(setq common-lisp-hyperspec-root
(concat common-lisp-hyperspec-root "/")))
(let ((url (concat common-lisp-hyperspec-root
(gethash (upcase symbol-name) (clhs-symbols)))))
(if kill
(kill-new url)
(browse-url url))))
(provide 'clhs)

View File

@ -1,12 +1,17 @@
---
clisp-2.49.90/configure | 4 ++--
clisp-2.49.90/src/lispbibl.d | 16 +++++++++++-----
clisp-2.49.90/src/makemake.in | 17 +++++++++++++----
clisp-2.49.90/utils/modprep.lisp | 2 +-
4 files changed, 27 insertions(+), 12 deletions(-)
clisp-2.49.93+git20240704.f5acef38/configure | 4 +-
clisp-2.49.93+git20240704.f5acef38/modules/clx/new-clx/Makefile.in | 2 -
clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure | 2 -
clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure.in | 2 -
clisp-2.49.93+git20240704.f5acef38/modules/libsvm/libsvm.lisp | 2 -
clisp-2.49.93+git20240704.f5acef38/src/lispbibl.d | 16 ++++++----
clisp-2.49.93+git20240704.f5acef38/src/makemake.in | 14 +++++++-
clisp-2.49.93+git20240704.f5acef38/utils/ccmp2c.c | 1
clisp-2.49.93+git20240704.f5acef38/utils/modprep.lisp | 2 -
9 files changed, 31 insertions(+), 14 deletions(-)
--- clisp-2.49.90/configure
+++ clisp-2.49.90/configure 2018-02-12 08:20:34.280915654 +0000
--- clisp-2.49.93+git20240704.f5acef38/configure
+++ clisp-2.49.93+git20240704.f5acef38/configure 2024-09-02 13:23:26.124850752 +0000
@@ -429,11 +429,11 @@ do
passnext=makemake ;;
@ -21,8 +26,52 @@
makemake_args="$makemake_args --vimdir="
prev=vimdir
passnext=both ;;
--- clisp-2.49.90/src/lispbibl.d
+++ clisp-2.49.90/src/lispbibl.d 2018-02-12 08:20:34.284915577 +0000
--- clisp-2.49.93+git20240704.f5acef38/modules/clx/new-clx/Makefile.in
+++ clisp-2.49.93+git20240704.f5acef38/modules/clx/new-clx/Makefile.in 2024-09-02 13:23:26.124850752 +0000
@@ -18,7 +18,7 @@ distribdir =
### Custom defs.
CCMP2C = ../../ccmp2c
RM = rm -f
-WANTS = @WANTS@
+WANTS = @WANTS@ -I ../../
X_CFLAGS = @X_CFLAGS@
# default target: make the module
--- clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure
+++ clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure 2024-09-02 13:23:26.124850752 +0000
@@ -5526,7 +5526,7 @@ printf "%s\n" "$as_me: ${term_bold}** Li
-ac_fn_c_check_header_compile "$LINENO" "svm.h" "ac_cv_header_svm_h" "$ac_includes_default"
+ac_fn_c_check_header_compile "$LINENO" "libsvm/svm.h" "ac_cv_header_svm_h" "$ac_includes_default"
if test "x$ac_cv_header_svm_h" = xyes
then :
printf "%s\n" "#define HAVE_SVM_H 1" >>confdefs.h
--- clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure.in
+++ clisp-2.49.93+git20240704.f5acef38/modules/libsvm/configure.in 2024-09-02 13:23:26.124850752 +0000
@@ -16,7 +16,7 @@ AC_LIB_LINKFLAGS([svm])
BOLD_MSG([LibSVM (Headers)])
AC_SUBST(LIBSVM_CFLAGS)
AC_SUBST(LIBSVM_LIBS)
-AC_CHECK_HEADERS(svm.h)
+AC_CHECK_HEADERS([libsvm/svm.h])
if test "$ac_cv_header_svm_h" = "no"; then
AC_MSG_ERROR([cannot find LibSVM headers])
fi
--- clisp-2.49.93+git20240704.f5acef38/modules/libsvm/libsvm.lisp
+++ clisp-2.49.93+git20240704.f5acef38/modules/libsvm/libsvm.lisp 2024-09-02 13:23:26.124850752 +0000
@@ -15,7 +15,7 @@
(default-foreign-language :stdc)
-(c-lines "#include \"config.h\"~%#include <svm.h>~%")
+(c-lines "#include \"config.h\"~%#include <libsvm/svm.h>~%")
(defvar *libsvm-output* *standard-output* "The stream for svm.so messages.")
(cl:defun write-string-to-libsvm-output (s)
--- clisp-2.49.93+git20240704.f5acef38/src/lispbibl.d
+++ clisp-2.49.93+git20240704.f5acef38/src/lispbibl.d 2024-09-02 13:23:26.128850679 +0000
@@ -178,7 +178,7 @@
#define PC386 /* IBMPC-compatible with 80386/80486-processor */
#endif
@ -32,7 +81,7 @@
#define PC386
#endif
#if (defined(sun) && defined(unix) && defined(sparc))
@@ -270,8 +270,14 @@
@@ -274,8 +274,14 @@
#endif
#ifdef GENERIC_UNIX
#define UNIX
@ -48,7 +97,7 @@
#endif
#ifdef __GNU__
#define UNIX_HURD /* the GNU system (Hurd + glibc) */
@@ -1281,7 +1287,7 @@ typedef signed int signean;
@@ -1271,7 +1277,7 @@ typedef signed int signean;
address of its component 'ident' and return it as number: */
#include <stddef.h>
#ifndef offsetof
@ -57,7 +106,7 @@
#endif
/* Determine the offset of an array 'ident' in a struct of the type 'type': */
#if defined(__cplusplus) || defined(MICROSOFT)
@@ -5520,9 +5526,9 @@ typedef signed_int_with_n_bits(intVsize)
@@ -5439,9 +5445,9 @@ typedef signed_int_with_n_bits(intVsize)
type_data_object(type,data) */
#if defined(WIDE) && defined(WIDE_STRUCT)
#if BIG_ENDIAN_P==WIDE_ENDIANNESS
@ -69,9 +118,9 @@
#endif
#elif !(oint_addr_shift==0)
#define type_data_object(type,data) \
--- clisp-2.49.90/src/makemake.in
+++ clisp-2.49.90/src/makemake.in 2018-02-12 08:24:54.275897762 +0000
@@ -250,6 +250,9 @@ verbose=${CLISP_MAKEMAKE_VERBOSE:-false}
--- clisp-2.49.93+git20240704.f5acef38/src/makemake.in
+++ clisp-2.49.93+git20240704.f5acef38/src/makemake.in 2024-09-02 13:34:28.840613211 +0000
@@ -248,6 +248,9 @@ verbose=${CLISP_MAKEMAKE_VERBOSE:-false}
# Handle --with-... arguments
while test -z "$endofargs"; do
case "$1" in
@ -81,7 +130,7 @@
-verb* | --verb* )
verbose=`echol "$1"|sed 's/-*v[^=]*=*//'`
test -n "${verbose}" || verbose=true
@@ -1183,11 +1186,13 @@ else
@@ -1166,11 +1169,13 @@ else
fi
# Main cpu dependencies:
@ -95,17 +144,27 @@
test "${verbose}" = true -o "${verbose}" = yes && \
cat <<EOF >&2
@@ -1384,6 +1389,9 @@ if [ $XCC_GCC = true ] ; then
@@ -1367,6 +1372,10 @@ if [ $XCC_GCC = true ] ; then
XCFLAGS=${XCFLAGS}" -pthread"
fi
+ if [ -n "${MYCFLAGS}" ] ; then
+ XCFLAGS=$XCFLAGS' ${MYCFLAGS} '
+ XCFLAGS=$XCFLAGS' ${MYCFLAGS}'
+ fi
+
else
if [ $CROSS = false ] ; then
@@ -4105,8 +4113,9 @@ if [ $CROSS = false ] ; then
@@ -1468,7 +1477,7 @@ if [ "${with_dynamic_modules}" != no ];
eval XCC_PICFLAG=\"${pic_flag}\"
if [ "$HSYSOS" != cygwin ]; then
eval "`./libtool --tag=CC --config | grep '^allow_undefined_flag='`"
- eval "`./libtool --tag=CC --config | grep '^archive_cmds='`"
+ eval "`./libtool --tag=CC --config | sed -rn '/^archive_cmds=/{ s/\s*-shared//; s/(\\\$compiler_flags)/\1 -shared/; p }'`"
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname'
fi
@@ -4036,8 +4045,9 @@ if [ $CROSS = false ] ; then
echol
if [ "${with_dynamic_modules}" != no ]; then
depends="full install-modules force"
@ -116,8 +175,18 @@
echotab "mkdir -p \$(DESTDIR)\$(lisplibdir)/dynmod"
echotab "DESTDIR=\`cd \"\$(DESTDIR)\$(lisplibdir)\"; pwd\` CLISP='./clisp -q -norc' ./clisp-link install \$(MODULES)"
echol
--- clisp-2.49.90/utils/modprep.lisp
+++ clisp-2.49.90/utils/modprep.lisp 2018-02-12 08:20:34.288915500 +0000
--- clisp-2.49.93+git20240704.f5acef38/utils/ccmp2c.c
+++ clisp-2.49.93+git20240704.f5acef38/utils/ccmp2c.c 2024-09-02 13:23:26.128850679 +0000
@@ -1042,6 +1042,7 @@ main (int argc, char *argv[])
infilename = argv[1];
/* Emit prologue. */
+ printf ("#include <config.h>\n");
printf ("#include <stdio.h>\n");
printf ("#include <stdlib.h>\n");
printf ("#include <string.h>\n");
--- clisp-2.49.93+git20240704.f5acef38/utils/modprep.lisp
+++ clisp-2.49.93+git20240704.f5acef38/utils/modprep.lisp 2024-09-02 13:23:26.128850679 +0000
@@ -328,7 +328,7 @@ FOO(bar,baz,zot) ==> FOO; (bar baz zot);
((or (char= cc #\_) (char= cc #\-)) (write-char #\_ out))
(t (format out "_~2,'0x" (char-code cc))))))

View File

@ -3,7 +3,7 @@
diff --git a/utils/gctrigger.c b/utils/gctrigger.c
--- a/utils/gctrigger.c
+++ b/utils/gctrigger.c
@@ -601,6 +601,7 @@ static inline void VectorToken_delete (V
@@ -606,6 +606,7 @@ static inline void VectorToken_delete (V
static Token nexttoken (boolean within_prep_directive)
{
Token token;

View File

@ -1,16 +0,0 @@
---
src/aclocal.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/aclocal.m4 b/src/aclocal.m4
--- a/src/aclocal.m4
+++ b/src/aclocal.m4
@@ -7723,7 +7723,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl When using libtool, the option that works for both libraries and
dnl executables is -R. The -R options are cumulative.
for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-Wl,-rpath-link$found_dir"
done
fi
popdef([P_A_C_K])

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bd443a94aa9b02da4c4abbcecfc04ffff1919c0a8b0e7e35649b86198cd6bb89
size 8919616

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6b7d512b12653ea022cc461308ecd36a6aae66473ae797fbcd37ba7b663e4fa4
size 7239936

130
clisp-gcc14.patch Normal file
View File

@ -0,0 +1,130 @@
---
modules/berkeley-db/bdb.c | 11 ++++++-----
modules/berkeley-db/configure | 2 +-
modules/berkeley-db/configure.in | 2 +-
src/foreign.d | 2 +-
src/lispbibl.d | 2 +-
src/spvw_fault.d | 2 +-
src/spvw_language.d | 2 +-
src/spvw_sigsegv.d | 2 +-
8 files changed, 13 insertions(+), 12 deletions(-)
--- modules/berkeley-db/bdb.c
+++ modules/berkeley-db/bdb.c 2024-08-29 11:45:09.133249570 +0000
@@ -364,7 +364,7 @@ DEFUN(BDB:DBE-CREATE,&key PASSWORD ENCRY
dbe_set_encryption(dbe,&STACK_0,&STACK_1);
skipSTACK(2);
/* set error & message callbacks */
- begin_system_call(); dbe->set_errcall(dbe,&error_callback);
+ begin_system_call(); dbe->set_errcall(dbe,(void (*)(const DB_ENV *,const char *,const char *))&error_callback);
#if defined(HAVE_DB_ENV_SET_MSGCALL)
dbe->set_msgcall(dbe,&message_callback);
#endif
@@ -1212,7 +1212,7 @@ DEFUN(BDB:DB-CREATE, dbe)
SYSCALL(db_create,(&db,dbe,0));
if (!dbe) { /* set error callback */
begin_system_call();
- db->set_errcall(db,&error_callback);
+ db->set_errcall(db,(void (*)(const DB_ENV *,const char *,const char *))&error_callback);
end_system_call();
}
wrap_finalize(db,STACK_0,`BDB::MKDB`,``BDB::DB-CLOSE``);
@@ -1514,9 +1514,9 @@ DEFUN(BDB:DB-STAT, db &key FAST-STAT TRA
{ /* Return database statistics */
DB_TXN *txn = (DB_TXN*)bdb_handle(popSTACK(),`BDB::TXN`,BH_NIL_IS_NULL);
#if defined(HAVE_DB_STAT_ACCEPT_TXN)
-# define DB_STAT(s) SYSCALL(db->stat,(db,txn,&s,flags));
+# define DB_STAT(s) SYSCALL(db->stat,(db,txn,(void*)&s,flags));
#else
-# define DB_STAT(s) SYSCALL(db->stat,(db,&s,flags));
+# define DB_STAT(s) SYSCALL(db->stat,(db,(void*)&s,flags));
#endif
u_int32_t flags = missingp(STACK_0) ? 0 : DB_FAST_STAT;
DB *db = (DB*)bdb_handle(STACK_1,`BDB::DB`,BH_VALID);
@@ -2752,7 +2752,8 @@ DEFUN(BDB:TXN-RECOVER, dbe &key FIRST :N
DB_ENV *dbe = (DB_ENV*)bdb_handle(popSTACK(),`BDB::DBE`,BH_VALID);
u_int32_t tx_max;
DB_PREPLIST *preplist;
- int status, ii;
+ int status;
+ long ii;
u_int32_t retnum;
SYSCALL(dbe->get_tx_max,(dbe,&tx_max));
preplist = (DB_PREPLIST*)clisp_malloc(tx_max * sizeof(DB_PREPLIST));
--- modules/berkeley-db/configure.in
+++ modules/berkeley-db/configure.in 2024-08-29 07:17:20.463971573 +0000
@@ -38,7 +38,7 @@ AC_CHECK_SIZEOF(db_recno_t,,[#include <s
dnl <http://www.sleepycat.com/docs/ref/upgrade.4.3/stat.html>
AC_CACHE_CHECK([whether DB->stat() accepts TXNid],ac_cv_db_stat_accept_txn,[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <db.h>],
-[[DB db; db.stat(&db,NULL,0,NULL);]])],
+[[DB db; db.stat(&db,NULL,NULL,0);]])],
ac_cv_db_stat_accept_txn=yes,ac_cv_db_stat_accept_txn=no)])
if test "$ac_cv_db_stat_accept_txn" = "yes"; then
AC_DEFINE(HAVE_DB_STAT_ACCEPT_TXN,1,[Define to 1 if DB->stat() accepts TXNid])
--- modules/berkeley-db/configure
+++ modules/berkeley-db/configure 2024-08-29 07:17:20.463971573 +0000
@@ -6241,7 +6241,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
int
main (void)
{
-DB db; db.stat(&db,NULL,0,NULL);
+DB db; db.stat(&db,NULL,NULL,0);
;
return 0;
}
--- src/foreign.d
+++ src/foreign.d 2024-08-29 07:24:17.508412215 +0000
@@ -2417,7 +2417,7 @@ local void count_walk_post (object fvd,
{
unused(fvd); unused(obj); unused(walk);
}
-local maygc void convert_to_foreign_needs (object fvd, object obj,
+local maygc __attribute__((noinline)) void convert_to_foreign_needs (object fvd, object obj,
struct foreign_layout *sas)
{
struct walk_lisp walk
--- src/lispbibl.d
+++ src/lispbibl.d 2024-08-29 07:25:56.826610237 +0000
@@ -11641,7 +11641,7 @@ All other long words on the LISP-Stack a
#define FAST_SP
#endif
#elif defined(GNU) && defined(SP_register)
- register __volatile__ aint __SP __asm__(SP_register);
+ register aint __SP __asm__(SP_register);
#ifdef SPARC64
#define SP() (__SP+2048)
#else
--- src/spvw_fault.d
+++ src/spvw_fault.d 2024-08-29 07:20:02.297039630 +0000
@@ -289,7 +289,7 @@ modexp bool handle_fault_range (int prot
local void xmprotect (aint addr, uintM len, int prot) {
if (mprotect((void*)addr,len,prot) < 0) {
- fprintf(stderr,GETTEXTL("mprotect(0x%lx,%d,%d) failed."),addr,len,prot);
+ fprintf(stderr,GETTEXTL("mprotect(0x%lx,%lu,%d) failed."),addr,(unsigned long)len,prot);
errno_out(OS_errno);
abort();
}
--- src/spvw_language.d
+++ src/spvw_language.d 2024-08-29 07:20:29.048554790 +0000
@@ -172,7 +172,7 @@ global void init_language
{ /* Invalidate the gettext internal caches. */
char *td = textdomain(NULL);
if (NULL == td) {
- ANSIC_ERROR("textdomain",NULL);
+ ANSIC_ERROR("textdomain","");
}
if (NULL == textdomain(td)) {
ANSIC_ERROR("textdomain",td);
--- src/spvw_sigsegv.d
+++ src/spvw_sigsegv.d 2024-08-29 07:21:09.115828518 +0000
@@ -62,7 +62,7 @@ local void print_mem_stats (void) {
/* Put a breakpoint here if you want to catch CLISP just before it dies. */
global void sigsegv_handler_failed (void* address) {
fprint(stderr,"\n");
- fprintf(stderr,GETTEXTL("SIGSEGV cannot be cured. Fault address = 0x%lx."),
+ fprintf(stderr,GETTEXTL("SIGSEGV cannot be cured. Fault address = 0x%p."),
address);
fprint(stderr,"\n");
print_mem_stats();

View File

@ -16,7 +16,7 @@
cp ${f} ${absdestdir}/${DYNMOD}/
--- src/lispbibl.d
+++ src/lispbibl.d 2018-02-19 09:30:11.552748021 +0000
@@ -1631,6 +1631,8 @@ typedef SLONG sint32; /* signed 32 bi
@@ -1610,6 +1610,8 @@ typedef SLONG sint32; /* signed 32 bi
/* Emulate 64-Bit-numbers using two 32-Bit-numbers. */
typedef struct { sintL hi; uintL lo; } sintL2; /* signed 64 Bit integer */
typedef struct { uintL hi; uintL lo; } uintL2; /* unsigned 64 Bit integer */
@ -25,7 +25,7 @@
#endif
/* Use 'uintX' and 'sintX' for Integers with approximately given width
and a minumum of storage space. */
@@ -14397,7 +14399,7 @@ re-enters the corresponding top-level lo
@@ -14188,7 +14190,7 @@ re-enters the corresponding top-level lo
#define pushSTACK(obj) (STACK_(-1) = (obj), STACK skipSTACKop -1)
/* Almost equivalent with *--STACK = obj resp. *STACK++ = obj , but
Careful: first enter the object into STACK_(-1), THEN modify the STACK! */

View File

@ -1,3 +1,35 @@
-------------------------------------------------------------------
Tue Sep 3 07:10:42 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Choose lto settings depending on architecture as otherwise
we might see crashing clisp
-------------------------------------------------------------------
Mon Sep 2 09:07:21 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Refresh clisp.spec and make it build on s390x as well by avoiding
Position Independent Executables at compile and link time.
-------------------------------------------------------------------
Thu Aug 29 12:15:45 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Update to latest commit f5acef38 of devel version 2.49.93+ from 20240704
- Add modules libsvm and pari as well as feature ffcall
- Add source clhs.el as upstream has skipped this
- Drop patch
* clisp-2.49-rpath.dif
* clisp-2.49.92.tar.bz2
- Port patches
* clisp-2.49-configure.dif
* clisp-2.49-gctoken.dif
* clisp-gcc14.patch
* clisp-link.dif
-------------------------------------------------------------------
Wed Aug 28 12:16:12 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Add patch clisp-gcc14.patch to make it build again
-------------------------------------------------------------------
Mon Feb 26 10:47:36 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -1,7 +1,7 @@
#
# spec file for package clisp
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,15 +16,20 @@
#
%bcond_with debug
%global commit f5acef38
%global vdate 20240704
Name: clisp
Version: 2.49.92
Version: 2.49.93
Release: 0
Summary: A Common Lisp Interpreter
# Included gllib is GPL-3.0-or-later
License: GPL-2.0-or-later AND GPL-3.0-or-later
Group: Development/Languages/Other
URL: https://gitlab.com/gnu-clisp/clisp
Source: %name-%version.tar.bz2
Source: %{name}-%{version}+git%{vdate}.%{commit}.tar.xz
Source2: clhs.el
Source3: clisp-rpmlintrc
Source4: README.SUSE
# PATCH-EXTEND-OPENSUSE Set the process execution domain
@ -39,14 +44,12 @@ Patch5: clisp-2.49-gctoken.dif
Patch6: clisp-2.49-clx_demos.dif
# PATCH-EXTEND-OPENSUSE Enable postgresql SSL feature
Patch7: clisp-2.49-postgresql.dif
# PATCH-FIX-OPENSUSE Do not use rpath but rpath-link
Patch8: clisp-2.49-rpath.dif
# PATCH-FIX-OPENSUSE Correct path for header for System V IPC system calls
Patch12: clisp-linux.patch
Patch13: clisp-gcc14.patch
Patch14: clisp-link.dif
Patch16: clisp-db6.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global vimdir %{_datadir}/vim/site/after/syntax
BuildRequires: FastCGI-devel
BuildRequires: db-devel
@ -58,13 +61,18 @@ BuildRequires: ffcall
#%endif
BuildRequires: gdbm-devel
BuildRequires: glib2-devel
BuildRequires: groff
BuildRequires: gtk2-devel
BuildRequires: libglade2-devel
BuildRequires: libsigsegv-devel
BuildRequires: libsvm-devel
BuildRequires: ncurses-devel
BuildRequires: net-tools
BuildRequires: openssl-devel
BuildRequires: pari-devel
BuildRequires: pari-gp
BuildRequires: pcre-devel
BuildRequires: pcre2-devel
BuildRequires: postgresql-devel
BuildRequires: readline-devel
BuildRequires: screen
@ -79,11 +87,17 @@ BuildRequires: pkgconfig(zlib)
# gcc-c++
# to BuildRequires
#
%define debug no
%define _lto_cflags %{nil}
%global ldflags %{nil}
%ifarch %arm ppc ppc64 ppc64le s390 s390x %ix86
%global _lto_cflags %{nil}
%else
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%endif
%global rlver %(rpm -q --qf '%%{VERSION}' readline-devel | sed 's/\\.//g')
%define add_optflags(a:f:t:p:w:W:d:g:O:A:C:D:E:H:i:M:n:P:U:u:l:s:X:B:I:L:b:V:m:x:c:S:E:o:v:) \
%global optflags %{optflags} %{**}
%define add_ldflags(a:f:t:p:w:W:d:g:O:A:C:D:E:H:i:M:n:P:U:u:l:s:X:B:I:L:b:V:m:x:c:S:E:o:v:) \
%global ldflags %{ldflags} %{**}
Requires(pre): vim
Requires(pre): vim-data
Requires: ffcall
@ -128,28 +142,34 @@ with the file README. The subdirectory
contains two nice applications.
%prep
%setup -qT -b0
%setup -qT -b0 -n %{name}-%{version}+git%{vdate}.%{commit}
%patch -P 1 -p1 -b .sel
%patch -P 2 -p1 -b .wooh
%patch -P 4 -p1 -b .conf
%patch -P 5 -p1 -b .gc
%patch -P 6 -p1 -b .demos
%patch -P 7 -p1 -b .psql
%patch -P 8 -p1 -b .rpath
%patch -P 12 -p1 -b .p12
%patch -P 13 -p0 -b .p13
%patch -P 14 -p0 -b .p14
%patch -P 16 -p1 -b .p16
%build
%add_optflags -g3 -D_DEFAULT_SOURCE -D_XOPEN_SOURCE
%add_optflags -g3 -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE
%add_optflags -fno-strict-aliasing -fPIC -pipe -Wa,--noexecstack
%add_optflags -Wno-unused -Wno-uninitialized -Wno-implicit-fallthrough -Wno-volatile-register-var -Wno-address
%add_optflags -Wno-clobbered -Wno-dangling-pointer -Wno-unused-result -Wno-missing-declarations -Wno-cast-function-type
%{expand:%%global optflags %(echo "%{optflags}"|sed -r -e s/-fstack-protector-strong// -e s/-fstack-clash-protection//)}
%{expand:%%global optflags %%optflags %(getconf LFS_CFLAGS)}
%add_ldflags -Wl,--as-needed -Wl,-z,relro -Wl,-z,noexecstack
#
# Overwrite stack size limit (hopefully a soft limit only)
#
ulimit -Ss unlimited || true
ulimit -Hs unlimited || true
unset LC_CTYPE
LANG=POSIX
LC_ALL=POSIX
LANG=C.UTF-8
LC_ALL=C.UTF-8
export LANG LC_ALL
#
# Current system
@ -158,46 +178,52 @@ SYSTEM=${RPM_ARCH}-suse-linux
export PATH="$PATH:."
#
# Set gcc command line but do not use CFLAGS
#
if test %debug = yes ; then
CC="g++"
else
CC="gcc"
fi
%ifarch s390x
##RPM_OPT_FLAGS="$(echo %{optflags}|sed -r 's/-fstack-protector-strong ?//g;s/-f(stack-clash-protection)/-fno-\1/') -fno-stack-limit"
%if %{with debug}
export CC="g++"
DEBUG=--with-debug
%add_optflags -g3 -DDEBUG_GCSAFETY
%else
DEBUG=
export CC="gcc"
%endif
export MYCFLAGS=""
%ifarch s390x ppc64 ppc64le
%{expand:%%global optflags %(echo "%{optflags}"|sed -r -e s/-fstack-protector-strong// -e s/-fstack-clash-protection//)}
%add_optflags -fno-pie -fno-PIE
%add_ldflags -no-pie
MYCFLAGS=-O
%endif
%ifarch %arm
%{expand:%%global optflags %(echo "%{optflags}"|sed -r -e s/-O[0-9]/-O/g)}
MYCFLAGS=-O
%endif
%ifarch aarch64
%endif
%ifarch ppc
%endif
%ifarch s390
%endif
%ifarch alpha
%endif
%ifarch %ix86
%add_optflags -ffloat-store
MYCFLAGS=-O
%endif
%ifarch x86_64 sparc sparc64 ia64 s390x ppc64 ppc64le
%add_optflags -fno-gcse
%endif
%ifarch ia64 s390x ppc64 ppc64le
%{expand:%%global optflags %(echo "%{optflags}"|sed -r -e s/-O[0-9]/-O/g)}
MYCFLAGS=-O
%endif
%ifarch sparc sparc64
%add_optflags -mcpu=v9
%endif
CC="${CC} -g %{optflags} -fno-strict-aliasing -fPIC -pipe"
case "$(uname -m)" in
i[0-9]86)
CC="${CC} -ffloat-store" ;;
arm*) CC="${CC}" ;;
aarch64)CC="${CC}" ;;
ppc) CC="${CC}" ;;
s390) CC="${CC}" ;;
x86_64) CC="${CC} -fno-gcse" ;;
sparc*) CC="${CC} -mcpu=v9 -fno-gcse" ;;
ppc64) CC="${CC} -fno-gcse -mpowerpc64" ;;
ppc64le)CC="${CC} -fno-gcse" ;;
s390x) CC="${CC} -fno-gcse -fno-schedule-insns";;
ia64) CC="${CC} -fno-gcse" ;;
axp|alpha)
CC="${CC}" ;;
esac
#
# FastCGI-devel seems a bit broken
#
CC="${CC} -I%{_includedir}/fastcgi"
%add_optflags -I%{_includedir}/fastcgi
safety='-O'
MYCFLAGS="$(getconf LFS_CFLAGS)"
if grep -q _DEFAULT_SOURCE /usr/include/features.h
then
MYCFLAGS="${MYCFLAGS} -D_GNU_SOURCE -D_DEFAULT_SOURCE"
else
MYCFLAGS="${MYCFLAGS} -D_GNU_SOURCE"
fi
MYCFLAGS="${MYCFLAGS} -Wno-unused -Wno-uninitialized -Wno-implicit-fallthrough -Wno-volatile-register-var"
# From src/makemake.in
# <cite>
# Do NOT enable -DSAFETY=3 here, because -DSAFETY=3 not only disables some
@ -208,31 +234,12 @@ port=''
%ifarch s390x
##port='--enable-portability'
%endif
case "$(uname -m)" in
i[0-9]86)
MYCFLAGS="${MYCFLAGS}" ;;
arm*) MYCFLAGS="${MYCFLAGS} ${safety}" ;;
aarch64)MYCFLAGS="${MYCFLAGS}" ;;
ppc) MYCFLAGS="${MYCFLAGS}" ;;
s390) MYCFLAGS="${MYCFLAGS}" ;;
x86_64) MYCFLAGS="${MYCFLAGS}" ;;
sparc*) MYCFLAGS="${MYCFLAGS} ${safety}" ;;
ppc64) MYCFLAGS="${MYCFLAGS} ${safety}" ;;
ppc64le)MYCFLAGS="${MYCFLAGS} ${safety}" ;;
s390x) MYCFLAGS="${MYCFLAGS} ${safety}" ;;
ia64) MYCFLAGS="${MYCFLAGS} ${safety}" ;;
axp|alpha)
MYCFLAGS="${MYCFLAGS}" ;;
esac
export CC
export MYCFLAGS
unset noexec nommap safety
#
# Report final architectures
#
echo $(uname -i -m -p) %_build_arch %_arch
echo | $CC $MYCFLAGS -v -E - 2>&1 | grep /cc1
echo | $CC %{optflags} -v -E - 2>&1 | grep /cc1
#
# Environment for the case of missing terminal
#
@ -255,19 +262,16 @@ cat > $SCREENRC<<-EOF
silence on
utf8 on
EOF
#
# Build the current system
#
if test %debug = yes ; then
DEBUG=--with-debug
MYCFLAGS="${MYCFLAGS} -g3 -DDEBUG_GCSAFETY"
else
DEBUG=""
MYCFLAGS="${MYCFLAGS}"
fi
find -name configure | xargs -r \
sed -ri "/ac_precious_vars='build_alias\$/ {N; s/build_alias\\n//; }"
# Runtime linker choose system libraries
sed -ri 's/(\$\{wl\})-rpath (\$\{wl\})/\1-rpath-link \2/g' src/build-aux/config.rpath
# Link libraries if really needed
sed -ri "s/CC='\\$\{CC\}'/CC='\\$\{CC\} -Wl,--as-needed'/g" src/makemake.in
#Default browser
sed -ri 's/;; (\(setq \*browser\* .*\))/\1/' src/cfgunix.lisp
#
# The modules i18n, syscalls, regexp
# are part of the base clisp system.
@ -283,6 +287,7 @@ tail -q -s 0.5 -f $SCREENLOG & pid=$!
--fsstnd=suse \
--with-readline \
--with-dynamic-modules \
--with-ffcall \
--with-gettext \
--with-module=asdf \
--with-module=dbus \
@ -291,13 +296,19 @@ tail -q -s 0.5 -f $SCREENLOG & pid=$!
--with-module=queens \
--with-module=gdbm \
--with-module=gtk2 \
--with-module=pari \
--with-module=pcre \
--with-module=rawsock \
--with-module=zlib \
--with-module=libsvm \
--with-module=bindings/glibc\
--with-module=clx/new-clx \
--with-module=berkeley-db \
--with-module=postgresql
--with-module=postgresql \
--config \
CC="${CC}" \
CFLAGS="%{optflags}" \
LDFLAGS="%{ldflags}"
%_make -C build lispbibl.h
grep TYPECODES build/lispbibl.h || :
@ -339,11 +350,12 @@ find modules/clx/ -name '*.demos' | xargs --no-run-if-empty rm -vf
#
# Current system
#
. ./version.sh
SYSTEM=${RPM_ARCH}-suse-linux
LSPDOC=%{_docdir}/clisp
DOCDOC=${LSPDOC}/doc
CLXDOC=${LSPDOC}/clx
LSPLIB=%{_libdir}/clisp-%{version}
LSPLIB=%{_libdir}/clisp-${VERSION_NUMBER}
CLXLIB=${LSPLIB}/full
#
# Install the current system
@ -384,6 +396,7 @@ find %{buildroot}${LSPLIB}/ -name '*.run' | xargs -r chmod 0755
rm -rf %{buildroot}${LSPLIB}/new-clx/demos/
find %{buildroot} -type f | xargs -r chmod u+w
chmod a+x %{buildroot}${LSPLIB}/build-aux/{config,depcomp}*
install -c -m 644 %{S:2} %{buildroot}%{_datadir}/emacs/site-lisp/clhs.el
%fdupes %{buildroot}${LSPLIB}/
%find_lang clisp
%find_lang clisplow clisp.lang
@ -392,7 +405,7 @@ chmod a+x %{buildroot}${LSPLIB}/build-aux/{config,depcomp}*
%defattr(-,root,root,755)
%{_bindir}/clisp
%{_bindir}/clisp-link
%{_libdir}/clisp-%{version}/
%{_libdir}/clisp-%{version}*/
%{_datadir}/aclocal/clisp.m4
%{_datadir}/emacs/site-lisp/
%doc %{_datadir}/man/man1/clisp*.1.gz