[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-commits
Subject:    [Sbcl-commits] master: Take DragonFly patches (slightly modified) from John Marino
From:       Douglas Katzman via Sbcl-commits <sbcl-commits () lists ! sourceforge ! net>
Date:       2020-05-21 14:47:58
Message-ID: 1590072478.472228.11603 () sfp-scm-2 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]

The branch "master" has been updated in SBCL:
       via  4b6804e5447598185990476e8ae1f3852ca3d9e0 (commit)
      from  e80f2b9abd8788f20e17eae5d75a9220b7c58030 (commit)

- Log -----------------------------------------------------------------
commit 4b6804e5447598185990476e8ae1f3852ca3d9e0
Author: Douglas Katzman <dougk@google.com>
Date:   Thu May 21 10:45:06 2020 -0400

    Take DragonFly patches (slightly modified) from John Marino
    
    * make-config.sh now uses $sbcl_os = dragonflybsd so that it matches *bsd.
      The lisp feature is unchanged, still :DRAGONFLY.
      :restore-fs-segment-register is not needed, as it's 32-bit only.
      Further, assume :ELF for all BSD derivatives.
    
    * After git rev 2454a32d ("Default to UTF-8") there is no use of
      the langinfo.h header which reduces #ifdeffage in grovel-headers
    
    * Drive-by C compiler warning fix on FreeBSD due to pthread_attr_get_np()
      without a prototype.  And OpenBSD still does its own thing.
---
 make-config.sh                   | 30 +++++++++---------------------
 package-data-list.lisp-expr      |  2 +-
 src/runtime/bsd-os.h             |  2 +-
 src/runtime/thread.c             |  4 ++--
 tools-for-build/grovel-headers.c | 11 ++---------
 5 files changed, 15 insertions(+), 34 deletions(-)

diff --git a/make-config.sh b/make-config.sh
index bd3b6ad2b..aec28691f 100755
--- a/make-config.sh
+++ b/make-config.sh
@@ -294,7 +294,7 @@ case `uname` in
         esac
         ;;
     DragonFly)
-	sbcl_os="dragonfly"
+	sbcl_os="dragonflybsd"
 	;;
     Darwin)
         sbcl_os="darwin"
@@ -424,7 +424,7 @@ then
     # If --fancy, enable threads on platforms where they can be built.
     case $sbcl_arch in
         x86|x86-64|ppc|arm64|riscv)
-	    if [ "$sbcl_os" = "dragonfly" ]
+	    if [ "$sbcl_os" = "dragonflybsd" ]
 	    then
 		echo "No threads on this platform."
 	    else
@@ -513,7 +513,6 @@ case "$sbcl_os" in
 		;;
         esac
 
-
         link_or_copy Config.$sbcl_arch-linux Config
         link_or_copy $sbcl_arch-linux-os.h target-arch-os.h
         link_or_copy linux-os.h target-os.h
@@ -533,13 +532,12 @@ case "$sbcl_os" in
         link_or_copy haiku-os.h target-os.h
         ;;
     *bsd)
-        printf ' :unix' >> $ltf
-        printf ' :bsd' >> $ltf
+        printf ' :unix :bsd :elf' >> $ltf
+        # FIXME: can we enable :gcc-tls across all variants?
         link_or_copy $sbcl_arch-bsd-os.h target-arch-os.h
         link_or_copy bsd-os.h target-os.h
         case "$sbcl_os" in
             *freebsd)
-                printf ' :elf' >> $ltf
                 printf ' :freebsd' >> $ltf
                 printf ' :gcc-tls' >> $ltf
                 if [ $sbcl_os = "gnu-kfreebsd" ]; then
@@ -552,33 +550,23 @@ case "$sbcl_os" in
                 link_or_copy Config.$sbcl_arch-$sbcl_os Config
                 ;;
             openbsd)
-                printf ' :elf' >> $ltf
                 printf ' :openbsd' >> $ltf
                 link_or_copy Config.$sbcl_arch-openbsd Config
                 ;;
             netbsd)
                 printf ' :netbsd' >> $ltf
-                printf ' :elf' >> $ltf
                 link_or_copy Config.$sbcl_arch-netbsd Config
                 ;;
+            dragonflybsd)
+                printf ' :dragonfly' >> $ltf
+                link_or_copy Config.$sbcl_arch-dragonfly Config
+                ;;
             *)
                 echo unsupported BSD variant: `uname`
                 exit 1
                 ;;
         esac
         ;;
-    dragonfly)
-        printf ' :unix' >> $ltf
-        printf ' :bsd' >> $ltf
-        printf ' :elf' >> $ltf
-        printf ' :dragonfly' >> $ltf
-        if [ $sbcl_arch = "x86" ]; then
-            printf ' :restore-fs-segment-register-from-tls' >> $ltf
-        fi
-        link_or_copy $sbcl_arch-bsd-os.h target-arch-os.h
-        link_or_copy bsd-os.h target-os.h
-        link_or_copy Config.$sbcl_arch-dragonfly Config
-        ;;
     darwin)
         printf ' :unix' >> $ltf
         printf ' :mach-o' >> $ltf
@@ -691,7 +679,7 @@ elif [ "$sbcl_arch" = "x86-64" ]; then
     printf ' :unbind-in-unwind :no-continue-unwind' >> $ltf
 
     case "$sbcl_os" in
-    linux | darwin | *bsd | dragonfly)
+    linux | darwin | *bsd)
         printf ' :immobile-space :immobile-code :compact-instance-header' >> $ltf
     esac
 elif [ "$sbcl_arch" = "mips" ]; then
diff --git a/package-data-list.lisp-expr b/package-data-list.lisp-expr
index 4342f1ada..27fe46b36 100644
--- a/package-data-list.lisp-expr
+++ b/package-data-list.lisp-expr
@@ -3070,7 +3070,7 @@ no guarantees of interface stability."
                "POLLFD" "POLLIN" "POLLOUT" "POLLHUP" "POLLNVAL" "POLLERR"
                "FD" "EVENTS" "REVENTS"
                "FD-ISSET" "FD-SET" "UNIX-FAST-SELECT"
-               "UNIX-KILL" "CODESET"
+               "UNIX-KILL"
                "FD-ZERO" "FD-CLR"
                "FD-SETSIZE" "UNIX-FAST-GETRUSAGE"
                "UNIX-KILLPG"))
diff --git a/src/runtime/bsd-os.h b/src/runtime/bsd-os.h
index 9ffda9509..0c5526c2c 100644
--- a/src/runtime/bsd-os.h
+++ b/src/runtime/bsd-os.h
@@ -22,7 +22,7 @@
 #endif
 
 typedef caddr_t os_vm_address_t;
-#if defined __NetBSD__ || defined __OpenBSD__
+#if defined __NetBSD__ || defined __OpenBSD__ || defined __DragonFly__
 typedef size_t os_vm_size_t;
 #else
 typedef vm_size_t os_vm_size_t;
diff --git a/src/runtime/thread.c b/src/runtime/thread.c
index 2ecaeb245..57220ad1d 100644
--- a/src/runtime/thread.c
+++ b/src/runtime/thread.c
@@ -50,7 +50,7 @@
 
 #ifdef LISP_FEATURE_SB_THREAD
 
-#ifdef LISP_FEATURE_OPENBSD
+#if defined LISP_FEATURE_OPENBSD || defined LISP_FEATURE_FREEBSD || defined LISP_FEATURE_DRAGONFLY
 #include <pthread_np.h>
 #endif
 
@@ -548,7 +548,7 @@ attach_os_thread(init_thread_data *scribble)
     stack_addr = (char*)pthread_get_stackaddr_np(os) - stack_size;
 #else
     pthread_attr_t attr;
-#ifdef LISP_FEATURE_FREEBSD
+#if defined LISP_FEATURE_FREEBSD || defined LISP_FEATURE_DRAGONFLY
     pthread_attr_get_np(os, &attr);
 #else
     int pthread_getattr_np(pthread_t, pthread_attr_t *);
diff --git a/tools-for-build/grovel-headers.c b/tools-for-build/grovel-headers.c
index e97bf4484..4502fe205 100644
--- a/tools-for-build/grovel-headers.c
+++ b/tools-for-build/grovel-headers.c
@@ -39,13 +39,10 @@
   #include <sys/times.h>
   #include <sys/wait.h>
   #include <sys/ioctl.h>
-#ifdef LISP_FEATURE_ANDROID
+#if defined __HAIKU__ || defined __DragonFly__ || defined LISP_FEATURE_ANDROID
   #include <termios.h>
 #else
-# ifndef LISP_FEATURE_HAIKU
-#  include <sys/termios.h>
-# endif
-  #include <langinfo.h>
+  #include <sys/termios.h>
 #endif
   #include <sys/time.h>
   #include <dlfcn.h>
@@ -170,10 +167,6 @@ main(int argc, char __attribute__((unused)) *argv[])
     defconstant("pollnval", POLLNVAL);
     defconstant("pollerr", POLLERR);
     DEFTYPE("nfds-t", nfds_t);
-#ifndef LISP_FEATURE_ANDROID
-    printf(";;; langinfo\n");
-    defconstant("codeset", CODESET);
-#endif
     printf(";;; types, types, types\n");
     DEFTYPE("clock-t", clock_t);
     DEFTYPE("dev-t",   dev_t);

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL


_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic