1.0.24.12: adding and fixing the HPUX/HPPA build target
authorNikodemus Siivola <nikodemus@random-state.net>
Sat, 3 Jan 2009 15:50:46 +0000 (15:50 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sat, 3 Jan 2009 15:50:46 +0000 (15:50 +0000)
 * Patch by Larry Valkama.

base-target-features.lisp-expr
make-config.sh
tests/dynamic-extent.impure.lisp
tools-for-build/grovel-headers.c
tools-for-build/ldso-stubs.lisp
version.lisp-expr

index f1110c4..ba12b0d 100644 (file)
  ;;   :darwin  = We're intended to run under Darwin (including MacOS X).
  ;;   :sunos   = We're intended to run under Solaris user environment
  ;;              with the SunOS kernel.
+ ;;   :hpux    = We're intended to run under HP-UX 11.11 or later
  ;;   :osf1    = We're intended to run under Tru64 (aka Digital Unix
  ;;              aka OSF/1).
  ;;   :win32   = We're intended to under some version of Microsoft Windows.
index e0e439d..2a70efe 100644 (file)
@@ -53,6 +53,9 @@ case `uname` in
     CYGWIN* | WindowsNT | MINGW*)
         sbcl_os="win32"
         ;;
+    HP-UX)
+        sbcl_os="hpux"
+        ;;
     *)
         echo unsupported OS type: `uname`
         exit 1
@@ -110,6 +113,7 @@ case `uname -m` in
     ppc64) guessed_sbcl_arch=ppc ;;
     Power*Macintosh) guessed_sbcl_arch=ppc ;;
     parisc) guessed_sbcl_arch=hppa ;;
+    9000/800) guessed_sbcl_arch=hppa ;;
     mips*) guessed_sbcl_arch=mips ;;
     *)
         # If we're not building on a supported target architecture, we
@@ -188,6 +192,14 @@ case "$sbcl_os" in
         link_or_copy $sbcl_arch-osf1-os.h target-arch-os.h
         link_or_copy osf1-os.h target-os.h
         ;;
+    hpux)
+        printf ' :unix' >> $ltf
+        printf ' :elf' >> $ltf
+        printf ' :hpux' >> $ltf
+        link_or_copy Config.$sbcl_arch-hpux Config
+        link_or_copy $sbcl_arch-hpux-os.h target-arch-os.h
+        link_or_copy hpux-os.h target-os.h
+        ;;
     *bsd)
         printf ' :unix' >> $ltf
         printf ' :bsd' >> $ltf
index 9aba2db..7867bae 100644 (file)
 
 (defun-with-dx dx-value-cell (x)
   ;; Not implemented everywhere, yet.
-  #+(or x86 x86-64 mips)
+  #+(or x86 x86-64 mips hppa)
   (let ((cell x))
     (declare (sb-int:truly-dynamic-extent cell))
     (flet ((f ()
 
 (defvar *a-cons* (cons nil nil))
 
-#+(or x86 x86-64 alpha ppc sparc mips)
+#+(or x86 x86-64 alpha ppc sparc mips hppa)
 (progn
   (assert-no-consing (dxclosure 42))
   (assert-no-consing (dxlength 1 2 3))
index fb97cfc..a529fcb 100644 (file)
 
 #include "genesis/config.h"
 
+#ifdef LISP_FEATURE_HPUX
+#include <sys/bsdtty.h> /* for TIOCGPGRP */
+#endif
+
 #include "wrap.h"
 
 #define DEFTYPE(lispname,cname) { cname foo; \
@@ -323,11 +327,10 @@ main(int argc, char *argv[])
     printf("\n");
 
     printf(";;; various ioctl(2) flags\n");
-    defconstant("tiocnotty",  TIOCNOTTY);
-    defconstant("tiocgwinsz", TIOCGWINSZ);
-    defconstant("tiocswinsz", TIOCSWINSZ);
     defconstant("tiocgpgrp",  TIOCGPGRP);
     defconstant("tiocspgrp",  TIOCSPGRP);
+    defconstant("tiocgwinsz", TIOCGWINSZ);
+    defconstant("tiocswinsz", TIOCSWINSZ);
     /* KLUDGE: These are referenced by old CMUCL-derived code, but
      * Linux doesn't define them.
      *
@@ -399,7 +402,7 @@ main(int argc, char *argv[])
     defsignal("sigwaiting", SIGWAITING);
 #endif
     defsignal("sigwinch", SIGWINCH);
-#ifndef SIGXCPU
+#ifdef SIGXCPU
     defsignal("sigxcpu", SIGXCPU);
 #endif
 #ifdef SIGXFSZ
@@ -428,7 +431,6 @@ main(int argc, char *argv[])
 #else
     defconstant("fpe-fltsub", -1);
 #endif
-
 #endif // !WIN32
     return 0;
 }
index 45d2425..09b4574 100644 (file)
 ;;;; files for more information.
 
 #!-sparc
-(defun ldso-stubify (fct str)
-  (format str "LDSO_STUBIFY(~A)~%" fct))
+(defun ldso-stubify (fct stream)
+  (format stream "LDSO_STUBIFY(~A)~%" fct))
 
 ;;; This is an attempt to follow DB's hint of sbcl-devel
 ;;; 2001-09-18. -- CSR
 ;;;
 ;;; And an attempt to work around the Sun toolchain... --ns
 #!+sparc
-(defun ldso-stubify (fct str)
-  (apply #'format str "
+(defun ldso-stubify (fct stream)
+  (apply #'format stream "
 .globl ldso_stub__~A ;                          \\
         FUNCDEF(ldso_stub__~A) ;                \\
 ldso_stub__~A: ;                                \\
@@ -42,6 +42,18 @@ ldso_stub__~A: ;                                \\
         .size    ldso_stub__~A,.L~Ae1-ldso_stub__~A ;~%"
           (make-list 9 :initial-element fct)))
 
+#!+hppa
+(defun ldso-stubify (fct stream)
+  (let ((stub (format nil "ldso_stub__~a" fct)))
+    (apply #'format stream (list
+"    .export ~A
+~A:
+    .proc
+    .callinfo
+    b,n ~a
+    .procend
+    .import ~a,code~%" stub stub fct fct))))
+
 (defvar *preludes* '("
 /* This is an automatically generated file, please do not hand-edit it.
  * See the program tools-for-build/ldso-stubs.lisp. */
@@ -85,6 +97,10 @@ ldso_stub__ ## fct: ;                           \\
 .L ## fct ## e1: ;                              \\
         .size    ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ;"
 
+#!+hppa "
+        .level  2.0
+        .text"
+
 #!+(and (not darwin) ppc) "
 #define LDSO_STUBIFY(fct)                       \\
 .globl ldso_stub__ ## fct ;                     \\
@@ -271,7 +287,7 @@ ldso_stub__ ## fct: ;                  \\
                    "tcsetattr"
                    "truncate"
                    "ttyname"
-                   "tzname"
+                   #!-hpux "tzname"
                    "unlink"
                    "utimes"
                    "wait3"
index 2182fd1..4f0c766 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.24.11"
+"1.0.24.12"