[packages/clisp] - ugly hack for fixing build on x86 - patch to support newer gcc releases - info about newer release

hawk hawk at pld-linux.org
Mon Sep 2 21:12:06 CEST 2019


commit 4cbc7edad9942fdfb800486a6b494521a6cfe478
Author: Marcin Krol <hawk at tld-linux.org>
Date:   Mon Sep 2 21:09:42 2019 +0200

    - ugly hack for fixing build on x86
    - patch to support newer gcc releases
    - info about newer release in TODO

 clisp.spec | 10 +++++++++-
 gcc.patch  | 39 +++++++++++++++++++++++++++++++++++++++
 x86.patch  | 12 ++++++++++++
 3 files changed, 60 insertions(+), 1 deletion(-)
---
diff --git a/clisp.spec b/clisp.spec
index c206982..a3db422 100644
--- a/clisp.spec
+++ b/clisp.spec
@@ -1,6 +1,8 @@
 # TODO:
 # - review alpha patch
 # - unpackaged files (see the end of spec)
+# - there is newer clisp release available at https://gitlab.com/gnu-clisp/clisp.git
+#   and in some distros (ie. Fedora/Rawhide)
 #
 # Conditional build:
 %bcond_with	tests	# run test suite `make check' (uses network, won't pass on vserver)
@@ -10,7 +12,7 @@ Summary(pl.UTF-8):	Implementacja Common Lisp (ANSI CL)
 Summary(pt_BR.UTF-8):	Implementação do Common Lisp (ANSI CL)
 Name:		clisp
 Version:	2.49
-Release:	8
+Release:	9
 License:	GPL v2
 Group:		Development/Languages
 Source0:	http://download.sourceforge.net/clisp/%{name}-%{version}.tar.bz2
@@ -21,6 +23,8 @@ Patch2:		%{name}-glibc.patch
 # https://sourceforge.net/p/clisp/bugs/688/attachment/patch-modules_readline_readline.lisp
 Patch3:		%{name}-readline.patch
 Patch4:		x32.patch
+Patch5:		x86.patch
+Patch6:		gcc.patch
 URL:		http://clisp.cons.org/
 BuildRequires:	ffcall-devel
 BuildRequires:	gettext-tools
@@ -87,6 +91,10 @@ software livre, distribuído sob os termos da GNU GPL.
 %patch2 -p1
 %patch3 -p0
 %patch4 -p1
+%ifarch %{ix86}
+%patch5 -p1
+%endif
+%patch6 -p1
 
 # changing default -O to optflags causes memory fault on amd64
 # - so something is broken... code or compiler
diff --git a/gcc.patch b/gcc.patch
new file mode 100644
index 0000000..e53cfdd
--- /dev/null
+++ b/gcc.patch
@@ -0,0 +1,39 @@
+diff -ur clisp-2.49.orig/src/makemake.in clisp-2.49/src/makemake.in
+--- clisp-2.49.orig/src/makemake.in	2019-09-02 21:04:20.246000000 +0200
++++ clisp-2.49/src/makemake.in	2019-09-02 21:06:35.346000000 +0200
+@@ -1235,7 +1235,7 @@
+   if [ $CROSS = false ] ; then
+     case "$XCC_GCC_VERSION" in
+       # gcc 2.7 introduced an annoying warning, but gcc 2.8 has a workaround:
+-      2.[8-9]* | 3.* | 4.* | egcs-2.*)
++      2.[8-9]* | 3.* | 4.* | 5.* | 6.* | 7.* | 8.* | 9.* | egcs-2.*)
+         XCFLAGS=$XCFLAGS' -Wno-sign-compare -Wno-format-nonliteral'
+         ;;
+       * ) ;;
+@@ -1259,7 +1259,7 @@
+             # gcc-2.7.2 has a strength-reduction bug (fixed in gcc-2.7.2.1,
+             # also fixed through the specs file of some Linux distributions).
+             XCFLAGS=$XCFLAGS' -O2 -fexpensive-optimizations -fno-strength-reduce' ;;
+-          2.3.[2-9]* | 2.[4-9]* | 3.* | 4.* | egcs-2.*)
++          2.3.[2-9]* | 2.[4-9]* | 3.* | 4.* | 5.* | 6.* | 7.* | 8.* | 9.* | egcs-2.*)
+             XCFLAGS=$XCFLAGS' -O2 -fexpensive-optimizations' ;;
+           * )
+             XCFLAGS=$XCFLAGS' -O' ;;
+@@ -1278,7 +1278,7 @@
+             # egcs-1.0.3 and egcs-1.1.1 produce incorrect code when compiling
+             # lisparit (function UDS_divide_).
+             XCFLAGS=$XCFLAGS' -O2 -fno-schedule-insns' ;;
+-          2.9* | 3.* | 4.*)
++          2.9* | 3.* | 4.* | 5.* | 6.* | 7.* | 8.* | 9.*)
+             # gcc-2.95 produces incorrect code when compiling predtype
+             # (function C_coerce).
+             XCFLAGS=$XCFLAGS' -O2 -fno-schedule-insns -fno-gcse' ;;
+@@ -1313,7 +1313,7 @@
+     esac
+   fi # !DEBUGGING
+   case "$XCC_GCC_VERSION" in
+-    3* | 4*)
++    3* | 4* | 5* | 6* | 7* | 8* | 9*)
+       # When not optimizing on linux, or with Apple's gcc 4 on MacOS X,
+       # or with GCC 4 when "gcc -Os" is used:
+       #   C_CODE_ALIGNMENT is wrong. &EVAL-WHEN = 0x806D512
diff --git a/x86.patch b/x86.patch
new file mode 100644
index 0000000..7230850
--- /dev/null
+++ b/x86.patch
@@ -0,0 +1,12 @@
+diff -ur clisp-2.49.orig/src/makemake.in clisp-2.49/src/makemake.in
+--- clisp-2.49.orig/src/makemake.in	2010-07-07 17:15:35.000000000 +0200
++++ clisp-2.49/src/makemake.in	2019-09-02 21:04:20.246000000 +0200
+@@ -1138,7 +1138,7 @@
+ case "$host_cpu" in
+   hppa*) cpu=hppa ;;
+   arm*)  cpu=arm  ;;
+-  x86_64) cpu=x86_64 ;;
++  x86_64) cpu=i686 ;;
+   ia64)   cpu=ia64 ;;
+   mips)   cpu=mips ;;
+   mips64*) cpu=mips64 ;;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/clisp.git/commitdiff/4cbc7edad9942fdfb800486a6b494521a6cfe478



More information about the pld-cvs-commit mailing list