Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13bbb8a0c5 | ||
|
|
05c3e8f062 | ||
|
|
968b4978af |
4 changed files with 98 additions and 1 deletions
27
yap-6.2.0-Remove-feature-macro.patch
Normal file
27
yap-6.2.0-Remove-feature-macro.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
From 9419d68dc09a4e3f7adfe7e654ef3952327cd9bf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Wed, 7 Dec 2011 14:14:25 +0100
|
||||
Subject: [PATCH] Remove feature macro
|
||||
|
||||
This macro clashes with struct ppc_debug_info member in <asm/ptrace.h>
|
||||
on PPC. The macro is not used anywhere in yap.
|
||||
---
|
||||
packages/PLStream/pl-incl.h | 2 --
|
||||
1 files changed, 0 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/packages/PLStream/pl-incl.h b/packages/PLStream/pl-incl.h
|
||||
index aa7b99c..8bf63de 100755
|
||||
--- a/packages/PLStream/pl-incl.h
|
||||
+++ b/packages/PLStream/pl-incl.h
|
||||
@@ -363,8 +363,6 @@ typedef struct PL_local_data {
|
||||
|
||||
#define usedStack(D) 0
|
||||
|
||||
-#define features (LD->feature.mask)
|
||||
-
|
||||
extern PL_local_data_t lds;
|
||||
|
||||
#define exception_term (LD->exception.term)
|
||||
--
|
||||
1.7.7.4
|
||||
|
||||
11
yap-6.2.0-ppc-mmap-addr.patch
Normal file
11
yap-6.2.0-ppc-mmap-addr.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- yap-6.orig/H/Yap.h 2010-10-18 21:48:20.000000000 +1300
|
||||
+++ yap-6/H/Yap.h 2010-12-01 20:09:57.000000000 +1300
|
||||
@@ -268,6 +268,8 @@
|
||||
#define MMAP_ADDR 0x200000000
|
||||
#elif defined(__APPLE__) && !__LP64__
|
||||
#define MMAP_ADDR 0x20000000
|
||||
+#elif defined(__powerpc__)
|
||||
+#define MMAP_ADDR 0x20000000
|
||||
#else
|
||||
#define MMAP_ADDR 0x10000000
|
||||
#endif
|
||||
41
yap-6.2.2-Off-by-one-error-when-initializing-yap_flags.patch
Normal file
41
yap-6.2.2-Off-by-one-error-when-initializing-yap_flags.patch
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
From fa8f0f7b2d107770ae4d37bc77c902eafc59c86c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
||||
Date: Mon, 7 Jan 2013 17:31:08 +0100
|
||||
Subject: [PATCH] Off-by-one error when initializing yap_flags
|
||||
|
||||
The yap_flags_field of all_heap_codes structure is of type
|
||||
Int[LAST_FLAG], thus the loop should iterate from 0 to LAST_FLAG - 1.
|
||||
---
|
||||
C/init.c | 2 +-
|
||||
C/stdpreds.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/C/init.c b/C/init.c
|
||||
index dda09cc..8f01864 100755
|
||||
--- a/C/init.c
|
||||
+++ b/C/init.c
|
||||
@@ -1348,7 +1348,7 @@ Yap_InitWorkspace(UInt Heap, UInt Stack, UInt Trail, UInt Atts, UInt max_table_s
|
||||
Yap_InitTime ();
|
||||
/* InitAbsmi must be done before InitCodes */
|
||||
/* This must be done before initialising predicates */
|
||||
- for (i = 0; i <= LAST_FLAG; i++) {
|
||||
+ for (i = 0; i < LAST_FLAG; i++) {
|
||||
yap_flags[i] = 0;
|
||||
}
|
||||
#ifdef MPW
|
||||
diff --git a/C/stdpreds.c b/C/stdpreds.c
|
||||
index a4c0e86..8a4183f 100755
|
||||
--- a/C/stdpreds.c
|
||||
+++ b/C/stdpreds.c
|
||||
@@ -3637,7 +3637,7 @@ p_access_yap_flags(void)
|
||||
return(FALSE);
|
||||
}
|
||||
flag = IntOfTerm(tflag);
|
||||
- if (flag < 0 || flag > NUMBER_OF_YAP_FLAGS) {
|
||||
+ if (flag < 0 || flag >= NUMBER_OF_YAP_FLAGS) {
|
||||
return(FALSE);
|
||||
}
|
||||
#ifdef TABLING
|
||||
--
|
||||
1.7.11.7
|
||||
|
||||
20
yap.spec
20
yap.spec
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
Name: yap
|
||||
Version: 6.2.0
|
||||
Release: 5%{?dist}
|
||||
Release: 7%{?dist}
|
||||
Summary: High-performance Prolog Compiler
|
||||
Group: Development/Languages
|
||||
# README Perl Artistic license 2 and the FSF's LGPL
|
||||
|
|
@ -27,6 +27,12 @@ Patch7: yap-6.2.0-Do-not-install-info-dir-index.patch
|
|||
Patch8: yap-6.2.0-fix-chr-install-from-Keri.patch
|
||||
# fix non-x86 build with recent gcc
|
||||
Patch9: yap-6.2.0-gprof-macro.patch
|
||||
# Fix segfaults on PPC. Taken from Gentoo yap-6.2.0-gentoo-patchset-5.tar.gz
|
||||
Patch10: yap-6.2.0-ppc-mmap-addr.patch
|
||||
# Fix compilation of PLStream package on PPC
|
||||
Patch11: yap-6.2.0-Remove-feature-macro.patch
|
||||
# Reported to upstream <yap-users@lists.sourceforge.net>
|
||||
Patch12: yap-6.2.2-Off-by-one-error-when-initializing-yap_flags.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: gmp-devel
|
||||
|
|
@ -82,6 +88,9 @@ Documentation for Yap.
|
|||
%patch7 -p1 -b .do_not_install_info_index
|
||||
%patch8 -p1 -b .fix_chr_install
|
||||
%patch9 -p1 -b .macro
|
||||
%patch10 -p1 -b .ppc
|
||||
%patch11 -p1 -b .remove_feature_macro
|
||||
%patch12 -p1 -b .initialization
|
||||
|
||||
# remove redundant RPATH
|
||||
sed -i 's/-Wl,-R\(,\)\{0,1\}\\$(LIBDIR)//' configure.in
|
||||
|
|
@ -141,6 +150,9 @@ make %{?_smp_mflags} info
|
|||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%ifarch ppc ppc64
|
||||
ulimit -s unlimited
|
||||
%endif
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
make DESTDIR=$RPM_BUILD_ROOT install_info
|
||||
|
||||
|
|
@ -227,6 +239,12 @@ rm -rf $RPM_BUILD_ROOT
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Jan 07 2013 Petr Pisar <ppisar@redhat.com> - 6.2.0-7
|
||||
- Fix off-by-one error when initializing yap_flags
|
||||
|
||||
* Wed Dec 07 2011 Petr Pisar <ppisar@redhat.com> - 6.2.0-6
|
||||
- Fix building on PowerPC (bug #751144)
|
||||
|
||||
* Thu Jun 23 2011 Dan Horák <dan@danny.cz> - 6.2.0-5
|
||||
- fix non-x86 builds with recent gcc
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue