bug-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gprolog 1.3.0 porting problems on Solaris 8 sparc (32-bit)


From: Paul Eggert
Subject: gprolog 1.3.0 porting problems on Solaris 8 sparc (32-bit)
Date: Fri, 02 Feb 2007 15:57:34 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Here's a proposed patch to gprolog 1.3.0.

2007-02-02  Paul Eggert  <address@hidden>

        Work around the minor problems I had with building and checking
        gprolog 1.3.0 on Solaris 8 (sparc) with GCC 4.1.1 and the Solaris
        assembler /usr/ccs/bin/as.

        * EnginePl/Makefile.in (address@hidden@): Rewrite to avoid
        "echo -e", which is not portable according to POSIX and does not
        work with Solaris /bin/sh.

        * Ma2Asm/chkma.c (main): Don't complain about FAST being defined
        unless it actually is defined.

        * Ma2Asm/sparc_any.c (Dico_String_Start, Data_Start):
        Properly quote .section names.

--- EnginePl/Makefile.in~       2007-01-04 02:21:49.000000000 -0800
+++ EnginePl/Makefile.in        2007-02-02 15:15:51.079794000 -0800
@@ -114,7 +114,10 @@ clean-check: clean-test_oc
 TEST_OC_SRC=obj_chain.c test_oc.c
 
 address@hidden@: obj_chain.c obj_chain.h test_oc.c test_oc_defs.h
-       for i in 1 2 3 4 5; do echo -e "#define OBJ_NO $$i\\n#include 
\"test_oc_defs.h\"" >/tmp/test_oc_m$$i.c; done
+       for i in 1 2 3 4 5; do \
+         (echo "#define OBJ_NO $$i" && \
+          echo "#include \"test_oc_defs.h\"") >/tmp/test_oc_m$$i.c || exit; \
+       done
        $(CC) $(CFLAGS) @address@hidden@EXE_SUFFIX@ test_oc.c obj_chain.c -I. 
/tmp/test_oc_m[1-5].c
        rm -f /tmp/test_oc_m[1-5].c
 
--- Ma2Asm/chkma.c~     2007-01-04 02:35:14.000000000 -0800
+++ Ma2Asm/chkma.c      2007-02-02 15:38:52.427285200 -0800
@@ -229,7 +229,9 @@ main(int argc, char *argv[])
 
 #elif !defined(FC_USED_TO_COMPILE_CORE)
 
+#ifdef FAST
 #error FAST defined but cannot compile for FC
+#endif
 
 #else
 
--- Ma2Asm/sparc_any.c~ 2007-01-04 02:35:14.000000000 -0800
+++ Ma2Asm/sparc_any.c  2007-02-02 15:10:37.337205000 -0800
@@ -843,7 +843,7 @@ C_Ret(void)
 void
 Dico_String_Start(int nb_consts)
 {
-  Inst_Printf(".section", ".rodata");
+  Inst_Printf(".section", "\".rodata\"");
 }
 
 
@@ -961,7 +961,7 @@ Data_Start(char *initializer_fct)
   if (initializer_fct == NULL)
     return;
 
-  Inst_Printf(".section", ".ctors,#alloc,#write");
+  Inst_Printf(".section", "\".ctors\",#alloc,#write");
   Inst_Printf(".align", "4");
   Inst_Printf(".long", UN "%s", initializer_fct);
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]