[gprolog/f16] Fix PPC build issue (#758825)

Jochen Schmitt s4504kr at fedoraproject.org
Wed Nov 30 16:27:05 UTC 2011


commit 78261c280ef3573d8d472b743e875854604725a0
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date:   Wed Nov 30 17:00:00 2011 +0100

    Fix PPC build issue (#758825)

 gprolog-1.4.0-ma2asm-pllong.patch |  120 +++++++++++++++++++++++++++++++++++++
 gprolog.spec                      |    9 +++-
 2 files changed, 128 insertions(+), 1 deletions(-)
---
diff --git a/gprolog-1.4.0-ma2asm-pllong.patch b/gprolog-1.4.0-ma2asm-pllong.patch
new file mode 100644
index 0000000..96e02d0
--- /dev/null
+++ b/gprolog-1.4.0-ma2asm-pllong.patch
@@ -0,0 +1,120 @@
+diff -ur gprolog-1.4.0.orig/src/Ma2Asm/alpha_any.c gprolog-1.4.0/src/Ma2Asm/alpha_any.c
+--- gprolog-1.4.0.orig/src/Ma2Asm/alpha_any.c	2011-03-29 05:20:05.000000000 +1300
++++ gprolog-1.4.0/src/Ma2Asm/alpha_any.c	2011-07-05 19:38:52.000000000 +1200
+@@ -870,7 +870,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ int
+-Call_C_Arg_Int(int offset, long int_val)
++Call_C_Arg_Int(int offset, PlLong int_val)
+ {
+   switch (offset)
+     {
+@@ -1433,7 +1433,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ void
+-Cmp_Ret_And_Int(long int_val)
++Cmp_Ret_And_Int(PlLong int_val)
+ {
+   Inst_Printf("lda", "$1,%ld", int_val);
+   Inst_Printf("subq", "$0,$1,$1");
+@@ -1551,7 +1551,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ void
+-Dico_Long(char *name, int global, VType vtype, long value)
++Dico_Long(char *name, int global, VType vtype, PlLong value)
+ {
+   switch (vtype)
+     {
+diff -ur gprolog-1.4.0.orig/src/Ma2Asm/mips_irix.c gprolog-1.4.0/src/Ma2Asm/mips_irix.c
+--- gprolog-1.4.0.orig/src/Ma2Asm/mips_irix.c	2011-03-29 05:20:05.000000000 +1300
++++ gprolog-1.4.0/src/Ma2Asm/mips_irix.c	2011-07-05 19:39:30.000000000 +1200
+@@ -510,7 +510,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ int
+-Call_C_Arg_Int(int offset, long int_val)
++Call_C_Arg_Int(int offset, PlLong int_val)
+ {
+   switch (offset)
+     {
+@@ -1125,7 +1125,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ void
+-Cmp_Ret_And_Int(long int_val)
++Cmp_Ret_And_Int(PlLong int_val)
+ {
+   Inst_Printf("li", "$24,%d", int_val);
+   Inst_Printf("sub", "$12,$2,$24");	/* $2 - $24 -> $12 */
+@@ -1238,7 +1238,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ void
+-Dico_Long(char *name, int global, VType vtype, long value)
++Dico_Long(char *name, int global, VType vtype, PlLong value)
+ {
+   switch (vtype)
+     {
+diff -ur gprolog-1.4.0.orig/src/Ma2Asm/powerpc_any.c gprolog-1.4.0/src/Ma2Asm/powerpc_any.c
+--- gprolog-1.4.0.orig/src/Ma2Asm/powerpc_any.c	2011-03-29 05:20:05.000000000 +1300
++++ gprolog-1.4.0/src/Ma2Asm/powerpc_any.c	2011-07-05 19:17:16.000000000 +1200
+@@ -500,7 +500,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ int
+-Call_C_Arg_Int(int offset, long int_val)
++Call_C_Arg_Int(int offset, PlLong int_val)
+ {
+   BEFORE_ARG;
+ 
+@@ -835,7 +835,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ void
+-Cmp_Ret_And_Int(long int_val)
++Cmp_Ret_And_Int(PlLong int_val)
+ {
+   if (LITTLE_INT(int_val))
+     Inst_Printf("cmpwi", CR(1) "," R(3) ",%ld", int_val);
+@@ -958,7 +958,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ void
+-Dico_Long(char *name, int global, VType vtype, long value)
++Dico_Long(char *name, int global, VType vtype, PlLong value)
+ {
+   switch (vtype)
+     {
+diff -ur gprolog-1.4.0.orig/src/Ma2Asm/sparc_any.c gprolog-1.4.0/src/Ma2Asm/sparc_any.c
+--- gprolog-1.4.0.orig/src/Ma2Asm/sparc_any.c	2011-03-29 05:20:05.000000000 +1300
++++ gprolog-1.4.0/src/Ma2Asm/sparc_any.c	2011-07-05 19:18:29.000000000 +1200
+@@ -449,7 +449,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ int
+-Call_C_Arg_Int(int offset, long int_val)
++Call_C_Arg_Int(int offset, PlLong int_val)
+ {
+   BEFORE_ARG;
+ 
+@@ -792,7 +792,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ void
+-Cmp_Ret_And_Int(long int_val)
++Cmp_Ret_And_Int(PlLong int_val)
+ {
+   if (LITTLE_INT(int_val))
+     Inst_Printf("cmp", "%%o0,%ld", int_val);
+@@ -912,7 +912,7 @@
+  *                                                                         *
+  *-------------------------------------------------------------------------*/
+ void
+-Dico_Long(char *name, int global, VType vtype, long value)
++Dico_Long(char *name, int global, VType vtype, PlLong value)
+ {
+ 
+   switch (vtype)
diff --git a/gprolog.spec b/gprolog.spec
index e2490ac..f984a04 100644
--- a/gprolog.spec
+++ b/gprolog.spec
@@ -1,6 +1,6 @@
 Name:           gprolog
 Version:	1.4.0
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary: 	GNU Prolog is a free Prolog compiler
 
 Group: 		Development/Languages
@@ -9,6 +9,9 @@ URL: 		http://www.gprolog.org
 Source: 	http://www.gprolog.org/gprolog-%{version}.tar.gz
 Patch1:		gprolog-1.4.0-test.patch
 
+# Fix issue of build gprolog on ppc (#758725)
+Patch2:		gprolog-1.4.0-ma2asm-pllong.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 ExclusiveArch:	x86_64 %{ix86} ppc alpha
@@ -43,6 +46,7 @@ Documentation for GNU Prolog.
 %prep
 %setup -q
 %patch1 -p1 -b .tst
+%patch2 -p1 -b .ppc
 
 %build
 cd src
@@ -97,6 +101,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc src/dist-doc/*
 
 %changelog
+* Wed Nov 30 2011 Jochen Schmitt <Jochen herr-schmitt de> - 1.4.0-3
+- Fix PPC build issue (#758825)
+
 * Sun Jul  3 2011 Jochen Schmitt <Jochen herr-schmitt de> - 1.4.0-2
 - Built with $$RPM_OPT_FLAGS (#718457)
 


More information about the scm-commits mailing list