Add a crossbuild test config for #-sb-unicode

which happens to be #+win32 and exposed a bug that a no-longer-needed allowance
for warnings caused it to exit with success despite a missing BASE-CHAR-P, and
also that there was also a pre-existing warning in stream.lisp if #-sb-unicode.
This commit is contained in:
Douglas Katzman 2024-02-09 17:07:10 -05:00
parent 5cb50200e4
commit 1cdb582cca
5 changed files with 15 additions and 7 deletions

View file

@ -42,6 +42,7 @@
("sparc" ("sparc-sunos" :big-endian :unix :sunos :elf)
("sparc-linux" :big-endian :unix :linux :elf))
("x86" ("x86" :little-endian :largefile)
("x86-ascii" :little-endian :largefile (not :sb-unicode))
("x86-thread" :little-endian :largefile :sb-thread)
("x86-linux" :little-endian :largefile :sb-thread :linux :unix :elf :sb-thread))
("x86-64" ("x86-64" :little-endian :avx2 :gencgc :sb-simd-pack :sb-simd-pack-256)

View file

@ -59,6 +59,11 @@ obj/xbuild/x86/xc.core: $(DEPS1)
obj/xbuild/x86.core: obj/xbuild/x86/xc.core
$(SBCL) $(ARGS) x86 < $(SCRIPT2)
obj/xbuild/x86-ascii/xc.core: $(DEPS1)
$(SBCL) $(ARGS) x86-ascii x86 "(:WIN32 :SB-THREAD :SB-SAFEPOINT :LITTLE-ENDIAN :LARGEFILE (NOT :SB-UNICODE))" < $(SCRIPT1)
obj/xbuild/x86-ascii.core: obj/xbuild/x86-ascii/xc.core
$(SBCL) $(ARGS) x86-ascii < $(SCRIPT2)
obj/xbuild/x86-thread/xc.core: $(DEPS1)
$(SBCL) $(ARGS) x86-thread x86 "(:WIN32 :SB-THREAD :SB-SAFEPOINT :LITTLE-ENDIAN :LARGEFILE :SB-THREAD)" < $(SCRIPT1)
obj/xbuild/x86-thread.core: obj/xbuild/x86-thread/xc.core

View file

@ -4,12 +4,14 @@
(destructuring-bind (first second third) (cdr *posix-argv*)
(values first second third)))
(arch-symbol (intern (string-upcase target-name) "KEYWORD"))
;; TODO: allow subtractive features too
(add-features (read-from-string features))
(features (read-from-string features))
(subtract-features
(mapcan (lambda (x) (if (typep x '(cons (eql not))) (list (cadr x))))
features))
(add-features (remove-if-not #'symbolp features))
(build-dir (format nil "obj/xbuild/~A/" configuration-name))
(ltf (format nil "~A/local-target-features" build-dir))
(objroot (format nil "~A/from-host/" build-dir)))
;; (format t "~&added features: ~S~%" add-features)
(ensure-directories-exist objroot)
(defvar *sbcl-host-obj-prefix* objroot)
(let ((makeflags (sb-ext:posix-getenv "MAKEFLAGS")))
@ -23,7 +25,7 @@
:if-does-not-exist :create
:if-exists :supersede)
(format t "(lambda (features)
(union features (list :crossbuild-test :os-provides-dlopen ~s~{ ~s~}~%"
(set-difference (union features (list :crossbuild-test :os-provides-dlopen ~s~{ ~s~}~%"
arch-symbol add-features)
;; "features" contains the mandatory set of symbols for any build of that target.
(let ((features-filename "features"))
@ -32,7 +34,7 @@
(let ((string (make-string (file-length f))))
(read-sequence string f)
(write-string string))))
(format t ")))~%"))
(format t ")) '~S))~%" subtract-features))
(load "make-host-1.lisp")
(finish-output sb-sys:*stdout*)
(finish-output sb-sys:*stderr*)

View file

@ -45,7 +45,7 @@
sb-c::*undefined-warnings*)))
(finish-output host-sb-sys:*stdout*)
(finish-output host-sb-sys:*stderr*)
(when (and warnings (not (target-featurep :win32)))
(when warnings
(error "Fail")))
(load "tools-for-build/corefile.lisp" :verbose nil)

View file

@ -2675,7 +2675,7 @@ benefit of the function GET-OUTPUT-STREAM-STRING."
(setf (ansi-stream-misc stream) misc)))
(defun stdstream-external-format (fd)
#-win32 (declare (ignore fd))
(declare (ignorable fd))
(let* ((keyword (cond #+(and win32 sb-unicode)
((sb-win32::console-handle-p fd)
:ucs-2)