Compare commits
147 Commits
master
...
wip-0.20-o
Author | SHA1 | Date |
---|---|---|
Jan Nieuwenhuizen | 55f29fcade | |
Jan Nieuwenhuizen | a7f582f879 | |
Jan Nieuwenhuizen | c97168ff41 | |
Jan Nieuwenhuizen | e355b70f20 | |
Jan Nieuwenhuizen | 9a4f5a052a | |
Jan Nieuwenhuizen | 6e9e650e37 | |
Jan Nieuwenhuizen | 4d4691d449 | |
Jan Nieuwenhuizen | 0f973d72a7 | |
Jan Nieuwenhuizen | 92a5296518 | |
Jan Nieuwenhuizen | e76dcdc387 | |
Danny Milosavljevic | 9847e2c224 | |
Danny Milosavljevic | 215a12703c | |
Danny Milosavljevic | 4f6d919c11 | |
Jan Nieuwenhuizen | cde88d5bbf | |
Danny Milosavljevic | 6b9c40ab22 | |
Danny Milosavljevic | ed923af631 | |
Danny Milosavljevic | 0daacdb057 | |
Danny Milosavljevic | ddfa0e583e | |
Danny Milosavljevic | 39f2be799a | |
Danny Milosavljevic | b56c229ed8 | |
Danny Milosavljevic | dc69243eb7 | |
Danny Milosavljevic | f33f0cb3f6 | |
Danny Milosavljevic | d6ac93695c | |
Danny Milosavljevic | b47f25547d | |
Danny Milosavljevic | f018be6750 | |
Danny Milosavljevic | 554da18fac | |
Danny Milosavljevic | b1090422c3 | |
Danny Milosavljevic | fba1e15f02 | |
Danny Milosavljevic | 914f4d40a7 | |
Danny Milosavljevic | d79091ce4e | |
Jan Nieuwenhuizen | b5523ad09e | |
Danny Milosavljevic | e6400e78d3 | |
Jan Nieuwenhuizen | 7eca5208b7 | |
Danny Milosavljevic | 7cb40dd5a4 | |
Danny Milosavljevic | 88db18509c | |
Danny Milosavljevic | 947b916769 | |
Jan Nieuwenhuizen | 4d23ca40d8 | |
Jan Nieuwenhuizen | 59c66e67e2 | |
Jan Nieuwenhuizen | 7520d0842a | |
Danny Milosavljevic | 62c7a7c37a | |
Jan Nieuwenhuizen | bf6c85a652 | |
Jan Nieuwenhuizen | f356867bea | |
Jan Nieuwenhuizen | a9a0d142b6 | |
Jan Nieuwenhuizen | 910408996a | |
Jan Nieuwenhuizen | 37996c845b | |
Jan Nieuwenhuizen | 28166e32bb | |
Jan Nieuwenhuizen | 8ad984fa69 | |
Jan Nieuwenhuizen | 637d77e2b0 | |
Jan Nieuwenhuizen | 5c633eca0f | |
Jan Nieuwenhuizen | 2a6015eece | |
Jan Nieuwenhuizen | fe1e2a622e | |
Jan Nieuwenhuizen | 3ae11a0c11 | |
Jan Nieuwenhuizen | e2a1ebe109 | |
Jan Nieuwenhuizen | c065e4a2fd | |
Jan Nieuwenhuizen | 0cfdb5e9d8 | |
Jan Nieuwenhuizen | 46f3112956 | |
Jan Nieuwenhuizen | 77f9e60b47 | |
Jan Nieuwenhuizen | 7ad9aa0202 | |
Danny Milosavljevic | 8582816658 | |
Jan Nieuwenhuizen | 1aaf3a55c7 | |
Jan Nieuwenhuizen | 62309eb908 | |
Jan Nieuwenhuizen | 75f631fc5b | |
Jan Nieuwenhuizen | c146c86cad | |
Jan Nieuwenhuizen | 33b02642b3 | |
Jan Nieuwenhuizen | 690cb5a11f | |
Jan Nieuwenhuizen | eac39ab402 | |
Jan Nieuwenhuizen | 770f381f1f | |
Jan Nieuwenhuizen | 0535eeda50 | |
Jan Nieuwenhuizen | 5d079c1866 | |
Jan Nieuwenhuizen | 20f03c57e7 | |
Jan Nieuwenhuizen | bbc250b862 | |
Jan Nieuwenhuizen | bbf9346d5d | |
Jan Nieuwenhuizen | e284bb8d66 | |
Jan Nieuwenhuizen | cae963e0fa | |
Jan Nieuwenhuizen | b88fba4031 | |
Jan Nieuwenhuizen | dc9ca2c7c8 | |
Jan Nieuwenhuizen | 90586a86bc | |
Jan Nieuwenhuizen | cbf9344ded | |
Jan Nieuwenhuizen | 6f92402a79 | |
Jan Nieuwenhuizen | 98abbe27c1 | |
Jan Nieuwenhuizen | c25e5a3fe7 | |
Danny Milosavljevic | 4af4a4023d | |
Jan Nieuwenhuizen | f3dfb072cf | |
Jan Nieuwenhuizen | d72661756d | |
Jan Nieuwenhuizen | dbf1ddbad1 | |
Jan Nieuwenhuizen | 4e82398149 | |
Jan Nieuwenhuizen | 68c0299c08 | |
Jan Nieuwenhuizen | 7c873cdc99 | |
Jan Nieuwenhuizen | a316cfe61d | |
Jan Nieuwenhuizen | 87dc1bbf33 | |
Jan Nieuwenhuizen | 64f4cb09dc | |
Jan Nieuwenhuizen | 1ba1eaf673 | |
Jan Nieuwenhuizen | 7f87bfa1e5 | |
Jan Nieuwenhuizen | 2410f48871 | |
Jan Nieuwenhuizen | ffafec7073 | |
Jan Nieuwenhuizen | a170c57e80 | |
Jan Nieuwenhuizen | f1e950d9d8 | |
Jan Nieuwenhuizen | 9d69544ce6 | |
Jan Nieuwenhuizen | 246f56975a | |
Jan (janneke) Nieuwenhuizen | 90ea3b1de1 | |
Jan (janneke) Nieuwenhuizen | 61f3aa4d66 | |
Jan (janneke) Nieuwenhuizen | fd63ef313e | |
Jan (janneke) Nieuwenhuizen | 4a805ef8a1 | |
Jan Nieuwenhuizen | ed63bb44a5 | |
Jan Nieuwenhuizen | 41b2213a4b | |
Jan Nieuwenhuizen | 578fad465f | |
Jan Nieuwenhuizen | be5afbd167 | |
Jan Nieuwenhuizen | bad54ffe0e | |
Jan Nieuwenhuizen | e4994cba42 | |
Jan Nieuwenhuizen | f4aeb274c8 | |
Jan Nieuwenhuizen | 5794158bb4 | |
Jan Nieuwenhuizen | 177f81748a | |
Jan Nieuwenhuizen | 457dbdf42b | |
Jan Nieuwenhuizen | e3afad36a9 | |
Jan Nieuwenhuizen | 6c68695ba9 | |
Jan Nieuwenhuizen | b19dbe78cd | |
Jan Nieuwenhuizen | 6a276f7543 | |
Jan Nieuwenhuizen | a092cdf35e | |
Jan Nieuwenhuizen | 32c3e8666a | |
Jan Nieuwenhuizen | 8d556cd3f4 | |
Jan Nieuwenhuizen | 9c2c980129 | |
Jan Nieuwenhuizen | beb7cc943f | |
Jan Nieuwenhuizen | 46115b6d73 | |
Jan Nieuwenhuizen | b659ce1cc8 | |
Jan Nieuwenhuizen | f0c361f955 | |
Jan Nieuwenhuizen | f87cef0a59 | |
Jan Nieuwenhuizen | ecf9220bbc | |
Jan Nieuwenhuizen | aa32fbd8ff | |
Jan Nieuwenhuizen | f5a6ba799d | |
Jan Nieuwenhuizen | 86c6188906 | |
Jan Nieuwenhuizen | feb8fc2bad | |
Jan Nieuwenhuizen | 5e5be32e6f | |
Jan Nieuwenhuizen | a43de2947d | |
Jan Nieuwenhuizen | 35e203e49c | |
Jan Nieuwenhuizen | f470ec826d | |
Jan Nieuwenhuizen | 2102d0d26e | |
Jan Nieuwenhuizen | 51c6e0626d | |
Jan Nieuwenhuizen | 0b7a0a2d23 | |
Jan Nieuwenhuizen | 56315d3da5 | |
Jan Nieuwenhuizen | e2cf54fae5 | |
Jan Nieuwenhuizen | 7ac74192c9 | |
Jan Nieuwenhuizen | 5ccf23f7e2 | |
Jan Nieuwenhuizen | 9a82d835cd | |
Jan Nieuwenhuizen | 99be4bf07e | |
Jan Nieuwenhuizen | 3ebee71653 | |
Jan Nieuwenhuizen | 41db6e22d1 | |
Jan Nieuwenhuizen | d6e3618c39 |
144
.dir-locals.el
144
.dir-locals.el
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Mes.
|
||||
;;;
|
||||
|
@ -16,73 +16,21 @@
|
|||
;;; You should have received a copy of the GNU General Public License
|
||||
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
((nil
|
||||
.
|
||||
((indent-tabs-mode . nil)
|
||||
(eval
|
||||
.
|
||||
(progn
|
||||
(let ((top (locate-dominating-file default-directory ".dir-locals.el"))))
|
||||
;; The GNU project defaults. These are also the GNU Emacs defaults.
|
||||
;; Re-asserting theme here, however, as a courtesy for setups that use
|
||||
;; a global override.
|
||||
(
|
||||
;; For writing GNU C code, see
|
||||
;; https://www.gnu.org/prep/standards/html_node/Writing-C.html
|
||||
(c-mode . ((c-file-style . "gnu")
|
||||
(indent-tabs-mode . nil)))
|
||||
|
||||
(defun guile--manual-look-up (id mod)
|
||||
(message "guile--manual-look-up id=%s => %s mod=%s" id (symbol-name id) mod)
|
||||
(let ((info-lookup-other-window-flag
|
||||
geiser-guile-manual-lookup-other-window-p))
|
||||
(info-lookup-symbol (symbol-name id) 'scheme-mode))
|
||||
(when geiser-guile-manual-lookup-other-window-p
|
||||
(switch-to-buffer-other-window "*info*"))
|
||||
(search-forward (format "%s" id) nil t))
|
||||
(makefile-mode . ((indent-tabs-mode . t)))
|
||||
(asm-mode . ((indent-tabs-mode . t)))
|
||||
|
||||
(add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
|
||||
(nil . ((indent-tabs-mode . nil)
|
||||
(fill-column . 72)))
|
||||
|
||||
(defun guix-switch-profile (&optional profile)
|
||||
"reset Emacs' environment by snarfing PROFILE/etc/profile"
|
||||
|
||||
(defun matches-in-string (regexp string)
|
||||
"return a list of matches of REGEXP in STRING."
|
||||
(let ((matches))
|
||||
(save-match-data
|
||||
(string-match "^" "")
|
||||
(while (string-match regexp string (match-end 0))
|
||||
(push (or (match-string 1 string) (match-string 0 string)) matches)))
|
||||
matches))
|
||||
|
||||
(interactive "fprofile: ")
|
||||
(let* ((output (shell-command-to-string (concat "GUIX_PROFILE= /bin/sh -x " profile "/etc/profile")))
|
||||
(exports (matches-in-string "^[+] export \\(.*\\)" output)))
|
||||
(mapcar (lambda (line) (apply #'setenv (split-string line "="))) exports )))
|
||||
|
||||
(defun shell-args-to-string (&rest args)
|
||||
(shell-command-to-string (mapconcat 'identity args " ")))
|
||||
|
||||
(defun as (string &optional arch)
|
||||
(let* ((arch (or arch "--64"))
|
||||
(asm (subst-char-in-string ?_ ?\s string))
|
||||
(foo (message "asm:%S" asm))
|
||||
(result (shell-args-to-string "as" arch (concat "<(echo '" asm "')")))
|
||||
(disassembly (shell-args-to-string "objdump" "-d" "a.out"))
|
||||
(foo (message "disassembly: %S" disassembly))
|
||||
(match (string-match "^ 0:[\t]\\([^\t]*\\)" disassembly))
|
||||
(code (match-string 1 disassembly))
|
||||
(code (apply 'concat (split-string code " " t))))
|
||||
(insert " ")
|
||||
(insert code)))
|
||||
|
||||
(defun as-32 (point mark)
|
||||
(interactive "r")
|
||||
(let* ((string (buffer-substring point mark))
|
||||
(code (as string "--32")))
|
||||
(insert " ")
|
||||
(insert code)))
|
||||
|
||||
(defun as-64 (point mark)
|
||||
(interactive "r")
|
||||
(let* ((string (buffer-substring point mark))
|
||||
(code (as string "--64")))
|
||||
(insert " ")
|
||||
(insert code)))))))
|
||||
(makefile-mode
|
||||
(indent-tabs-mode . t))
|
||||
(scheme-mode
|
||||
.
|
||||
((geiser-active-implementations . (guile))
|
||||
|
@ -96,5 +44,69 @@
|
|||
(mapcar
|
||||
#'prefix-dir-locals-dir
|
||||
'("scripts" "module")))))))
|
||||
|
||||
(texinfo-mode . ((indent-tabs-mode . nil)
|
||||
(fill-column . 72))))
|
||||
(fill-column . 72)))
|
||||
(nil .
|
||||
((eval
|
||||
.
|
||||
(progn
|
||||
(let ((top (locate-dominating-file default-directory ".dir-locals.el"))))
|
||||
|
||||
(defun guile--manual-look-up (id mod)
|
||||
(message "guile--manual-look-up id=%s => %s mod=%s" id (symbol-name id) mod)
|
||||
(let ((info-lookup-other-window-flag
|
||||
geiser-guile-manual-lookup-other-window-p))
|
||||
(info-lookup-symbol (symbol-name id) 'scheme-mode))
|
||||
(when geiser-guile-manual-lookup-other-window-p
|
||||
(switch-to-buffer-other-window "*info*"))
|
||||
(search-forward (format "%s" id) nil t))
|
||||
|
||||
(add-hook 'before-save-hook 'delete-trailing-whitespace nil t)
|
||||
|
||||
(defun guix-switch-profile (&optional profile)
|
||||
"reset Emacs' environment by snarfing PROFILE/etc/profile"
|
||||
|
||||
(defun matches-in-string (regexp string)
|
||||
"return a list of matches of REGEXP in STRING."
|
||||
(let ((matches))
|
||||
(save-match-data
|
||||
(string-match "^" "")
|
||||
(while (string-match regexp string (match-end 0))
|
||||
(push (or (match-string 1 string) (match-string 0 string)) matches)))
|
||||
matches))
|
||||
|
||||
(interactive "fprofile: ")
|
||||
(let* ((output (shell-command-to-string (concat "GUIX_PROFILE= /bin/sh -x " profile "/etc/profile")))
|
||||
(exports (matches-in-string "^[+] export \\(.*\\)" output)))
|
||||
(mapcar (lambda (line) (apply #'setenv (split-string line "="))) exports )))
|
||||
|
||||
(defun shell-args-to-string (&rest args)
|
||||
(shell-command-to-string (mapconcat 'identity args " ")))
|
||||
|
||||
(defun as (string &optional arch)
|
||||
(let* ((arch (or arch "--64"))
|
||||
(asm (subst-char-in-string ?_ ?\s string))
|
||||
(foo (message "asm:%S" asm))
|
||||
(result (shell-args-to-string "as" arch (concat "<(echo '" asm "')")))
|
||||
(disassembly (shell-args-to-string "objdump" "-d" "a.out"))
|
||||
(foo (message "disassembly: %S" disassembly))
|
||||
(match (string-match "^ 0:[\t]\\([^\t]*\\)" disassembly))
|
||||
(code (match-string 1 disassembly))
|
||||
(code (apply 'concat (split-string code " " t))))
|
||||
(insert " ")
|
||||
(insert code)))
|
||||
|
||||
(defun as-32 (point mark)
|
||||
(interactive "r")
|
||||
(let* ((string (buffer-substring point mark))
|
||||
(code (as string "--32")))
|
||||
(insert " ")
|
||||
(insert code)))
|
||||
|
||||
(defun as-64 (point mark)
|
||||
(interactive "r")
|
||||
(let* ((string (buffer-substring point mark))
|
||||
(code (as string "--64")))
|
||||
(insert " ")
|
||||
(insert code))))))))
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
*~
|
||||
.#*
|
||||
*.E
|
||||
*.S
|
||||
*.s
|
||||
*.blood-elf
|
||||
*.blood-elf-M1
|
||||
*.blood-elf-hex2
|
||||
|
@ -14,6 +14,7 @@
|
|||
*.guile
|
||||
*.guile-log
|
||||
*.log
|
||||
*.trs
|
||||
*.mes-gcc
|
||||
*.mes-gcc-o
|
||||
*.mes-gcc-out
|
||||
|
@ -62,22 +63,52 @@
|
|||
/lib/x86-mes/0exit-42
|
||||
/lib/x86-mes/exit-42
|
||||
|
||||
/lib/tests/*/[0-9a][0-9a-z]-*
|
||||
/lib/tests/*/x86-mes-*
|
||||
!/lib/tests/*/*.c
|
||||
!/lib/tests/*/*.exit
|
||||
!/lib/tests/*/*.stdout
|
||||
|
||||
/scaffold/argv
|
||||
/scaffold/hello
|
||||
/scaffold/main
|
||||
/scaffold/malloc
|
||||
/scaffold/micro-mes
|
||||
/scaffold/tiny-mes
|
||||
/scaffold/mini-mes
|
||||
|
||||
/scaffold/x86-mes-*
|
||||
/scaffold/x86_64-mes-*
|
||||
|
||||
/scaffold/tests/x86-mes-*
|
||||
/scaffold/tests/[0-9a][0-9a-z]-[^.]*
|
||||
/scaffold/tests/[0-9a][0-9a-z]-*
|
||||
/scaffold/tests/t.*
|
||||
!/scaffold/tests/*.c
|
||||
!/scaffold/tests/*.exit
|
||||
!/scaffold/tests/*.stdout
|
||||
|
||||
/src/mes.mes.symbols.h
|
||||
/src/gc.mes.h
|
||||
/src/hash.mes.h
|
||||
/src/lib.mes.h
|
||||
/src/math.mes.h
|
||||
/src/mes.mes.h
|
||||
/src/module.mes.h
|
||||
/src/posix.mes.h
|
||||
/src/reader.mes.h
|
||||
/src/strings.mes.h
|
||||
/src/struct.mes.h
|
||||
/src/vector.mes.h
|
||||
/src/gc.mes.i
|
||||
/src/hash.mes.i
|
||||
/src/lib.mes.i
|
||||
/src/math.mes.i
|
||||
/src/mes.mes.i
|
||||
/src/module.mes.i
|
||||
/src/posix.mes.i
|
||||
/src/reader.mes.i
|
||||
/src/strings.mes.i
|
||||
/src/struct.mes.i
|
||||
/src/vector.mes.i
|
||||
|
||||
/src/*.h
|
||||
/src/*.i
|
||||
/src/mes
|
||||
/src/x86-mes-mes
|
||||
/src/x86_64-mes-mes
|
||||
|
@ -116,6 +147,7 @@
|
|||
/install.sh
|
||||
/uninstall.sh
|
||||
/mes/module/mes/boot-0.scm
|
||||
/scripts/mesar
|
||||
/scripts/mescc.scm
|
||||
/scripts/mescc
|
||||
/doc/images/gcc-mesboot-graph.png
|
||||
|
@ -124,3 +156,16 @@
|
|||
/doc/images/gcc-mesboot-graph.eps
|
||||
/doc/images/gcc-mesboot-graph.pdf
|
||||
/doc/web/
|
||||
/lib/x86_64-mes/0exit-42
|
||||
/lib/x86_64-mes/exit-42
|
||||
/config.sh
|
||||
/include/mes/config.h
|
||||
/gcc-lib
|
||||
/mescc-lib
|
||||
/bin
|
||||
/0exit-42
|
||||
/0hello-mes
|
||||
/body-exit-42
|
||||
/body-hello-mes
|
||||
/exit-42
|
||||
/hello-mes
|
||||
|
|
18
AUTHORS
18
AUTHORS
|
@ -1,16 +1,15 @@
|
|||
-*- org -*-
|
||||
#+TITLE: GNU Mes Authors
|
||||
|
||||
Copyright © 2016, 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved.
|
||||
|
||||
Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
Main author
|
||||
All files except the imported files listed below
|
||||
|
||||
Danny Milosavljevic <dannym@scratchpost.org>
|
||||
ARM port
|
||||
lib/mes/div.c
|
||||
Additions and fixes throughout
|
||||
|
||||
Jeremiah Orians <jeremiah@pdp10.guru>
|
||||
lib/stdio/fopen.c (first simple version of fopen)
|
||||
scaffold/tests/98-fopen.c
|
||||
|
@ -73,3 +72,10 @@ mes/module/srfi/srfi-26.scm
|
|||
|
||||
GNU FDL in texinfo from GNU
|
||||
doc/fdl-1.3.texi
|
||||
|
||||
* legalese
|
||||
Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved.
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
GNU Mes was created to address the security concerns that arise from
|
||||
bootstrapping an operating system using binary blobs, which is common
|
||||
practice for all software distributions. Mes is a Scheme interpreter
|
||||
written in a simple subset of C and a C compiler written in Scheme and
|
||||
comes with a small, bootstrappable C library. The Mes bootstrap has
|
||||
halved the size of opaque, uninspectable binaries that were needed to
|
||||
bootstrap GNU Guix, a functional GNU/Linux distribution that focusses on
|
||||
user freedom, reproducibility and security. That reduction was achieved
|
||||
by replacing GNU Binutils, GNU GCC and the GNU C Library with Mes. The
|
||||
final goal is to help create a full source bootstrap for any interested
|
||||
UNIX-like operating system. After three years of volunteer work funding
|
||||
will enable us to make another big step forward and reach an important
|
||||
new milestone.
|
||||
|
||||
GNU Mes - https://gnu.org/software/mes
|
||||
GNU Guix - https://gnu.org/software/guix
|
||||
Bootstrappable Builds - https://bootstrappable.org
|
||||
Reproducible Builds - https://reproducible-builds.org
|
||||
Reduced Binary Seed bootstrap - http://joyofsource.com/reduced-binary-seed-bootstrap.html
|
6
INSTALL
6
INSTALL
|
@ -19,8 +19,8 @@ similar way.
|
|||
* Regular build
|
||||
** Prerequisites
|
||||
*** Guix
|
||||
guix environment -l .guix.scm #64 bit + 32bit
|
||||
guix environment --system=i686-linux -l .guix.scm #32 bit only
|
||||
guix environment -l guix.scm #64 bit + 32bit
|
||||
guix environment --system=i686-linux -l guix.scm #32 bit only
|
||||
|
||||
*** Other GNU/Linux
|
||||
- [[https://github.com/oriansj/mescc-tools][mescc-tools]], 0.5 is known to work.
|
||||
|
@ -44,7 +44,7 @@ similar way.
|
|||
make install
|
||||
|
||||
* Guix it
|
||||
guix package -f .guix.scm
|
||||
guix package -f guix.scm
|
||||
|
||||
* Bootstrap build
|
||||
|
||||
|
|
26
NEWS
26
NEWS
|
@ -10,6 +10,32 @@ Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
|||
|
||||
Please send Mes bug reports to bug-mes@gnu.org.
|
||||
|
||||
* Changes in 0.20 since 0.19
|
||||
** Core
|
||||
*** The build system has been simplified, again.
|
||||
Mes now builds ootb on Debian.
|
||||
*** Mes now supports -c EXPR.
|
||||
** Divide by zero is now flagged.
|
||||
** Language
|
||||
*** 1 new function:
|
||||
take-while.
|
||||
** MesCC
|
||||
*** The C libraries have been exploded into one function per file.
|
||||
*** MesCC now has enhanced POSIX/gcc comand line support, e.g. -DFOO=1,
|
||||
-nodefaultlibs,
|
||||
-nostartfiles,
|
||||
-nostdlib.
|
||||
*** The archiver is now called `mesar'.
|
||||
*** MesCC now supports Nyacc-0.99.
|
||||
*** MesCC now depends on MesCC-Tools 0.6.0.
|
||||
*** 1 new function
|
||||
__mesabi_uldiv.
|
||||
** Noteworthy bug fixes
|
||||
*** interger division has been fixed.
|
||||
*** isatty now looks at terminfo.
|
||||
*** signal now uses sigaction correctly for non-x86.
|
||||
*** string->number now support #x hex-prefix.
|
||||
*** ungetc now has a buffer per file handle.
|
||||
* Changes in 0.19 since 0.18
|
||||
** Core
|
||||
*** The build system has been simplified.
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
#+COMMENT: -*- org -*-
|
||||
#+TITLE: Porting GNU Mes
|
||||
|
||||
* Porting GNU Mes to ARM
|
||||
|
||||
The ARM port can be found in wip-arm on savannah.
|
||||
|
||||
For development, we use Guix's qemu-binfmt-service-type.
|
||||
|
||||
** Guix Setup, see [[info:guix#Virtualization%20Services][Virtualization Services]].
|
||||
|
||||
Add something like
|
||||
#+BEGIN_SRC scheme
|
||||
(service qemu-binfmt-service-type
|
||||
(qemu-binfmt-configuration
|
||||
(platforms (lookup-qemu-platforms "arm"))
|
||||
(guix-support? #t)))
|
||||
#+END_SRC
|
||||
to your config.scm and run guix system reconfigure.
|
||||
|
||||
** Setup environment
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
guix environment -s armhf-linux --pure --ad-hoc bash coreutils diffutils gawk gcc-toolchain grep guile help2man make nyacc pkg-config sed texinfo
|
||||
PATH=~/src/mescc-tools-arm/bin:$PATH
|
||||
#+END_SRC
|
||||
|
||||
(No git, graphviz on ARM yet).
|
||||
|
||||
** Try it
|
||||
#+BEGIN_SRC bash
|
||||
./configure --with-courage --with-system-libc
|
||||
./simple.sh
|
||||
#+END_SRC
|
||||
|
||||
some failures are expected.
|
||||
|
||||
** Build it
|
||||
#+BEGIN_SRC bash
|
||||
./configure --with-courage --with-system-libc
|
||||
make MES=guile
|
||||
make check
|
||||
#+END_SRC
|
||||
|
||||
expect many failures. Non-system-libc, i.e. using the Mes C Library is currently WIP.
|
||||
|
||||
* Porting GNU Mes to x86_64
|
||||
|
||||
The x86_64 port is almost done, only a few bugs remain. The Guix
|
||||
bootstrap for x86_64 uses x86 mes and that is not expected to change.
|
||||
|
||||
* Porting GNU Mes to GNU/Hurd
|
||||
|
||||
The Hurd port can be found in wip-hurd on savannah. For development, we
|
||||
use a Debian GNU/Hurd vm.
|
||||
|
||||
* Legalese
|
||||
Copyright © 2019 Jan (janneke) Nieuwenhuizen <[[mailto:janneke@gnu.org][janneke@gnu.org]]>
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved.
|
21
README
21
README
|
@ -3,12 +3,13 @@
|
|||
|
||||
#+SUBTITLE: Maxwell Equations of Software
|
||||
|
||||
[[https://www.gnu.org/software/mes][GNU Mes]] brings a [[http://joyofsource.com/reduced-binary-seed-bootstrap.html][Reduced Binary Seed bootstrap]] to [[https://www.gnu.org/software/guix][Guix]] and potentially
|
||||
to any other interested GNU/Linux distribution, and aims to help
|
||||
create a full source bootstrap as part of the [[http://bootstrappable.org][bootstrappable builds]]
|
||||
effort.
|
||||
[[https://www.gnu.org/software/mes][GNU Mes]] brings a [[http://joyofsource.com/reduced-binary-seed-bootstrap.html][Reduced Binary Seed bootstrap]] to [[https://www.gnu.org/software/guix][GNU Guix]]. This
|
||||
bootstrap has halved the size of opaque, uninspectable binaries that
|
||||
were needed to bootstrap Guix. The final goal is to help create a full
|
||||
source bootstrap as part of the [[http://bootstrappable.org][bootstrappable builds]] effort for any
|
||||
interested UNIX-like operating system.
|
||||
|
||||
It consists of a mutual self-hosting Scheme interpreter written in
|
||||
Mes consists of a mutual self-hosting Scheme interpreter written in
|
||||
~5,000 LOC of simple C and a Nyacc-based C compiler written in Scheme.
|
||||
This mes.c is [[https://github.com/oriansj/mes-m2][being simplified]] to be transpiled by [[https://github.com/oriansj/m2-planet][M2-Planet]].
|
||||
|
||||
|
@ -48,17 +49,13 @@ General Public Licence version 3 or later. See the file [[file:COPYING][COPYING
|
|||
* REPL it
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
src/mes.gcc-out # default (64 bit) gcc-compiled
|
||||
src/mes.mes-gcc-out # 32 bit, gcc -nostdlib, Mes C Lib
|
||||
src/mes.mes-out # 32 bit, bootstrapped, mes.M1+MesCC-compiled
|
||||
src/mes.x86_64-mes-gcc-out # 64 bit, gcc -nostdlib, Mes C Lib
|
||||
src/mes.x86_64-mes-out # 64 bit, bootstrapped, mes.M1+MesCC-compiled
|
||||
./pre-inst-env mes
|
||||
#+END_SRC
|
||||
|
||||
* MesCC compiler
|
||||
|
||||
#+BEGIN_SRC bash
|
||||
./pre-inst env mescc -c scaffold/main.c
|
||||
./pre-inst-env mescc -c scaffold/main.c
|
||||
#+END_SRC
|
||||
|
||||
* Bugs
|
||||
|
@ -79,7 +76,7 @@ General Public Licence version 3 or later. See the file [[file:COPYING][COPYING
|
|||
[10] https://github.com/oriansj/stage0
|
||||
|
||||
* Legalese
|
||||
Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <[[mailto:janneke@gnu.org][janneke@gnu.org]]>
|
||||
Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <[[mailto:janneke@gnu.org][janneke@gnu.org]]>
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -28,8 +28,20 @@ cleaning-p:=$(filter clean%, $(MAKECMDGOALS))$(filter %clean, $(MAKECMDGOALS))
|
|||
|
||||
ifndef cleaning-p
|
||||
include .config.make
|
||||
ifneq ($(prefix),)
|
||||
prefix-arg=--prefix=$(prefix)
|
||||
endif
|
||||
ifneq ($(build),)
|
||||
build-arg=--build=$(build)
|
||||
endif
|
||||
ifneq ($(host),)
|
||||
host-arg=--host=$(host)
|
||||
endif
|
||||
ifeq ($(mes_libc),system)
|
||||
--with-system-libc=system
|
||||
endif
|
||||
.config.make:
|
||||
${srcdir}/configure --prefix=$(prefix)
|
||||
${srcdir}/configure $(prefix_arg) $(host-arg) $(build-arg) $(with-system-libc)
|
||||
endif
|
||||
|
||||
PHONY_TARGETS:=\
|
||||
|
@ -80,14 +92,14 @@ all: doc
|
|||
doc: build
|
||||
|
||||
build:
|
||||
./build.sh
|
||||
$(SHELL) build.sh
|
||||
|
||||
src/${program_prefix}mes: build
|
||||
|
||||
clean:
|
||||
git clean -dfx\
|
||||
-e .config.make\
|
||||
-e config.status\
|
||||
-e config.sh\
|
||||
-e GNUmakefile\
|
||||
-e build.sh\
|
||||
-e check.sh\
|
||||
|
@ -95,7 +107,6 @@ clean:
|
|||
-e uninstall.sh\
|
||||
-e pre-inst-env\
|
||||
-e scripts/mescc\
|
||||
-e "mes"/module/mes/boot-0.scm\
|
||||
|
||||
#
|
||||
|
||||
|
@ -118,20 +129,20 @@ clean-go:
|
|||
rm -f $(shell find . -name '*.go')
|
||||
|
||||
check:
|
||||
./check.sh
|
||||
$(SHELL) check.sh
|
||||
|
||||
check-mescc:
|
||||
./pre-inst-env build-aux/check-mescc.sh
|
||||
$(SHELL) pre-inst-env build-aux/check-mescc.sh
|
||||
|
||||
# Mes does not feature post-install checks yet, so we're great!
|
||||
installcheck:
|
||||
true
|
||||
|
||||
install:
|
||||
./install.sh
|
||||
$(SHELL) install.sh
|
||||
|
||||
uninstall:
|
||||
./uninstall.sh
|
||||
$(SHELL) uninstall.sh
|
||||
|
||||
doc/version.texi: ${srcdest}doc/mes.texi GNUmakefile
|
||||
@mkdir -p $(@D)
|
||||
|
|
|
@ -1,101 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
# GNU Mes is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU Mes is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
. ./config.status
|
||||
. ${srcdest}build-aux/config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
|
||||
set -e
|
||||
|
||||
# FIXME?
|
||||
#mes_program_prefix=boot-$arch-
|
||||
mes_program_prefix=$program_prefix
|
||||
trace "HEX2 0exit-42" $HEX2\
|
||||
$HEX2FLAGS\
|
||||
-f ${srcdest}lib/$mes_arch/elf$bits-0header.hex2\
|
||||
-f ${srcdest}lib/$mes_arch/elf$bits-body-exit-42.hex2\
|
||||
-f ${srcdest}lib/$mes_arch/elf-0footer.hex2\
|
||||
--exec_enable\
|
||||
-o lib/$mes_arch/${mes_program_prefix}0exit-42
|
||||
|
||||
trace "TEST lib/$mes_arch/${mes_program_prefix}0exit-42" echo lib/$mes_arch/${mes_program_prefix}0exit-42
|
||||
{ set +e; lib/$mes_arch/${mes_program_prefix}0exit-42; r=$?; set -e; }
|
||||
[ $r != 42 ] && echo " => $r" && exit 1
|
||||
|
||||
trace "HEX2 exit-42" $HEX2\
|
||||
$HEX2FLAGS\
|
||||
-f ${srcdest}lib/$mes_arch/elf$bits-header.hex2\
|
||||
-f ${srcdest}lib/$mes_arch/elf$bits-body-exit-42.hex2\
|
||||
-f ${srcdest}lib/$mes_arch/elf$bits-footer-single-main.hex2\
|
||||
--exec_enable\
|
||||
-o lib/$mes_arch/${mes_program_prefix}exit-42
|
||||
|
||||
trace "TEST lib/$mes_arch/${mes_program_prefix}exit-42" echo lib/$mes_arch/${mes_program_prefix}exit-42
|
||||
{ set +e; lib/$mes_arch/${mes_program_prefix}exit-42; r=$?; set -e; }
|
||||
[ $r != 42 ] && echo " => $r" && exit 1
|
||||
|
||||
|
||||
mkdir -p lib/$mes_arch
|
||||
trace "M1 crt1.S" $M1\
|
||||
$M1FLAGS\
|
||||
-f ${srcdest}lib/$mes_arch/$arch.M1\
|
||||
-f $MES_SEED/$mes_arch/crt1.S\
|
||||
-o lib/$mes_arch/crt1.o
|
||||
trace "M1 libc.S" $M1\
|
||||
$M1FLAGS\
|
||||
-f ${srcdest}lib/$mes_arch/$arch.M1\
|
||||
-f $MES_SEED/$mes_arch/libc.S\
|
||||
-o lib/$mes_arch/libc.o
|
||||
trace "M1 mes.S" $M1\
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
-f ${srcdest}lib/$mes_arch/$arch.M1\
|
||||
-f $MES_SEED/$mes_arch/mes.S\
|
||||
-o src/mes.o
|
||||
trace "BLOOD_ELF mes.S" $BLOOD_ELF\
|
||||
-f ${srcdest}lib/$mes_arch/$arch.M1\
|
||||
-f $MES_SEED/$mes_arch/mes.S\
|
||||
-f $MES_SEED/$mes_arch/libc.S\
|
||||
-o src/mes.S.blood-elf
|
||||
trace "M1 mes.blood-elf" $M1\
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
-f src/mes.S.blood-elf\
|
||||
-o src/mes.o.blood-elf
|
||||
trace "HEX2 mes.o" $HEX2\
|
||||
$HEX2FLAGS\
|
||||
-f ${srcdest}lib/$mes_arch/elf$bits-header.hex2\
|
||||
-f lib/$mes_arch/crt1.o\
|
||||
-f lib/$mes_arch/libc.o\
|
||||
-f src/mes.o\
|
||||
-f src/mes.o.blood-elf\
|
||||
--exec_enable\
|
||||
-o src/${mes_program_prefix}mes
|
||||
#cp src/${mes_program_prefix}mes src/${program_prefix}mes
|
||||
trace "M1 libc+tcc.S" $M1\
|
||||
$M1FLAGS\
|
||||
-f ${srcdest}lib/$mes_arch/$arch.M1\
|
||||
-f $MES_SEED/$mes_arch/libc+tcc.S\
|
||||
-o lib/$mes_arch/libc+tcc.o
|
||||
trace "M1 libc+gnu.S" $M1\
|
||||
$M1FLAGS\
|
||||
-f ${srcdest}lib/$mes_arch/$arch.M1\
|
||||
-f $MES_SEED/$mes_arch/libc+gnu.S\
|
||||
-o lib/$mes_arch/libc+gnu.o
|
|
@ -1,82 +1,83 @@
|
|||
#! @SHELL@
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$V" = 1 -o "$V" = 2 ]; then
|
||||
set -x
|
||||
fi
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
# GNU Mes is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU Mes is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
LANG=
|
||||
MES_ARENA=${MES_ARENA-100000000}
|
||||
MES_MAX_ARENA=${MES_MAX_ARENA-100000000}
|
||||
MES_STACK=${MES_STACK-500000}
|
||||
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/gc.c
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/hash.c
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/lib.c
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/math.c
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/mes.c
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/module.c
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/posix.c
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/reader.c
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/strings.c
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/struct.c
|
||||
@GUILE@ -e '(mes-snarf)' build-aux/mes-snarf.scm --mes src/vector.c
|
||||
. build-aux/configure-lib.sh
|
||||
|
||||
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-0header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf-0footer.hex2 --exec_enable -o lib/x86-mes/0exit-42
|
||||
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-header.hex2 -f lib/x86-mes/elf32-body-exit-42.hex2 -f lib/x86-mes/elf32-footer-single-main.hex2 --exec_enable -o lib/x86-mes/exit-42
|
||||
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/crt1.S -o lib/x86-mes/crt1.o
|
||||
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc.S -o lib/x86-mes/libc.o
|
||||
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/mes.S -o src/mes.o
|
||||
blood-elf -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/mes.S -f @MES_SEED@/x86-mes/libc.S -o src/mes.S.blood-elf
|
||||
M1 --LittleEndian --Architecture 1 -f src/mes.S.blood-elf -o src/mes.o.blood-elf
|
||||
hex2 --LittleEndian --Architecture 1 --BaseAddress 0x1000000 -f lib/x86-mes/elf32-header.hex2 -f lib/x86-mes/crt1.o -f lib/x86-mes/libc.o -f src/mes.o -f src/mes.o.blood-elf --exec_enable -o src/mes
|
||||
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc+tcc.S -o lib/x86-mes/libc+tcc.o
|
||||
M1 --LittleEndian --Architecture 1 -f lib/x86-mes/x86.M1 -f @MES_SEED@/x86-mes/libc+gnu.S -o lib/x86-mes/libc+gnu.o
|
||||
CPPFLAGS="-D HAVE_CONFIG_H=1 -I include"
|
||||
CFLAGS=""
|
||||
mkdir -p mescc-lib
|
||||
cp config.sh mescc-lib/config.sh
|
||||
cd mescc-lib
|
||||
srcdest=../
|
||||
CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/linux/x86-mes/crt1.o lib/linux/x86-mes/crt1.c
|
||||
mkdir $mes_cpu-mes
|
||||
$CC -c $CPPFLAGS $CFLAGS ${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/crt1.c
|
||||
cp crt1.o $mes_cpu-mes
|
||||
cp crt1.s $mes_cpu-mes
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/libc-mini.x86-mes-o lib/libc-mini.c
|
||||
mv lib/libc-mini.x86-mes-S lib/x86-mes/libc-mini.S
|
||||
mv lib/libc-mini.x86-mes-o lib/x86-mes/libc-mini.o
|
||||
objects=
|
||||
for c in $libc_mini_SOURCES; do
|
||||
echo "CC $c"
|
||||
$CC -c $CPPFLAGS $CFLAGS ${srcdest}$c
|
||||
o=$(basename $c .c).o
|
||||
objects="$objects $o"
|
||||
done
|
||||
echo "AR $mes_cpu-mes/libc-mini.a"
|
||||
$AR crD $mes_cpu-mes/libc-mini.a $objects
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/libc.x86-mes-o lib/libc.c
|
||||
mv lib/libc.x86-mes-S lib/x86-mes/libc.S
|
||||
mv lib/libc.x86-mes-o lib/x86-mes/libc.o
|
||||
objects=
|
||||
for c in $libc_SOURCES; do
|
||||
echo "CC $c"
|
||||
$CC -c $CPPFLAGS $CFLAGS ${srcdest}$c
|
||||
o=$(basename $c .c).o
|
||||
objects="$objects $o"
|
||||
done
|
||||
echo "AR $mes_cpu-mes/libc.a"
|
||||
$AR crD $mes_cpu-mes/libc.a $objects
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/libc+tcc.x86-mes-o lib/libc+tcc.c
|
||||
mv lib/libc+tcc.x86-mes-S lib/x86-mes/libc+tcc.S
|
||||
mv lib/libc+tcc.x86-mes-o lib/x86-mes/libc+tcc.o
|
||||
objects=
|
||||
for c in $libc_tcc_SOURCES; do
|
||||
echo "CC $c"
|
||||
$CC -c $CPPFLAGS $CFLAGS ${srcdest}$c
|
||||
o=$(basename $c .c).o
|
||||
objects="$objects $o"
|
||||
done
|
||||
echo "AR $mes_cpu-mes/libc+tcc.a"
|
||||
$AR crD $mes_cpu-mes/libc+tcc.a $objects
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o lib/libc+gnu.x86-mes-o lib/libc+gnu.c
|
||||
mv lib/libc+gnu.x86-mes-S lib/x86-mes/libc+gnu.S
|
||||
mv lib/libc+gnu.x86-mes-o lib/x86-mes/libc+gnu.o
|
||||
cd ..
|
||||
srcdest=
|
||||
CPPFLAGS="-D HAVE_CONFIG_H=1 -I ${srcdest}include -I ${srcdest}include/$mes_kernel/$mes_cpu"
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/main.x86-mes-o scaffold/main.c
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-main scaffold/main.x86-mes-o
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/hello.x86-mes-o scaffold/hello.c
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-hello scaffold/hello.x86-mes-o -l c-mini
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/argv.x86-mes-o scaffold/argv.c
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-argv scaffold/argv.x86-mes-o -l c-mini
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/malloc.x86-mes-o scaffold/malloc.c
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-malloc scaffold/malloc.x86-mes-o -l c
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/micro-mes.x86-mes-o scaffold/micro-mes.c
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-micro-mes scaffold/micro-mes.x86-mes-o -l c
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/tiny-mes.x86-mes-o scaffold/tiny-mes.c
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o scaffold/x86-mes-tiny-mes scaffold/tiny-mes.x86-mes-o -l c
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -c -D 'VERSION="@VERSION@"' -D 'MODULEDIR="@moduledir@"' -D 'PREFIX="@prefix@"' -I . -I lib -I include -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o src/mes.x86-mes-o src/mes.c
|
||||
cp src/mes.x86-mes-S src/mes.S
|
||||
|
||||
@GUILE@ -e main -L module scripts/mescc.scm -v -g -L lib/linux/x86-mes -L lib/linux -L lib/x86-mes -L lib -L @MES_SEED@ -o src/x86-mes-mes src/mes.x86-mes-o -l c
|
||||
cp src/x86-mes-mes src/mes
|
||||
objects=
|
||||
for c in $mes_SOURCES; do
|
||||
echo "CC $c"
|
||||
$CC -c $CPPFLAGS $CFLAGS ${srcdest}$c
|
||||
o=$(basename $c .c).o
|
||||
objects="$objects $o"
|
||||
done
|
||||
echo "CCLD src/mes"
|
||||
$CC -nostdlib -o src/mes -L mescc-lib mescc-lib/crt1.o $objects -lc
|
||||
|
|
|
@ -18,37 +18,34 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if [ ! "$config_status" ]; then
|
||||
. ./config.status
|
||||
fi
|
||||
set -e
|
||||
|
||||
. ./config.sh
|
||||
|
||||
. ${srcdest}build-aux/config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
GUILE_AUTO_COMPILE=0
|
||||
|
||||
set -e
|
||||
|
||||
SCM_FILES="
|
||||
${srcdest}module/mes/getopt-long.scm
|
||||
${srcdest}module/mes/guile.scm
|
||||
${srcdest}module/mes/misc.scm
|
||||
${srcdest}module/mes/test.scm
|
||||
${srcdest}module/mescc/M1.scm
|
||||
${srcdest}module/mescc/as.scm
|
||||
${srcdest}module/mescc/bytevectors.scm
|
||||
${srcdest}module/mescc/compile.scm
|
||||
${srcdest}module/mescc/i386/as.scm
|
||||
${srcdest}module/mescc/i386/info.scm
|
||||
${srcdest}module/mescc/x86_64/as.scm
|
||||
${srcdest}module/mescc/x86_64/info.scm
|
||||
${srcdest}module/mescc/info.scm
|
||||
${srcdest}module/mescc.scm
|
||||
${srcdest}module/mescc/mescc.scm
|
||||
${srcdest}module/mescc/preprocess.scm
|
||||
module/mes/getopt-long.scm
|
||||
module/mes/guile.scm
|
||||
module/mes/misc.scm
|
||||
module/mes/test.scm
|
||||
module/mescc/M1.scm
|
||||
module/mescc/as.scm
|
||||
module/mescc/bytevectors.scm
|
||||
module/mescc/compile.scm
|
||||
module/mescc/i386/as.scm
|
||||
module/mescc/i386/info.scm
|
||||
module/mescc/x86_64/as.scm
|
||||
module/mescc/x86_64/info.scm
|
||||
module/mescc/info.scm
|
||||
module/mescc.scm
|
||||
module/mescc/mescc.scm
|
||||
module/mescc/preprocess.scm
|
||||
"
|
||||
|
||||
SCRIPTS="
|
||||
${srcdest}build-aux/mes-snarf.scm
|
||||
build-aux/mes-snarf.scm
|
||||
"
|
||||
|
||||
export host=$($GUILE -c "(display %host-type)")
|
||||
|
@ -61,7 +58,8 @@ fi
|
|||
for i in $SCM_FILES $SCRIPTS; do
|
||||
b=$(basename $i)
|
||||
go=${i%%.scm}.go
|
||||
if [ $i -nt $go ]; then
|
||||
trace "GUILEC $b" $GUILD compile -L ${srcdest}module -L ${srcdest}build-aux -L ${srcdest}scripts -o $go $i
|
||||
f=${srcdest}$i
|
||||
if test $f -nt $go; then
|
||||
trace "GUILEC $f" $GUILD compile -L ${srcdest}module -L ${srcdest}build-aux -L ${srcdest}scripts -o $go $f
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -0,0 +1,104 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
# GNU Mes is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU Mes is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
srcdest=${srcdest-}
|
||||
. ${srcdest}build-aux/configure-lib.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
. ${srcdest}build-aux/cc.sh
|
||||
|
||||
trap 'test -f .log && cat .log' EXIT
|
||||
|
||||
mkdir -p $mes_cpu-mes
|
||||
compile lib/$mes_kernel/$mes_cpu-mes-$compiler/crt1.c
|
||||
cp crt1.o $mes_cpu-mes
|
||||
if test -e crt1.s; then
|
||||
cp crt1.s $mes_cpu-mes
|
||||
fi
|
||||
|
||||
archive libc-mini.a $libc_mini_SOURCES
|
||||
cp libc-mini.a $mes_cpu-mes
|
||||
if test -e libc-mini.s; then
|
||||
cp libc-mini.s $mes_cpu-mes
|
||||
fi
|
||||
|
||||
archive libmes.a $libmes_SOURCES
|
||||
cp libmes.a $mes_cpu-mes
|
||||
if test -e libmes.s; then
|
||||
cp libmes.s $mes_cpu-mes
|
||||
fi
|
||||
|
||||
if test $mes_libc = mes; then
|
||||
archive libc.a $libc_SOURCES
|
||||
cp libc.a $mes_cpu-mes
|
||||
if test -e libc.s; then
|
||||
cp libc.s $mes_cpu-mes
|
||||
fi
|
||||
fi
|
||||
|
||||
archive libc+tcc.a $libc_tcc_SOURCES
|
||||
cp libc+tcc.a $mes_cpu-mes
|
||||
if test -e libc+tcc.s; then
|
||||
cp libc+tcc.s $mes_cpu-mes
|
||||
fi
|
||||
|
||||
if $courageous; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
archive libc+gnu.a $libc_gnu_SOURCES
|
||||
cp libc+gnu.a $mes_cpu-mes
|
||||
if test -e libc+gnu.s; then
|
||||
cp libc+gnu.s $mes_cpu-mes
|
||||
fi
|
||||
|
||||
archive libtcc1.a $libtcc1_SOURCES
|
||||
cp libtcc1.a $mes_cpu-mes
|
||||
if test -e libtcc1.s; then
|
||||
cp libtcc1.s $mes_cpu-mes
|
||||
fi
|
||||
|
||||
archive libgetopt.a lib/posix/getopt.c
|
||||
cp libgetopt.a $mes_cpu-mes
|
||||
if test -e libgetopt.s; then
|
||||
cp libgetopt.s $mes_cpu-mes
|
||||
fi
|
||||
|
||||
cp ${srcdest}lib/$mes_kernel/$mes_cpu-mes-$compiler/crt*.c $mes_cpu-mes
|
||||
|
||||
rm -f libc+gnu.c
|
||||
cat > libc+gnu.c <<EOF
|
||||
// Generated from Mes -- do not edit
|
||||
// compiler: $compiler
|
||||
// cpu: $mes_cpu
|
||||
// bits: $mes_bits
|
||||
// libc: $mes_libc
|
||||
// kernel: $mes_kernel
|
||||
// system: $mes_system
|
||||
|
||||
EOF
|
||||
for c in $libc_gnu_SOURCES; do
|
||||
echo "// $c" >> libc+gnu.c
|
||||
cat ${srcdest}$c >> libc+gnu.c
|
||||
echo >> libc+gnu.c
|
||||
done
|
||||
cp libc+gnu.c $mes_cpu-mes
|
||||
|
||||
cp ${srcdest}lib/libtcc1.c $mes_cpu-mes
|
||||
cp ${srcdest}lib/posix/getopt.c $mes_cpu-mes/libgetopt.c
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -19,64 +19,39 @@
|
|||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
if [ ! "$config_status" ]; then
|
||||
. ./config.status
|
||||
V=${V-1}
|
||||
|
||||
if [ "$V" = 2 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
. ${srcdest}build-aux/config.sh
|
||||
. ./config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
. ${srcdest}build-aux/cc.sh
|
||||
|
||||
[ "$mes_p" ] && (program_prefix= compile lib/linux/$mes_arch/crt1)
|
||||
[ "$mes_p" -a ! "$gcc_p" ] && cp -f lib/linux/$mes_arch/crt1.S lib/$mes_arch/crt1.S
|
||||
[ "$mes_p" -a ! "$gcc_p" ] && cp -f lib/linux/$mes_arch/crt1.o lib/$mes_arch/crt1.o
|
||||
trap 'test -f .log && cat .log' EXIT
|
||||
|
||||
[ ! "$mesc_p" -a ! "$posix_p" ] && (program_prefix= compile lib/linux/$mes_arch/crt0)
|
||||
[ "$mes_p" -a "$gcc_p" ] && (program_prefix= compile lib/linux/$mes_arch/crti)
|
||||
[ "$mes_p" -a "$gcc_p" ] && (program_prefix= compile lib/linux/$mes_arch/crtn)
|
||||
srcdest=${srcdest-}
|
||||
mes_sources="
|
||||
src/gc.c
|
||||
src/hash.c
|
||||
src/lib.c
|
||||
src/math.c
|
||||
src/mes.c
|
||||
src/module.c
|
||||
src/posix.c
|
||||
src/reader.c
|
||||
src/string.c
|
||||
src/struct.c
|
||||
src/vector.c
|
||||
"
|
||||
|
||||
[ ! "$mes_p" -a ! "$mesc_p" ] && compile lib/libmes
|
||||
[ ! "$mes_p" -a ! "$mesc_p" ] && archive lib/libmes
|
||||
|
||||
[ "$mes_p" ] && compile lib/libc-mini
|
||||
[ "$mes_p" ] && archive lib/libc-mini
|
||||
|
||||
[ "$mes_p" ] && compile lib/libc
|
||||
[ "$mes_p" ] && archive lib/libc
|
||||
|
||||
[ "$mes_p" ] && compile lib/libc+tcc
|
||||
[ "$mes_p" ] && archive lib/libc+tcc
|
||||
|
||||
[ "$mes_p" ] && compile lib/libc+gnu
|
||||
[ "$mes_p" ] && archive lib/libc+gnu
|
||||
|
||||
[ "$mes_p" -a ! "$mesc_p" ] && compile lib/libtcc1
|
||||
[ "$mes_p" -a ! "$mesc_p" ] && archive lib/libtcc1
|
||||
|
||||
[ "$mes_p" -a ! "$mesc_p" ] && compile lib/libg
|
||||
[ "$mes_p" -a ! "$mesc_p" ] && archive lib/libg
|
||||
|
||||
[ "$mes_p" -a ! "$mesc_p" ] && compile lib/libgetopt
|
||||
[ "$mes_p" -a ! "$mesc_p" ] && archive lib/libgetopt
|
||||
|
||||
compile scaffold/main
|
||||
(libc= link scaffold/main)
|
||||
|
||||
compile scaffold/hello
|
||||
(libc="-l c-mini" link scaffold/hello)
|
||||
|
||||
compile scaffold/argv
|
||||
(libc="-l c-mini" link scaffold/argv)
|
||||
|
||||
[ "$mes_p" ] && compile scaffold/malloc
|
||||
[ "$mes_p" ] && link scaffold/malloc
|
||||
[ "$mes_p" ] && compile scaffold/micro-mes
|
||||
[ "$mes_p" ] && link scaffold/micro-mes
|
||||
[ "$mes_p" ] && compile scaffold/tiny-mes
|
||||
[ "$mes_p" ] && link scaffold/tiny-mes
|
||||
#[ "$mes_p" ] && compile scaffold/mini-mes
|
||||
#[ "$mes_p" ] && link scaffold/mini-mes
|
||||
|
||||
compile src/mes
|
||||
for c in $mes_sources; do
|
||||
compile $c
|
||||
done
|
||||
if test $mes_libc = system; then
|
||||
LIBS=-lmes
|
||||
fi
|
||||
link src/mes
|
||||
|
|
|
@ -0,0 +1,135 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
# GNU Mes is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU Mes is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
V=${V-1}
|
||||
|
||||
if [ "$V" = 2 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
. ./config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
|
||||
if $courageous; then
|
||||
set +e
|
||||
set_min_e () {
|
||||
echo "Applying courage"
|
||||
}
|
||||
set_min_e
|
||||
else
|
||||
set_min_e () {
|
||||
set -e
|
||||
}
|
||||
fi
|
||||
|
||||
case "$mes_cpu" in
|
||||
arm)
|
||||
stage0_cpu=armv7l;;
|
||||
x86_64)
|
||||
stage0_cpu=amd64;;
|
||||
x86)
|
||||
stage0_cpu=x86;;
|
||||
*)
|
||||
stage0_cpu=$mes_cpu;;
|
||||
esac
|
||||
|
||||
trace "CCLD ${srcdest}lib/$mes_cpu-mes-$compiler/exit-42.S" $CC\
|
||||
-nostdlib\
|
||||
-g\
|
||||
${srcdest}lib/$mes_cpu-mes-$compiler/exit-42.S\
|
||||
-o exit-42
|
||||
|
||||
trace "TEST exit-42"
|
||||
{ set +e; ./exit-42; r=$?; set_min_e; }
|
||||
[ $r != 42 ] && echo " => $r"
|
||||
[ $r = 42 ]
|
||||
|
||||
trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-0exit-42.hex2" $HEX2\
|
||||
--LittleEndian\
|
||||
--architecture $stage0_cpu\
|
||||
--BaseAddress 0x1000000\
|
||||
-f ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-0header.hex2\
|
||||
-f ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-0exit-42.hex2\
|
||||
--exec_enable\
|
||||
-o 0exit-42
|
||||
|
||||
trace "TEST 0exit-42"
|
||||
{ set +e; ./0exit-42; r=$?; set_min_e; }
|
||||
[ $r != 42 ] && echo " => $r"
|
||||
[ $r = 42 ]
|
||||
|
||||
trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-body-exit-42.hex2" $HEX2\
|
||||
--LittleEndian\
|
||||
--architecture $stage0_cpu\
|
||||
--BaseAddress 0x1000000\
|
||||
-f ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-header.hex2\
|
||||
-f ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-body-exit-42.hex2\
|
||||
-f ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-footer-single-main.hex2\
|
||||
--exec_enable\
|
||||
-o body-exit-42
|
||||
|
||||
trace "TEST body-exit-42"
|
||||
{ set +e; ./body-exit-42; r=$?; set_min_e; }
|
||||
[ $r != 42 ] && echo " => $r"
|
||||
[ $r = 42 ]
|
||||
|
||||
### FIXME: c&p from exit-42
|
||||
trace "CCLD ${srcdest}lib/$mes_cpu-mes-$compiler/hello-mes.S" $CC\
|
||||
-nostdlib\
|
||||
-g\
|
||||
${srcdest}lib/$mes_cpu-mes-$compiler/hello-mes.S\
|
||||
-o hello-mes
|
||||
|
||||
trace "TEST hello-mes"
|
||||
{ set +e; ./hello-mes; r=$?; set_min_e; }
|
||||
[ $r != 0 ] && echo " => $r"
|
||||
[ $r = 0 ]
|
||||
|
||||
trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-0hello-mes.hex2" $HEX2\
|
||||
--LittleEndian\
|
||||
--architecture $stage0_cpu\
|
||||
--BaseAddress 0x1000000\
|
||||
-f ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-0header.hex2\
|
||||
-f ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-0hello-mes.hex2\
|
||||
--exec_enable\
|
||||
-o 0hello-mes
|
||||
|
||||
trace "TEST 0hello-mes"
|
||||
{ set +e; ./0hello-mes; r=$?; set_min_e; }
|
||||
[ $r != 0 ] && echo " => $r"
|
||||
[ $r = 0 ]
|
||||
|
||||
trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-body-hello-mes.hex2" $HEX2\
|
||||
--LittleEndian\
|
||||
--architecture $stage0_cpu\
|
||||
--BaseAddress 0x1000000\
|
||||
-f ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-header.hex2\
|
||||
-f ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-body-hello-mes.hex2\
|
||||
-f ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-footer-single-main.hex2\
|
||||
--exec_enable\
|
||||
-o body-hello-mes
|
||||
|
||||
trace "TEST body-hello-mes"
|
||||
{ set +e; ./body-hello-mes; r=$?; set_min_e; }
|
||||
[ $r != 0 ] && echo " => $r"
|
||||
[ $r = 0 ]
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -20,41 +20,129 @@
|
|||
|
||||
set -e
|
||||
|
||||
. ./config.status
|
||||
. ${srcdest}build-aux/config.sh
|
||||
|
||||
if [ -n "$GUILE" -a "$GUILE" != true ]; then
|
||||
sh ${srcdest}build-aux/build-guile.sh
|
||||
if test "$1" = "help"; then
|
||||
cat <<EOF
|
||||
Run:
|
||||
./build.sh to build mes
|
||||
./check.sh to check mes
|
||||
./install.sh to install mes
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! "$mes_p" ]; then
|
||||
sh ${srcdest}build-aux/snarf.sh
|
||||
#elif [ ! -d "$MES_SEED" ]; then
|
||||
#else
|
||||
fi
|
||||
sh ${srcdest}build-aux/snarf.sh --mes
|
||||
|
||||
if [ "$gcc_p$tcc_p" ]; then
|
||||
sh ${srcdest}build-aux/build-mes.sh
|
||||
elif [ -d "$MES_SEED" ]; then
|
||||
sh ${srcdest}build-aux/bootstrap-mes.sh
|
||||
if test "$V" = 2; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
## FIXME: remove this and have user configure/build/install for each compiler?
|
||||
unset CFLAGS CPPFLAGS LDFLAGS gcc_p tcc_p posix_p
|
||||
MES=guile
|
||||
mesc_p=1
|
||||
mes_p=1
|
||||
mes_arch=x86-mes
|
||||
program_prefix=$mes_arch-
|
||||
CC="./pre-inst-env mescc"
|
||||
set -u
|
||||
. ./config.sh
|
||||
|
||||
sh ${srcdest}build-aux/build-mes.sh
|
||||
cp src/${program_prefix}mes src/mes
|
||||
|
||||
if [ "$arch" = x86_64 ]; then
|
||||
MES_CFLAGS='-m 64'
|
||||
mes_arch=x86_64-mes
|
||||
program_prefix=$mes_arch-
|
||||
sh ${srcdest}build-aux/build-mes.sh
|
||||
if $courageous; then
|
||||
echo "Applying courage"
|
||||
set +e
|
||||
fi
|
||||
|
||||
${SHELL} ${srcdest}build-aux/build-scaffold.sh
|
||||
|
||||
if test -n "$GUILE" -a "$GUILE" != true; then
|
||||
${SHELL} ${srcdest}build-aux/build-guile.sh
|
||||
fi
|
||||
|
||||
debug=
|
||||
#debug=-g
|
||||
|
||||
CFLAGS="
|
||||
-static
|
||||
$debug
|
||||
"
|
||||
|
||||
if test $mes_libc = mes; then
|
||||
CFLAGS="$CFLAGS
|
||||
-nostdinc
|
||||
-nostdlib
|
||||
-fno-builtin
|
||||
"
|
||||
fi
|
||||
|
||||
CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ../include
|
||||
-I ${srcdir}/../include
|
||||
-I ${srcdir}/../include/$mes_kernel/$mes_cpu
|
||||
"
|
||||
|
||||
LDFLAGS="
|
||||
$debug
|
||||
-L .
|
||||
"
|
||||
if test $mes_libc = mes; then
|
||||
LDFLAGS="$LDFLAGS
|
||||
-nostdlib
|
||||
"
|
||||
fi
|
||||
LIBS=-lc
|
||||
|
||||
export CFLAGS
|
||||
export CPPFLAGS
|
||||
export LDFLAGS
|
||||
export LIBS
|
||||
|
||||
if test $compiler = gcc; then
|
||||
(
|
||||
mkdir -p gcc-lib
|
||||
cp config.sh gcc-lib
|
||||
cd gcc-lib
|
||||
if test -z "$srcdest"; then
|
||||
srcdest=../
|
||||
srcdir=../
|
||||
fi
|
||||
CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
"
|
||||
${SHELL} ${srcdest}build-aux/build-lib.sh
|
||||
cp crt1.o ..
|
||||
)
|
||||
fi
|
||||
|
||||
(
|
||||
if test $compiler = gcc; then
|
||||
LDFLAGS="$LDFLAGS
|
||||
-L gcc-lib
|
||||
"
|
||||
fi
|
||||
|
||||
CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
"
|
||||
${SHELL} ${srcdest}build-aux/build-mes.sh
|
||||
)
|
||||
|
||||
(
|
||||
mkdir -p mescc-lib
|
||||
cp config.sh mescc-lib
|
||||
cd mescc-lib
|
||||
sed -i s,mes_libc=system,mes_libc=mes, config.sh
|
||||
mkdir -p include/mes
|
||||
cp -p ../include/mes/config.h include/mes/config.h
|
||||
sed -i 's,#define SYSTEM_LIBC 1,#undef SYSTEM_LIBC,' include/mes/config.h
|
||||
if test -z "$srcdest"; then
|
||||
srcdest=../
|
||||
srcdir=../
|
||||
fi
|
||||
CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I include
|
||||
-I ${srcdest}include
|
||||
-I ${srcdest}include/$mes_kernel/$mes_cpu
|
||||
"
|
||||
compiler=mescc
|
||||
AR="${srcdest}pre-inst-env mesar"
|
||||
CC="${srcdest}pre-inst-env mescc -m $mes_bits"
|
||||
${SHELL} ${srcdest}build-aux/build-lib.sh
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -16,32 +16,41 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
objects=
|
||||
compile () {
|
||||
flags=
|
||||
[ "$mesc_p" ] && flags="$LDFLAGS $MES_CFLAGS"
|
||||
trace "CC $1.c" $CC -c $CPPFLAGS $CFLAGS $flags -o "$1".${program_prefix}o "${srcdest}$1".c
|
||||
}
|
||||
|
||||
archive () {
|
||||
l=$1
|
||||
shift
|
||||
objects=$(for i in $@; do echo $i.${program_prefix}o; done)
|
||||
[ -z "$objects" ] && objects=$l.${program_prefix}o
|
||||
out=$(dirname "$l")/$mes_arch/$(basename "$l").a
|
||||
d=$(dirname $out)
|
||||
mkdir -p $d
|
||||
if [ "$mesc_p" ]; then
|
||||
trace "AR $l.a" mv $l.${program_prefix}o $(dirname $l)/$mes_arch/$(basename $l).o\
|
||||
&& mv $l.${program_prefix}S $(dirname $l)/$mes_arch/$(basename $l).S
|
||||
else
|
||||
trace "AR $l.a" $AR cr $out $objects\
|
||||
&& mv $objects $d
|
||||
c=${srcdest}$1
|
||||
b=$(basename $c .c)
|
||||
o=$b.o
|
||||
objects="$objects $o"
|
||||
if test $c -nt $o; then
|
||||
trace "CC $c" $CC -c $CPPFLAGS $CFLAGS -o $o $c
|
||||
$CC -c $CPPFLAGS $CFLAGS -o $o $c
|
||||
fi
|
||||
}
|
||||
|
||||
link () {
|
||||
lib=$libc
|
||||
[ "$posix_p" ] && lib='-l mes'
|
||||
out=$(dirname "$1")/${program_prefix}$(basename "$1")
|
||||
trace "CCLD $1" $CC $CFLAGS $LDFLAGS -o" $out" $crt1 "$1".${program_prefix}o $2 $lib
|
||||
archive () {
|
||||
archive=$1
|
||||
shift
|
||||
sources="$@"
|
||||
objects=
|
||||
for c in $sources; do
|
||||
b=$(basename $c .c)
|
||||
o=$b.o
|
||||
compile $c
|
||||
done
|
||||
trace "AR $archive" $AR crD $archive $objects
|
||||
objects=
|
||||
}
|
||||
|
||||
link () {
|
||||
out=$1
|
||||
d=$(dirname $out)
|
||||
mkdir -p $d
|
||||
if test $mes_libc = system; then
|
||||
crt1=
|
||||
else
|
||||
crt1=crt1.o
|
||||
fi
|
||||
trace "CCLD $out" $CC $CFLAGS $LDFLAGS -o $out $crt1 $objects $LIBS
|
||||
objects=
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/bash
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -19,120 +19,104 @@
|
|||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -e
|
||||
. ./config.sh
|
||||
set -u
|
||||
|
||||
. ./config.status
|
||||
. ${srcdest}build-aux/config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
TESTS="
|
||||
|
||||
tests="
|
||||
scaffold/boot/00-zero.scm
|
||||
scaffold/boot/01-true.scm
|
||||
scaffold/boot/02-symbol.scm
|
||||
scaffold/boot/03-string.scm
|
||||
scaffold/boot/04-quote.scm
|
||||
scaffold/boot/05-list.scm
|
||||
scaffold/boot/06-tick.scm
|
||||
scaffold/boot/07-if.scm
|
||||
scaffold/boot/08-if-if.scm
|
||||
|
||||
00-zero.scm
|
||||
01-true.scm
|
||||
02-symbol.scm
|
||||
03-string.scm
|
||||
04-quote.scm
|
||||
05-list.scm
|
||||
06-tick.scm
|
||||
07-if.scm
|
||||
08-if-if.scm
|
||||
scaffold/boot/10-cons.scm
|
||||
scaffold/boot/11-list.scm
|
||||
scaffold/boot/11-vector.scm
|
||||
scaffold/boot/12-car.scm
|
||||
scaffold/boot/13-cdr.scm
|
||||
scaffold/boot/14-exit.scm
|
||||
scaffold/boot/15-display.scm
|
||||
|
||||
10-cons.scm
|
||||
11-list.scm
|
||||
11-vector.scm
|
||||
12-car.scm
|
||||
13-cdr.scm
|
||||
14-exit.scm
|
||||
15-display.scm
|
||||
scaffold/boot/16-if-eq-quote.scm
|
||||
|
||||
16-if-eq-quote.scm
|
||||
scaffold/boot/17-memq.scm
|
||||
scaffold/boot/17-memq-keyword.scm
|
||||
scaffold/boot/17-string-equal.scm
|
||||
scaffold/boot/17-equal2.scm
|
||||
scaffold/boot/17-string-append.scm
|
||||
scaffold/boot/17-open-input-string.scm
|
||||
|
||||
17-memq.scm
|
||||
17-memq-keyword.scm
|
||||
17-string-equal.scm
|
||||
17-equal2.scm
|
||||
17-string-append.scm
|
||||
17-open-input-string.scm
|
||||
scaffold/boot/20-define.scm
|
||||
scaffold/boot/20-define-quoted.scm
|
||||
scaffold/boot/20-define-quote.scm
|
||||
|
||||
20-define.scm
|
||||
20-define-quoted.scm
|
||||
20-define-quote.scm
|
||||
scaffold/boot/21-define-procedure.scm
|
||||
scaffold/boot/22-define-procedure-2.scm
|
||||
scaffold/boot/23-begin.scm
|
||||
scaffold/boot/24-begin-define.scm
|
||||
scaffold/boot/25-begin-define-2.scm
|
||||
scaffold/boot/26-begin-define-later.scm
|
||||
scaffold/boot/27-lambda-define.scm
|
||||
scaffold/boot/28-define-define.scm
|
||||
scaffold/boot/29-lambda-define.scm
|
||||
scaffold/boot/2a-lambda-lambda.scm
|
||||
scaffold/boot/2b-define-lambda.scm
|
||||
scaffold/boot/2c-define-lambda-recurse.scm
|
||||
scaffold/boot/2d-define-lambda-set.scm
|
||||
scaffold/boot/2d-compose.scm
|
||||
scaffold/boot/2e-define-first.scm
|
||||
scaffold/boot/2f-define-second.scm
|
||||
scaffold/boot/2f-define-second-lambda.scm
|
||||
scaffold/boot/2g-vector.scm
|
||||
|
||||
21-define-procedure.scm
|
||||
22-define-procedure-2.scm
|
||||
23-begin.scm
|
||||
24-begin-define.scm
|
||||
25-begin-define-2.scm
|
||||
26-begin-define-later.scm
|
||||
27-lambda-define.scm
|
||||
28-define-define.scm
|
||||
29-lambda-define.scm
|
||||
2a-lambda-lambda.scm
|
||||
2b-define-lambda.scm
|
||||
2c-define-lambda-recurse.scm
|
||||
2d-define-lambda-set.scm
|
||||
2d-compose.scm
|
||||
2e-define-first.scm
|
||||
2f-define-second.scm
|
||||
2f-define-second-lambda.scm
|
||||
2g-vector.scm
|
||||
scaffold/boot/30-capture.scm
|
||||
scaffold/boot/31-capture-define.scm
|
||||
scaffold/boot/32-capture-modify-close.scm
|
||||
scaffold/boot/32-capture-modify-close.scm
|
||||
scaffold/boot/33-procedure-override-close.scm
|
||||
scaffold/boot/34-cdr-override-close.scm
|
||||
scaffold/boot/35-closure-modify.scm
|
||||
scaffold/boot/36-closure-override.scm
|
||||
scaffold/boot/37-closure-lambda.scm
|
||||
scaffold/boot/38-simple-format.scm
|
||||
scaffold/boot/39-global-define-override.scm
|
||||
scaffold/boot/3a-global-define-lambda-override.scm
|
||||
|
||||
30-capture.scm
|
||||
31-capture-define.scm
|
||||
32-capture-modify-close.scm
|
||||
32-capture-modify-close.scm
|
||||
33-procedure-override-close.scm
|
||||
34-cdr-override-close.scm
|
||||
35-closure-modify.scm
|
||||
36-closure-override.scm
|
||||
37-closure-lambda.scm
|
||||
38-simple-format.scm
|
||||
39-global-define-override.scm
|
||||
3a-global-define-lambda-override.scm
|
||||
scaffold/boot/40-define-macro.scm
|
||||
scaffold/boot/41-when.scm
|
||||
scaffold/boot/42-if-when.scm
|
||||
scaffold/boot/43-or.scm
|
||||
scaffold/boot/44-or-if.scm
|
||||
scaffold/boot/45-pass-if.scm
|
||||
scaffold/boot/46-report.scm
|
||||
scaffold/boot/47-pass-if-eq.scm
|
||||
scaffold/boot/48-let.scm
|
||||
scaffold/boot/49-macro-override.scm
|
||||
scaffold/boot/4a-define-macro-define-macro.scm
|
||||
scaffold/boot/4b-define-macro-define.scm
|
||||
scaffold/boot/4c-quasiquote.scm
|
||||
scaffold/boot/4d-let-map.scm
|
||||
scaffold/boot/4e-let-global.scm
|
||||
scaffold/boot/4f-string-split.scm
|
||||
|
||||
40-define-macro.scm
|
||||
41-when.scm
|
||||
42-if-when.scm
|
||||
43-or.scm
|
||||
44-or-if.scm
|
||||
45-pass-if.scm
|
||||
46-report.scm
|
||||
47-pass-if-eq.scm
|
||||
48-let.scm
|
||||
49-macro-override.scm
|
||||
4a-define-macro-define-macro.scm
|
||||
4b-define-macro-define.scm
|
||||
4c-quasiquote.scm
|
||||
4d-let-map.scm
|
||||
4e-let-global.scm
|
||||
4f-string-split.scm
|
||||
|
||||
50-string-append.scm
|
||||
50-string-join.scm
|
||||
50-primitive-load.scm
|
||||
51-module.scm
|
||||
52-define-module.scm
|
||||
53-closure-display.scm
|
||||
|
||||
60-let-syntax.scm
|
||||
scaffold/boot/50-keyword.scm
|
||||
scaffold/boot/50-make-string.scm
|
||||
scaffold/boot/50-string-join.scm
|
||||
scaffold/boot/50-primitive-load.scm
|
||||
scaffold/boot/53-closure-display.scm
|
||||
scaffold/boot/60-let-syntax.scm
|
||||
scaffold/boot/call-cc.scm
|
||||
scaffold/boot/memory.scm
|
||||
scaffold/boot/numbers.scm
|
||||
"
|
||||
|
||||
for i in $tests; do
|
||||
echo -n $i
|
||||
if [ ! -f scaffold/boot/$i ]; then
|
||||
echo ' [SKIP]'
|
||||
continue;
|
||||
fi
|
||||
x=$(
|
||||
if [ "$MES" = guile -o "$(basename $MES)" = guile ]; then
|
||||
trace "TEST $i.guile" $GUILE -L ${srcdest}module -C module -L . <(echo '(use-modules (mes guile))'; cat scaffold/boot/$i)
|
||||
elif [ -z "${i/5[0-9]-*/}" ]; then
|
||||
cat scaffold/boot/$i | MES_BOOT=${srcdest}boot-00.scm trace "TEST $i" $MES 2>&1;
|
||||
elif [ -z "${i/6[0-9]-*/}" ]; then
|
||||
cat scaffold/boot/$i | MES_BOOT=${srcdest}boot-01.scm trace "TEST $i" $MES 2>&1;
|
||||
else
|
||||
MES_BOOT=${srcdest}scaffold/boot/$i trace "TEST $i" $MES 2>&1;
|
||||
fi
|
||||
) \
|
||||
&& echo ' [OK]' \
|
||||
|| (r=$?; echo ' [FAIL]'; echo -e "$x"; echo scaffold/boot/$i; exit $r)
|
||||
done
|
||||
XFAIL_TESTS=
|
||||
|
||||
test_ext=.scm
|
||||
log_compiler="${SHELL} ${srcdest}build-aux/test-boot.sh"
|
||||
. ${srcdest}build-aux/test-suite.sh
|
||||
|
|
|
@ -19,12 +19,10 @@
|
|||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -e
|
||||
. ./config.sh
|
||||
set -u
|
||||
|
||||
. ./config.status
|
||||
. ${srcdest}build-aux/config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
|
||||
tests="
|
||||
TESTS="
|
||||
tests/boot.test
|
||||
tests/read.test
|
||||
tests/srfi-0.test
|
||||
|
@ -57,28 +55,8 @@ tests/match.test
|
|||
tests/psyntax.test
|
||||
"
|
||||
|
||||
mkdir -p tests
|
||||
set +e
|
||||
fail=0
|
||||
total=0
|
||||
for t in $tests; do
|
||||
if [ ! -f $t ]; then
|
||||
echo $t: [SKIP];
|
||||
continue
|
||||
fi
|
||||
${top_builddir}/pre-inst-env sh "$t" &> $t.${mes}log
|
||||
r=$?
|
||||
total=$((total+1))
|
||||
if [ $r = 0 ]; then
|
||||
echo $t: [${mes}OK]
|
||||
else
|
||||
echo $t: [${mes}FAIL]
|
||||
fail=$((fail+1))
|
||||
fi
|
||||
done
|
||||
if [ $fail != 0 ]; then
|
||||
echo FAILED: $fail/$total
|
||||
exit 1
|
||||
else
|
||||
echo PASS: $total
|
||||
fi
|
||||
XFAIL_TESTS=
|
||||
|
||||
test_ext=.test
|
||||
log_compiler=${SHELL}
|
||||
. ${srcdest}build-aux/test-suite.sh
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -19,256 +19,270 @@
|
|||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -e
|
||||
. ./config.status
|
||||
. ${srcdest}build-aux/config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
. ./config.sh
|
||||
set -u
|
||||
|
||||
test_sh=${test_sh-${srcdest}build-aux/test.sh}
|
||||
|
||||
tests="
|
||||
t
|
||||
00-exit-0
|
||||
01-return-0
|
||||
02-return-1
|
||||
03-call
|
||||
04-call-0
|
||||
05-call-1
|
||||
06-call-!1
|
||||
06-!call-1
|
||||
06-call-2
|
||||
06-call-string
|
||||
06-call-variable
|
||||
06-return-void
|
||||
07-include
|
||||
08-assign
|
||||
08-assign-negative
|
||||
08-assign-global
|
||||
10-if-0
|
||||
11-if-1
|
||||
12-if-==
|
||||
13-if-!=
|
||||
14-if-goto
|
||||
15-if-!f
|
||||
16-if-t
|
||||
17-compare-char
|
||||
17-compare-ge
|
||||
17-compare-gt
|
||||
17-compare-le
|
||||
17-compare-lt
|
||||
17-compare-unsigned-ge
|
||||
17-compare-unsigned-gt
|
||||
17-compare-unsigned-le
|
||||
17-compare-unsigned-lt
|
||||
17-compare-unsigned-char-le
|
||||
17-compare-unsigned-short-le
|
||||
17-compare-unsigned-long-le
|
||||
17-compare-and
|
||||
17-compare-or
|
||||
17-compare-and-or
|
||||
17-compare-assign
|
||||
17-compare-call
|
||||
18-assign-shadow
|
||||
20-while
|
||||
21-char[]-simple
|
||||
21-char[]
|
||||
22-while-char[]
|
||||
23-global-pointer-init-null
|
||||
23-global-pointer-init
|
||||
23-global-pointer-ref
|
||||
23-global-pointer-pointer-ref
|
||||
23-pointer-sub
|
||||
23-pointer
|
||||
30-strlen
|
||||
31-oputs
|
||||
32-call-wrap
|
||||
32-compare
|
||||
33-and-or
|
||||
34-pre-post
|
||||
35-compare-char
|
||||
36-compare-arithmetic
|
||||
37-compare-assign
|
||||
38-compare-call-2
|
||||
38-compare-call-3
|
||||
38-compare-call
|
||||
40-if-else
|
||||
41-?
|
||||
42-goto-label
|
||||
43-for-do-while
|
||||
44-switch
|
||||
44-switch-fallthrough
|
||||
44-switch-body-fallthrough
|
||||
45-void-call
|
||||
46-function-static
|
||||
47-function-expression
|
||||
48-global-static
|
||||
50-assert
|
||||
51-pointer-sub
|
||||
51-itoa
|
||||
51-strcmp
|
||||
51-strncmp
|
||||
53-strcpy
|
||||
54-argc
|
||||
54-argv
|
||||
55-char-array
|
||||
60-math
|
||||
61-array
|
||||
62-array
|
||||
63-struct
|
||||
63-struct-pointer
|
||||
63-struct-local
|
||||
63-struct-function
|
||||
63-struct-assign
|
||||
63-struct-array
|
||||
63-struct-array-assign
|
||||
63-struct-array-compare
|
||||
63-struct-cell
|
||||
64-make-cell
|
||||
65-read
|
||||
66-local-char-array
|
||||
70-strchr
|
||||
70-stdarg
|
||||
70-printf-hello
|
||||
70-printf-simple
|
||||
70-printf
|
||||
71-struct-array
|
||||
72-typedef-struct-def
|
||||
73-union-hello
|
||||
73-union
|
||||
74-multi-line-string
|
||||
75-struct-union
|
||||
76-pointer-arithmetic-pp
|
||||
76-pointer-arithmetic
|
||||
77-pointer-assign
|
||||
78-union-struct
|
||||
79-int-array-simple
|
||||
79-int-array
|
||||
7a-struct-char-array
|
||||
7b-struct-int-array-hello
|
||||
7b-struct-int-array-pointer
|
||||
7b-struct-int-array
|
||||
7c-dynarray
|
||||
7d-cast-char
|
||||
7e-struct-array-access
|
||||
7f-struct-pointer-arithmetic
|
||||
7g-struct-byte-word-field
|
||||
7h-struct-assign
|
||||
7i-struct-struct-simple
|
||||
7i-struct-struct
|
||||
7j-strtoull
|
||||
7k-empty-for
|
||||
7k-for-each-elem-simple
|
||||
7k-for-each-elem
|
||||
7l-struct-any-size-array-simple
|
||||
7l-struct-any-size-array
|
||||
7m-struct-char-array-assign
|
||||
7n-struct-struct-array
|
||||
7o-struct-pre-post-simple
|
||||
7o-struct-pre-post
|
||||
7p-struct-cast
|
||||
7q-bit-field-simple
|
||||
7q-bit-field
|
||||
7r-sign-extend
|
||||
7s-struct-short
|
||||
7s-unsigned-compare
|
||||
7t-function-destruct
|
||||
7u-double
|
||||
7u-long-long
|
||||
7u-?-expression
|
||||
7u-call-?
|
||||
7u-inc-byte-word
|
||||
7u-struct-func
|
||||
7u-struct-size10
|
||||
7u-vstack
|
||||
80-setjmp
|
||||
81-qsort
|
||||
81-qsort-dupes
|
||||
82-define
|
||||
83-heterogenoous-init
|
||||
84-struct-field-list
|
||||
85-sizeof
|
||||
86-strncpy
|
||||
87-sscanf
|
||||
88-strrchr
|
||||
90-strspn
|
||||
90-strpbrk
|
||||
91-fseek
|
||||
92-stat
|
||||
93-fread-fwrite
|
||||
94-unsetenv
|
||||
95-signal
|
||||
96-strto
|
||||
97-fopen
|
||||
98-fopen
|
||||
99-readdir
|
||||
9a-snprintf
|
||||
a0-call-trunc-char
|
||||
a0-call-trunc-short
|
||||
a0-call-trunc-int
|
||||
a0-math-divide-signed-negative
|
||||
a1-global-no-align
|
||||
a1-global-no-clobber
|
||||
TESTS="
|
||||
lib/tests/scaffold/t.c
|
||||
lib/tests/scaffold/00-exit-0.c
|
||||
lib/tests/scaffold/01-return-0.c
|
||||
lib/tests/scaffold/02-return-1.c
|
||||
lib/tests/scaffold/03-call.c
|
||||
lib/tests/scaffold/04-call-0.c
|
||||
lib/tests/scaffold/05-call-1.c
|
||||
lib/tests/scaffold/06-call-not-1.c
|
||||
lib/tests/scaffold/06-not-call-1.c
|
||||
lib/tests/scaffold/06-call-2.c
|
||||
lib/tests/scaffold/06-call-string.c
|
||||
lib/tests/scaffold/06-call-variable.c
|
||||
lib/tests/scaffold/06-return-void.c
|
||||
lib/tests/scaffold/07-include.c
|
||||
lib/tests/scaffold/08-assign.c
|
||||
lib/tests/scaffold/08-assign-negative.c
|
||||
lib/tests/scaffold/08-assign-global.c
|
||||
lib/tests/scaffold/10-if-0.c
|
||||
lib/tests/scaffold/11-if-1.c
|
||||
lib/tests/scaffold/12-if-eq.c
|
||||
lib/tests/scaffold/13-if-neq.c
|
||||
lib/tests/scaffold/14-if-goto.c
|
||||
lib/tests/scaffold/15-if-not-f.c
|
||||
lib/tests/scaffold/16-if-t.c
|
||||
lib/tests/scaffold/17-compare-char.c
|
||||
lib/tests/scaffold/17-compare-ge.c
|
||||
lib/tests/scaffold/17-compare-gt.c
|
||||
lib/tests/scaffold/17-compare-le.c
|
||||
lib/tests/scaffold/17-compare-lt.c
|
||||
lib/tests/scaffold/17-compare-unsigned-ge.c
|
||||
lib/tests/scaffold/17-compare-unsigned-gt.c
|
||||
lib/tests/scaffold/17-compare-unsigned-le.c
|
||||
lib/tests/scaffold/17-compare-unsigned-lt.c
|
||||
lib/tests/scaffold/17-compare-unsigned-char-le.c
|
||||
lib/tests/scaffold/17-compare-unsigned-short-le.c
|
||||
lib/tests/scaffold/17-compare-unsigned-long-le.c
|
||||
lib/tests/scaffold/17-compare-and.c
|
||||
lib/tests/scaffold/17-compare-or.c
|
||||
lib/tests/scaffold/17-compare-and-or.c
|
||||
lib/tests/scaffold/17-compare-assign.c
|
||||
lib/tests/scaffold/17-compare-call.c
|
||||
lib/tests/scaffold/18-assign-shadow.c
|
||||
lib/tests/scaffold/20-while.c
|
||||
lib/tests/scaffold/21-char-array-simple.c
|
||||
lib/tests/scaffold/21-char-array.c
|
||||
lib/tests/scaffold/22-while-char-array.c
|
||||
lib/tests/scaffold/23-global-pointer-init-null.c
|
||||
lib/tests/scaffold/23-global-pointer-init.c
|
||||
lib/tests/scaffold/23-global-pointer-ref.c
|
||||
lib/tests/scaffold/23-global-pointer-pointer-ref.c
|
||||
lib/tests/scaffold/23-pointer-sub.c
|
||||
lib/tests/scaffold/23-pointer.c
|
||||
lib/tests/mes/30-oputs.c
|
||||
lib/tests/string/30-strlen.c
|
||||
lib/tests/scaffold/32-call-wrap.c
|
||||
lib/tests/scaffold/32-compare.c
|
||||
lib/tests/scaffold/33-and-or.c
|
||||
lib/tests/scaffold/34-pre-post.c
|
||||
lib/tests/scaffold/35-compare-char.c
|
||||
lib/tests/scaffold/36-compare-arithmetic.c
|
||||
lib/tests/scaffold/37-compare-assign.c
|
||||
lib/tests/scaffold/38-compare-call-2.c
|
||||
lib/tests/scaffold/38-compare-call-3.c
|
||||
lib/tests/scaffold/38-compare-call.c
|
||||
lib/tests/scaffold/40-if-else.c
|
||||
lib/tests/scaffold/41-ternary.c
|
||||
lib/tests/scaffold/42-goto-label.c
|
||||
lib/tests/scaffold/43-for-do-while.c
|
||||
lib/tests/scaffold/44-switch.c
|
||||
lib/tests/scaffold/44-switch-fallthrough.c
|
||||
lib/tests/scaffold/44-switch-body-fallthrough.c
|
||||
lib/tests/scaffold/45-void-call.c
|
||||
lib/tests/scaffold/46-function-static.c
|
||||
lib/tests/scaffold/47-function-expression.c
|
||||
lib/tests/scaffold/48-global-static.c
|
||||
lib/tests/assert/50-assert.c
|
||||
lib/tests/mes/50-itoa.c
|
||||
lib/tests/posix/50-getenv.c
|
||||
lib/tests/stdlib/50-malloc.c
|
||||
lib/tests/string/50-strcmp.c
|
||||
lib/tests/string/50-strcpy.c
|
||||
lib/tests/string/50-strncmp.c
|
||||
lib/tests/posix/50-open-read.c
|
||||
lib/tests/scaffold/51-pointer-sub.c
|
||||
lib/tests/scaffold/54-argc.c
|
||||
lib/tests/scaffold/54-argv.c
|
||||
lib/tests/scaffold/55-char-array.c
|
||||
lib/tests/scaffold/60-math.c
|
||||
lib/tests/scaffold/61-array.c
|
||||
lib/tests/scaffold/62-array.c
|
||||
lib/tests/scaffold/63-struct.c
|
||||
lib/tests/scaffold/63-struct-pointer.c
|
||||
lib/tests/scaffold/63-struct-local.c
|
||||
lib/tests/scaffold/63-struct-function.c
|
||||
lib/tests/scaffold/63-struct-assign.c
|
||||
lib/tests/scaffold/63-struct-array.c
|
||||
lib/tests/scaffold/63-struct-array-assign.c
|
||||
lib/tests/scaffold/63-struct-array-compare.c
|
||||
lib/tests/scaffold/63-struct-cell.c
|
||||
lib/tests/scaffold/64-make-cell.c
|
||||
lib/tests/scaffold/65-read.c
|
||||
lib/tests/scaffold/66-local-char-array.c
|
||||
lib/tests/scaffold/70-stdarg.c
|
||||
lib/tests/stdio/70-printf-hello.c
|
||||
lib/tests/stdio/70-printf-simple.c
|
||||
lib/tests/stdio/70-printf.c
|
||||
lib/tests/stdlib/70-strtoull.c
|
||||
lib/tests/string/70-strchr.c
|
||||
lib/tests/scaffold/71-struct-array.c
|
||||
lib/tests/scaffold/72-typedef-struct-def.c
|
||||
lib/tests/scaffold/72-typedef-struct-def-local.c
|
||||
lib/tests/scaffold/73-union-hello.c
|
||||
lib/tests/scaffold/73-union.c
|
||||
lib/tests/scaffold/74-multi-line-string.c
|
||||
lib/tests/scaffold/75-struct-union.c
|
||||
lib/tests/scaffold/76-pointer-arithmetic-pp.c
|
||||
lib/tests/scaffold/76-pointer-arithmetic.c
|
||||
lib/tests/scaffold/77-pointer-assign.c
|
||||
lib/tests/scaffold/78-union-struct.c
|
||||
lib/tests/scaffold/79-int-array-simple.c
|
||||
lib/tests/scaffold/79-int-array.c
|
||||
lib/tests/scaffold/7a-struct-char-array.c
|
||||
lib/tests/scaffold/7b-struct-int-array-hello.c
|
||||
lib/tests/scaffold/7b-struct-int-array-pointer.c
|
||||
lib/tests/scaffold/7b-struct-int-array.c
|
||||
lib/tests/scaffold/7c-dynarray.c
|
||||
lib/tests/scaffold/7d-cast-char.c
|
||||
lib/tests/scaffold/7e-struct-array-access.c
|
||||
lib/tests/scaffold/7f-struct-pointer-arithmetic.c
|
||||
lib/tests/scaffold/7g-struct-byte-word-field.c
|
||||
lib/tests/scaffold/7h-struct-assign.c
|
||||
lib/tests/scaffold/7i-struct-struct-simple.c
|
||||
lib/tests/scaffold/7i-struct-struct.c
|
||||
lib/tests/scaffold/7k-empty-for.c
|
||||
lib/tests/scaffold/7k-for-each-elem-simple.c
|
||||
lib/tests/scaffold/7k-for-each-elem.c
|
||||
lib/tests/scaffold/7l-struct-any-size-array-simple.c
|
||||
lib/tests/scaffold/7l-struct-any-size-array.c
|
||||
lib/tests/scaffold/7m-struct-char-array-assign.c
|
||||
lib/tests/scaffold/7n-struct-struct-array.c
|
||||
lib/tests/scaffold/7o-struct-pre-post-simple.c
|
||||
lib/tests/scaffold/7o-struct-pre-post.c
|
||||
lib/tests/scaffold/7p-struct-cast.c
|
||||
lib/tests/scaffold/7q-bit-field-simple.c
|
||||
lib/tests/scaffold/7q-bit-field.c
|
||||
lib/tests/scaffold/7r-sign-extend.c
|
||||
lib/tests/scaffold/7s-struct-short.c
|
||||
lib/tests/scaffold/7s-unsigned-compare.c
|
||||
lib/tests/scaffold/7t-function-destruct.c
|
||||
lib/tests/scaffold/7u-double.c
|
||||
lib/tests/scaffold/7u-long-long.c
|
||||
lib/tests/scaffold/7u-ternary-expression.c
|
||||
lib/tests/scaffold/7u-call-ternary.c
|
||||
lib/tests/scaffold/7u-inc-byte-word.c
|
||||
lib/tests/scaffold/7u-struct-func.c
|
||||
lib/tests/scaffold/7u-struct-size10.c
|
||||
lib/tests/scaffold/7u-vstack.c
|
||||
lib/tests/scaffold/70-array-in-struct-init.c
|
||||
lib/tests/scaffold/70-struct-short-enum-init.c
|
||||
lib/tests/scaffold/70-struct-post.c
|
||||
lib/tests/scaffold/70-extern.c
|
||||
lib/tests/setjmp/80-setjmp.c
|
||||
lib/tests/stdio/80-sscanf.c
|
||||
lib/tests/stdlib/80-qsort.c
|
||||
lib/tests/stdlib/80-qsort-dupes.c
|
||||
lib/tests/string/80-strncpy.c
|
||||
lib/tests/string/80-strrchr.c
|
||||
lib/tests/scaffold/82-define.c
|
||||
lib/tests/scaffold/83-heterogenoous-init.c
|
||||
lib/tests/scaffold/84-struct-field-list.c
|
||||
lib/tests/scaffold/85-sizeof.c
|
||||
"
|
||||
|
||||
broken="$broken
|
||||
17-compare-unsigned-char-le
|
||||
17-compare-unsigned-short-le
|
||||
66-local-char-array
|
||||
a0-call-trunc-int
|
||||
a0-math-divide-signed-negative
|
||||
"
|
||||
|
||||
if [ "$mes_arch" = "x86_64-gcc" ]; then
|
||||
broken="$broken
|
||||
21-char[]
|
||||
41-?
|
||||
70-printf-stdarg
|
||||
70-printf-simple
|
||||
70-printf
|
||||
80-setjmp
|
||||
a1-global-no-align
|
||||
if test -z "$bootstrap"; then
|
||||
TESTS="$TESTS
|
||||
lib/tests/dirent/90-readdir.c
|
||||
lib/tests/io/90-stat.c
|
||||
lib/tests/posix/90-unsetenv.c
|
||||
lib/tests/signal/90-signal.c
|
||||
lib/tests/stdio/90-fopen.c
|
||||
lib/tests/stdio/90-fopen-append.c
|
||||
lib/tests/stdio/90-fread-fwrite.c
|
||||
lib/tests/stdio/90-fseek.c
|
||||
lib/tests/stdlib/90-strtol.c
|
||||
lib/tests/string/90-snprintf.c
|
||||
lib/tests/string/90-strpbrk.c
|
||||
lib/tests/string/90-strspn.c
|
||||
lib/tests/scaffold/90-goto-var.c
|
||||
lib/tests/scaffold/91-goto-array.c
|
||||
lib/tests/scaffold/a0-call-trunc-char.c
|
||||
lib/tests/scaffold/a0-call-trunc-short.c
|
||||
lib/tests/scaffold/a0-call-trunc-int.c
|
||||
lib/tests/scaffold/a0-math-divide-signed-negative.c
|
||||
lib/tests/scaffold/a1-global-no-align.c
|
||||
lib/tests/scaffold/a1-global-no-clobber.c
|
||||
"
|
||||
fi
|
||||
|
||||
set +e
|
||||
expect=$(echo $broken | wc -w)
|
||||
pass=0
|
||||
fail=0
|
||||
total=0
|
||||
mkdir -p scaffold/tests
|
||||
for t in $tests; do
|
||||
if [ -z "${t/[012][0-9]-*/}" ]; then
|
||||
libc=
|
||||
elif [ -z "${t/[34][0-9]-*/}" ]; then
|
||||
libc='-l c-mini'
|
||||
elif [ -z "${t/[78][0-9a-z]-*/}" ]; then
|
||||
libc='-l c+tcc'
|
||||
elif [ -z "${t/9[0-9a-z]-*/}" ]; then
|
||||
libc='-l c+gnu'
|
||||
else
|
||||
libc='-l c'
|
||||
fi
|
||||
sh $test_sh "scaffold/tests/$t" &> scaffold/tests/"$t".log
|
||||
r=$?
|
||||
total=$((total+1))
|
||||
if [ $r = 0 ]; then
|
||||
echo $t: [OK]
|
||||
pass=$((pass+1))
|
||||
else
|
||||
echo $t: [FAIL]
|
||||
fail=$((fail+1))
|
||||
fi
|
||||
done
|
||||
XFAIL_TESTS="
|
||||
lib/tests/stdio/90-sprintf.c
|
||||
lib/tests/stdio/90-sprintf.c
|
||||
"
|
||||
|
||||
[ $expect != 0 ] && echo "expect: $expect"
|
||||
[ $fail != 0 ] && echo "failed: $fail"
|
||||
[ $fail -lt $expect ] && echo "solved: $(($expect - $fail))"
|
||||
echo "passed: $pass"
|
||||
echo "total: $total"
|
||||
if [ $fail != 0 -a $fail -gt $expect ]; then
|
||||
echo FAILED: $fail/$total
|
||||
exit 1
|
||||
elif [ $fail != 0 ]; then
|
||||
echo PASS: $pass/$total
|
||||
else
|
||||
echo PASS: $total
|
||||
if test $compiler = mescc; then
|
||||
XFAIL_TESTS="$XFAIL_TESTS
|
||||
lib/tests/scaffold/17-compare-unsigned-char-le.c
|
||||
lib/tests/scaffold/17-compare-unsigned-short-le.c
|
||||
lib/tests/scaffold/66-local-char-array.c
|
||||
lib/tests/scaffold/72-typedef-struct-def-local.c
|
||||
lib/tests/scaffold/90-goto-var.c
|
||||
lib/tests/scaffold/91-goto-array.c
|
||||
"
|
||||
|
||||
if test $mes_cpu = x86; then
|
||||
XFAIL_TESTS="$XFAIL_TESTS
|
||||
"
|
||||
fi
|
||||
|
||||
if test $mes_cpu = x86_64; then
|
||||
XFAIL_TESTS="$XFAIL_TESTS
|
||||
lib/tests/scaffold/a0-call-trunc-int.c
|
||||
"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $mes_cpu = x86; then
|
||||
XFAIL_TESTS="$XFAIL_TESTS
|
||||
"
|
||||
fi
|
||||
|
||||
if test $mes_cpu = x86_64; then
|
||||
XFAIL_TESTS="$XFAIL_TESTS
|
||||
lib/tests/stdio/70-printf-simple.c
|
||||
lib/tests/stdio/70-printf-stdarg.c
|
||||
lib/tests/stdio/70-printf.c
|
||||
"
|
||||
fi
|
||||
|
||||
if test $compiler = gcc; then
|
||||
XFAIL_TESTS="$XFAIL_TESTS
|
||||
"
|
||||
|
||||
if test $mes_cpu = x86; then
|
||||
XFAIL_TESTS="$XFAIL_TESTS
|
||||
"
|
||||
fi
|
||||
|
||||
if test $mes_cpu = x86_64; then
|
||||
XFAIL_TESTS="$XFAIL_TESTS
|
||||
lib/tests/stdio/70-printf-hello.c
|
||||
lib/tests/scaffold/70-extern.c
|
||||
lib/tests/stdio/80-sscanf.c
|
||||
lib/tests/mes/90-abtod.c
|
||||
lib/tests/posix/90-execlp.c
|
||||
lib/tests/string/90-snprintf.c
|
||||
"
|
||||
fi
|
||||
fi
|
||||
|
||||
recheck=${recheck-false}
|
||||
test_ext=.c
|
||||
log_compiler="${SHELL} ${srcdest}build-aux/test-c.sh"
|
||||
. ${srcdest}build-aux/test-suite.sh
|
||||
|
|
|
@ -1,161 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
# GNU Mes is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU Mes is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -e
|
||||
. ./config.status
|
||||
. ${srcdest}build-aux/config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
|
||||
tests="
|
||||
00_assignment
|
||||
01_comment
|
||||
02_printf
|
||||
03_struct
|
||||
04_for
|
||||
05_array
|
||||
06_case
|
||||
07_function
|
||||
08_while
|
||||
09_do_while
|
||||
|
||||
10_pointer
|
||||
11_precedence
|
||||
12_hashdefine
|
||||
13_integer_literals
|
||||
14_if
|
||||
15_recursion
|
||||
16_nesting
|
||||
17_enum
|
||||
18_include
|
||||
19_pointer_arithmetic
|
||||
|
||||
20_pointer_comparison
|
||||
21_char_array
|
||||
22_floating_point
|
||||
23_type_coercion
|
||||
24_math_library
|
||||
25_quicksort
|
||||
26_character_constants
|
||||
27_sizeof
|
||||
28_strings
|
||||
29_array_address
|
||||
|
||||
30_hanoi
|
||||
31_args
|
||||
32_led
|
||||
33_ternary_op
|
||||
34_array_assignment
|
||||
35_sizeof
|
||||
36_array_initialisers
|
||||
37_sprintf
|
||||
38_multiple_array_index
|
||||
39_typedef
|
||||
|
||||
40_stdio
|
||||
41_hashif
|
||||
42_function_pointer
|
||||
43_void_param
|
||||
44_scoped_declarations
|
||||
45_empty_for
|
||||
47_switch_return
|
||||
48_nested_break
|
||||
49_bracket_evaluation
|
||||
|
||||
50_logical_second_arg
|
||||
51_static
|
||||
52_unnamed_enum
|
||||
54_goto
|
||||
55_lshift_type
|
||||
"
|
||||
|
||||
broken="$broken
|
||||
18_include
|
||||
|
||||
22_floating_point
|
||||
23_type_coercion
|
||||
24_math_library
|
||||
26_character_constants
|
||||
27_sizeof
|
||||
28_strings
|
||||
|
||||
34_array_assignment
|
||||
39_typedef
|
||||
|
||||
40_stdio
|
||||
42_function_pointer
|
||||
49_bracket_evaluation
|
||||
55_lshift_type
|
||||
"
|
||||
|
||||
#22_floating_point ; float
|
||||
#23_type_coercion ; float
|
||||
#24_math_library ; float
|
||||
#27_sizeof ; float
|
||||
#28_strings ; TODO: strncpy strchr strrchr memset memcpy memcmp
|
||||
#30_hanoi ; fails with GCC
|
||||
#34_array_assignment ; fails with GCC
|
||||
#39_typedef ;unsupported: (decl (decl-spec-list (stor-spec (typedef)) (type-spec (typename "MyFunStruct"))) (init-declr-list (init-declr (ptr-declr (pointer) (ident "MoreFunThanEver")))))
|
||||
|
||||
#40_stdio ; f* functions
|
||||
#42_function_pointer ; f* functions
|
||||
#49_bracket_evaluation ; float
|
||||
|
||||
|
||||
LIBC=c+gnu
|
||||
MES_LIBS="-l c+gnu"
|
||||
|
||||
expect=$(echo $broken | wc -w)
|
||||
ARGS="arg1 arg2 arg3 arg4 arg5"
|
||||
export ARGS
|
||||
pass=0
|
||||
fail=0
|
||||
total=0
|
||||
mkdir -p scaffold/tinycc
|
||||
set +e
|
||||
for t in $tests; do
|
||||
if [ ! -f $TINYCC_PREFIX/tests/tests2/"$t.c" ]; then
|
||||
echo ' [SKIP]'
|
||||
continue;
|
||||
fi
|
||||
cp $TINYCC_PREFIX/tests/tests2/$i* scaffold/tinycc
|
||||
sh ${srcdest}build-aux/test.sh "scaffold/tinycc/$t" &> scaffold/tinycc/"$t".log
|
||||
r=$?
|
||||
total=$((total+1))
|
||||
if [ $r = 0 ]; then
|
||||
echo $t: [OK]
|
||||
pass=$((pass+1))
|
||||
else
|
||||
echo $t: [FAIL]
|
||||
fail=$((fail+1))
|
||||
fi
|
||||
done
|
||||
[ $expect != 0 ] && echo "expect: $expect"
|
||||
[ $fail != 0 ] && echo "failed: $fail"
|
||||
[ $fail -lt $expect ] && echo "solved: $(($expect - $fail))"
|
||||
echo "passed: $pass"
|
||||
echo "total: $total"
|
||||
if [ $fail != 0 -a $fail -gt $expect ]; then
|
||||
echo FAILED: $fail/$total
|
||||
exit 1
|
||||
elif [ $fail != 0 ]; then
|
||||
echo PASS: $pass/$total
|
||||
else
|
||||
echo PASS: $total
|
||||
fi
|
|
@ -20,13 +20,75 @@
|
|||
|
||||
set -e
|
||||
|
||||
. ./config.status
|
||||
. ${srcdest}build-aux/config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
. ./config.sh
|
||||
|
||||
./pre-inst-env bash ${srcdest}build-aux/check-boot.sh
|
||||
./pre-inst-env bash ${srcdest}build-aux/check-mes.sh
|
||||
./pre-inst-env bash ${srcdest}build-aux/check-mescc.sh
|
||||
if [ -d $TINYCC_PREFIX/tests/tests2 ] ;then
|
||||
./pre-inst-env bash ${srcdest}build-aux/check-tcc.sh
|
||||
if $courageous; then
|
||||
echo "Applying courage"
|
||||
set +e
|
||||
fi
|
||||
|
||||
CFLAGS=
|
||||
if test $mes_libc = mes; then
|
||||
CFLAGS="${CFLAGS}
|
||||
-static
|
||||
-nostdinc
|
||||
-nostdlib
|
||||
-fno-builtin
|
||||
"
|
||||
fi
|
||||
|
||||
CPPFLAGS="
|
||||
-D HAVE_CONFIG_H=1
|
||||
-I ../include
|
||||
-I ${srcdir}/include
|
||||
-I ${srcdir}/include/$mes_kernel/$mes_cpu
|
||||
"
|
||||
|
||||
LIBS=
|
||||
LDFLAGS=
|
||||
if test $mes_libc = mes; then
|
||||
LDFLAGS="
|
||||
-nostdlib
|
||||
"
|
||||
LIBS=-lc
|
||||
fi
|
||||
|
||||
export CFLAGS
|
||||
export CPPFLAGS
|
||||
export LDFLAGS
|
||||
#export LIBS
|
||||
|
||||
recheck=${recheck-false}
|
||||
export recheck
|
||||
|
||||
./pre-inst-env ${SHELL} ${srcdest}build-aux/check-boot.sh
|
||||
./pre-inst-env ${SHELL} ${srcdest}build-aux/check-mes.sh
|
||||
|
||||
if test $compiler = gcc; then
|
||||
(
|
||||
cd gcc-lib
|
||||
srcdest=$srcdir/../
|
||||
srcdir=../$srcdir
|
||||
../pre-inst-env ${SHELL} ${srcdest}build-aux/check-mescc.sh
|
||||
)
|
||||
fi
|
||||
|
||||
(
|
||||
cd mescc-lib
|
||||
srcdest=$srcdir/../
|
||||
srcdir=../$srcdir
|
||||
compiler=mescc
|
||||
mes_lib=mes
|
||||
CFLAGS="
|
||||
-nostdinc
|
||||
-nostdlib
|
||||
-fno-builtin
|
||||
"
|
||||
LDFLAGS="
|
||||
-nostdlib
|
||||
"
|
||||
LIBS=-lc
|
||||
AR="${srcdest}pre-inst-env mesar"
|
||||
CC="${srcdest}pre-inst-env mescc"
|
||||
../pre-inst-env ${SHELL} ${srcdest}build-aux/check-mescc.sh
|
||||
)
|
||||
|
|
|
@ -20,6 +20,7 @@ AR:=@AR@
|
|||
BASH:=@BASH@
|
||||
BLOOD_ELF:=@BLOOD_ELF@
|
||||
CC:=@CC@
|
||||
DIFF:=@DIFF@
|
||||
DOT:=@DOT@
|
||||
GIT:=@GIT@
|
||||
GUILD:=@GUILD@
|
||||
|
@ -28,18 +29,20 @@ GUILE_EFFECTIVE_VERSION:=@GUILE_EFFECTIVE_VERSION@
|
|||
GUIX:=@GUIX@
|
||||
HELP2MAN:=@HELP2MAN@
|
||||
HEX2:=@HEX2@
|
||||
#HEX2FLAGS:=@HEX2FLAGS@
|
||||
MAKEINFO:=@MAKEINFO@
|
||||
M1:=@M1@
|
||||
#M1FLAGS:=@M1FLAGS@
|
||||
MES:=@MES@
|
||||
MES_FOR_BUILD:=@MES_FOR_BUILD@
|
||||
MES_SEED:=@MES_SEED@
|
||||
NYACC:=@NYACC@
|
||||
PACKAGE:=@PACKAGE@
|
||||
PACKAGE_NAME:=@PACKAGE_NAME@
|
||||
PACKAGE_BUGREPORT:=@PACKAGE_BUGREPORT@
|
||||
PERL:=@PERL@
|
||||
TINYCC_PREFIX:=@TINYCC_PREFIX@
|
||||
SCHEME:=@SCHEME@
|
||||
SHELL:=@SHELL@
|
||||
VERSION:=@VERSION@
|
||||
V:=@V@
|
||||
colors:=@colors@
|
||||
|
||||
abs_top_builddir:=@abs_top_builddir@
|
||||
abs_top_srcdir:=@abs_top_srcdir@
|
||||
|
@ -47,11 +50,14 @@ arch:=@arch@
|
|||
build:=@build@
|
||||
host:=@host@
|
||||
|
||||
mes_arch:=@mes_arch@
|
||||
gcc_p:=@gcc_p@
|
||||
mes_p:=@mes_p@
|
||||
mesc_p:=@mesc_p@
|
||||
tcc_p:=@tcc_p@
|
||||
bootstrap:=
|
||||
compiler:=@compiler@
|
||||
courageous:=@courageous@
|
||||
mes_system:=@mes_system@
|
||||
mes_cpu:=@mes_cpu@
|
||||
mes_bits:=@mes_bits@
|
||||
mes_libc:=@mes_libc@
|
||||
mes_kernel:=@mes_kernel@
|
||||
|
||||
prefix:=@prefix@
|
||||
|
||||
|
@ -60,11 +66,12 @@ datadir:=@datadir@
|
|||
docdir:=@docdir@
|
||||
guile_site_ccache_dir:=@guile_site_ccache_dir@
|
||||
guile_site_dir:=@guile_site_dir@
|
||||
includedir:=@includedir@
|
||||
infodir:=@infodir@
|
||||
libdir:=@libdir@
|
||||
mandir:=@mandir@
|
||||
moduledir:=@moduledir@
|
||||
posix_p:=@posix_p@
|
||||
with_glibc_p:=@with_glibc_p@
|
||||
program_prefix:=@program_prefix@
|
||||
srcdest:=@srcdest@
|
||||
srcdir:=@srcdir@
|
||||
|
|
|
@ -1,158 +0,0 @@
|
|||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
# GNU Mes is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU Mes is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
srcdir=${srcdir-.}
|
||||
top_builddir=${top_builddir-.}
|
||||
|
||||
if [ "$V" = 2 ]; then
|
||||
echo $0
|
||||
echo srcdest=${srcdest}
|
||||
echo top_builddir=${top_builddir}
|
||||
fi
|
||||
|
||||
if [ -n "$mes_p" -a -n "$gcc_p" ]; then
|
||||
crt1=lib/linux/$mes_arch/crt1.o
|
||||
fi
|
||||
|
||||
MES=${MES-${program_prefix}mes}
|
||||
libc=${libc-"-l c"}
|
||||
export libc
|
||||
|
||||
if [ ! "$CC" ]; then
|
||||
CC="./pre-inst-env mescc"
|
||||
fi
|
||||
|
||||
export AR
|
||||
export CC
|
||||
export CFLAGS
|
||||
export CPPFLAGS
|
||||
export GUILD
|
||||
export GUILE
|
||||
export GUILE_LOAD_COMPILED_PATH
|
||||
export GUILE_LOAD_PATH
|
||||
export HEX2
|
||||
export HEX2FLAGS
|
||||
export M1
|
||||
export M1FLAGS
|
||||
export MES
|
||||
export MES_CFLAGS
|
||||
export MES_FOR_BUILD
|
||||
export MES_SEED
|
||||
export MESCC
|
||||
|
||||
export MES_DEBUG
|
||||
export MES_ARENA
|
||||
export TINYCC_PREFIX
|
||||
export V
|
||||
|
||||
export config_status
|
||||
export abs_top_builddir
|
||||
export abs_top_srcdir
|
||||
export arch
|
||||
export datadir
|
||||
export moduledir
|
||||
export prefix
|
||||
export program_prefix
|
||||
export srcdest
|
||||
export srcdir
|
||||
export top_builddir
|
||||
|
||||
export bits
|
||||
export build
|
||||
export host
|
||||
export compiler
|
||||
export gcc_p
|
||||
export mes_p
|
||||
export mesc_p
|
||||
export tcc_p
|
||||
export mes_arch
|
||||
export posix_p
|
||||
|
||||
CPPFLAGS=${CPPFLAGS-"
|
||||
-D 'VERSION=\"$VERSION\"'
|
||||
-D 'MODULEDIR=\"$moduledir\"'
|
||||
-D 'PREFIX=\"$prefix\"'
|
||||
-I ${srcdest}.
|
||||
-I ${srcdest}lib
|
||||
-I ${srcdest}include
|
||||
"}
|
||||
|
||||
[ "$posix_p" ] && CPPFLAGS="$CPPFLAGS -D POSIX=1 -D WITH_GLIBC=1"
|
||||
|
||||
LDFLAGS=${LDFLAGS-"
|
||||
-v
|
||||
-g
|
||||
-L lib/linux/$mes_arch
|
||||
-L lib/linux
|
||||
-L lib/$mes_arch
|
||||
-L lib
|
||||
"}
|
||||
|
||||
if [ -f "$MES_SEED/x86-mes/mes.S" ]; then
|
||||
LDFLAGS="$LDFLAGS
|
||||
-L $MES_SEED
|
||||
"
|
||||
fi
|
||||
|
||||
if [ -n "$gcc_p" ]; then
|
||||
CFLAGS=${CFLAGS-"
|
||||
-v
|
||||
--std=gnu99
|
||||
-O0
|
||||
-g
|
||||
"}
|
||||
fi
|
||||
|
||||
if [ "$mes_p" -a "$gcc_p" ]; then
|
||||
CFLAGS="$CFLAGS
|
||||
-fno-builtin
|
||||
-fno-stack-protector
|
||||
-nostdinc
|
||||
-nostdlib
|
||||
-Wno-discarded-qualifiers
|
||||
-Wno-int-to-pointer-cast
|
||||
-Wno-pointer-to-int-cast
|
||||
-Wno-pointer-sign
|
||||
-Wno-int-conversion
|
||||
-Wno-incompatible-pointer-types
|
||||
"
|
||||
fi
|
||||
|
||||
if [ "$arch" = "x86" ]; then
|
||||
HEX2FLAGS=${HEX2FLAGS-"
|
||||
--LittleEndian
|
||||
--Architecture 1
|
||||
--BaseAddress 0x1000000
|
||||
"}
|
||||
M1FLAGS=${M1FLAGS-"
|
||||
--LittleEndian
|
||||
--Architecture 1
|
||||
"}
|
||||
bits=32
|
||||
elif [ "$arch" = "x86_64" ]; then
|
||||
HEX2FLAGS=${HEX2FLAGS-"
|
||||
--LittleEndian
|
||||
--Architecture 2
|
||||
--BaseAddress 0x1000000
|
||||
"}
|
||||
M1FLAGS=${M1FLAGS-"
|
||||
--LittleEndian
|
||||
--Architecture 2
|
||||
"}
|
||||
bits=64
|
||||
fi
|
|
@ -16,11 +16,12 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
config_status=1
|
||||
AR="@AR@"
|
||||
config_sh=1
|
||||
AR=${AR-"@AR@"}
|
||||
BASH="@BASH@"
|
||||
BLOOD_ELF="@BLOOD_ELF@"
|
||||
CC="@CC@"
|
||||
CC=${CC-"@CC@"}
|
||||
DIFF=${DIFF-@DIFF@}
|
||||
DOT="@DOT@"
|
||||
GIT="@GIT@"
|
||||
GUILD="@GUILD@"
|
||||
|
@ -29,17 +30,21 @@ GUILE_EFFECTIVE_VERSION="@GUILE_EFFECTIVE_VERSION@"
|
|||
GUIX="@GUIX@"
|
||||
HELP2MAN="@HELP2MAN@"
|
||||
HEX2="@HEX2@"
|
||||
#HEX2FLAGS="@HEX2FLAGS@"
|
||||
MAKEINFO="@MAKEINFO@"
|
||||
M1="@M1@"
|
||||
#M1FLAGS="@M1FLAGS@"
|
||||
MES_FOR_BUILD="@MES_FOR_BUILD@"
|
||||
MES_SEED="@MES_SEED@"
|
||||
NYACC="@NYACC@"
|
||||
PACKAGE="@PACKAGE@"
|
||||
PACKAGE_NAME="@PACKAGE_NAME@"
|
||||
PACKAGE_BUGREPORT="@PACKAGE_BUGREPORT@"
|
||||
PERL="@PERL@"
|
||||
#SCHEME="@SCHEME@"
|
||||
SHELL="@SHELL@"
|
||||
TINYCC_PREFIX="@TINYCC_PREFIX@"
|
||||
VERSION="@VERSION@"
|
||||
V=${V-"@V@"}
|
||||
colors=${colors-@colors@}
|
||||
|
||||
abs_top_builddir="@abs_top_builddir@"
|
||||
abs_top_srcdir="@abs_top_srcdir@"
|
||||
|
@ -47,26 +52,46 @@ arch="@arch@"
|
|||
build="@build@"
|
||||
host="@host@"
|
||||
|
||||
mes_arch="@mes_arch@"
|
||||
gcc_p="@gcc_p@"
|
||||
mes_p="@mes_p@"
|
||||
mesc_p="@mesc_p@"
|
||||
tcc_p="@tcc_p@"
|
||||
bootstrap=${bootstrap-}
|
||||
compiler=${compiler-@compiler@}
|
||||
courageous=${courageous-@courageous@}
|
||||
mes_system=@mes_system@
|
||||
mes_cpu=@mes_cpu@
|
||||
mes_bits=@mes_bits@
|
||||
mes_libc=@mes_libc@
|
||||
mes_kernel=@mes_kernel@
|
||||
|
||||
prefix="@prefix@"
|
||||
|
||||
bindir="@bindir@"
|
||||
datadir="@datadir@"
|
||||
pkgdatadir="@pkgdatadir@"
|
||||
docdir="@docdir@"
|
||||
guile_site_ccache_dir="@guile_site_ccache_dir@"
|
||||
guile_site_dir="@guile_site_dir@"
|
||||
includedir="@includedir@"
|
||||
infodir="@infodir@"
|
||||
libdir="@libdir@"
|
||||
mandir="@mandir@"
|
||||
moduledir="@moduledir@"
|
||||
posix_p="@posix_p@"
|
||||
with_glibc_p="@with_glibc_p@"
|
||||
program_prefix="@program_prefix@"
|
||||
srcdest="@srcdest@"
|
||||
srcdir="@srcdir@"
|
||||
srcdest=${srcdest-"@srcdest@"}
|
||||
srcdir=${srcdir-"@srcdir@"}
|
||||
sysconfdir="@sysconfdir@"
|
||||
top_builddir="@top_builddir@"
|
||||
|
||||
export PACKAGE
|
||||
export PACKAGE_NAME
|
||||
export PACKAGE_BUGREPORT
|
||||
export AR
|
||||
export CC
|
||||
export DIFF
|
||||
export SHELL
|
||||
export V
|
||||
export colors
|
||||
export compiler
|
||||
export courageous
|
||||
export srcdest
|
||||
export srcdir
|
||||
export GUILE_AUTO_COMPILE
|
|
@ -0,0 +1,329 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
# GNU Mes is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU Mes is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -e
|
||||
set -u
|
||||
|
||||
V=${V-1}
|
||||
|
||||
if [ "$V" = 2 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
. ./config.sh
|
||||
|
||||
libc_mini_shared_SOURCES="
|
||||
lib/mes/eputs.c
|
||||
lib/mes/oputs.c
|
||||
"
|
||||
|
||||
if test $mes_libc = mes; then
|
||||
libc_mini_shared_SOURCES="$libc_mini_shared_SOURCES
|
||||
lib/$mes_kernel/$mes_cpu-mes-$compiler/mini.c
|
||||
lib/stdlib/exit.c
|
||||
lib/stdlib/puts.c
|
||||
lib/string/strlen.c
|
||||
"
|
||||
fi
|
||||
|
||||
libc_mini_SOURCES="$libc_mini_shared_SOURCES"
|
||||
|
||||
if test $mes_libc = mes; then
|
||||
libc_mini_SOURCES="$libc_mini_SOURCES
|
||||
lib/mes/write.c
|
||||
"
|
||||
fi
|
||||
|
||||
libmes_SOURCES="
|
||||
$libc_mini_shared_SOURCES
|
||||
lib/ctype/isnumber.c
|
||||
lib/mes/abtol.c
|
||||
lib/mes/div.c
|
||||
lib/mes/eputc.c
|
||||
lib/mes/fdgetc.c
|
||||
lib/mes/fdputc.c
|
||||
lib/mes/fdputs.c
|
||||
lib/mes/fdungetc.c
|
||||
lib/mes/itoa.c
|
||||
lib/mes/ltoa.c
|
||||
lib/mes/ltoab.c
|
||||
lib/mes/mes_open.c
|
||||
lib/mes/ntoab.c
|
||||
lib/mes/oputc.c
|
||||
lib/mes/ultoa.c
|
||||
lib/mes/utoa.c
|
||||
"
|
||||
|
||||
if test $mes_libc = mes; then
|
||||
libmes_SOURCES="$libmes_SOURCES
|
||||
lib/ctype/isdigit.c
|
||||
lib/ctype/isspace.c
|
||||
lib/ctype/isxdigit.c
|
||||
lib/posix/write.c
|
||||
lib/stdlib/atoi.c
|
||||
"
|
||||
if test $mes_kernel = linux; then
|
||||
libmes_SOURCES="$libmes_SOURCES
|
||||
lib/linux/lseek.c
|
||||
"
|
||||
fi
|
||||
else
|
||||
libmes_SOURCES="$libmes_SOURCES
|
||||
"
|
||||
fi
|
||||
|
||||
libc_SOURCES="
|
||||
$libmes_SOURCES
|
||||
lib/mes/__assert_fail.c
|
||||
lib/mes/__buffered_read.c
|
||||
lib/mes/__mes_debug.c
|
||||
lib/posix/execv.c
|
||||
lib/posix/getcwd.c
|
||||
lib/posix/getenv.c
|
||||
lib/posix/isatty.c
|
||||
lib/posix/open.c
|
||||
lib/posix/read.c
|
||||
lib/posix/setenv.c
|
||||
lib/posix/wait.c
|
||||
lib/stdio/fgetc.c
|
||||
lib/stdio/fputc.c
|
||||
lib/stdio/fputs.c
|
||||
lib/stdio/getc.c
|
||||
lib/stdio/getchar.c
|
||||
lib/stdio/putc.c
|
||||
lib/stdio/putchar.c
|
||||
lib/stdio/ungetc.c
|
||||
lib/stdlib/free.c
|
||||
lib/stdlib/malloc.c
|
||||
lib/stdlib/realloc.c
|
||||
lib/string/memchr.c
|
||||
lib/string/memcmp.c
|
||||
lib/string/memcpy.c
|
||||
lib/string/memmove.c
|
||||
lib/string/memset.c
|
||||
lib/string/strcmp.c
|
||||
lib/string/strcpy.c
|
||||
lib/string/strncmp.c
|
||||
"
|
||||
|
||||
if test $mes_kernel = linux; then
|
||||
libc_SOURCES="$libc_SOURCES
|
||||
lib/linux/access.c
|
||||
lib/linux/brk.c
|
||||
lib/linux/chmod.c
|
||||
lib/linux/clock_gettime.c
|
||||
lib/linux/dup.c
|
||||
lib/linux/dup2.c
|
||||
lib/linux/execve.c
|
||||
lib/linux/fork.c
|
||||
lib/linux/fsync.c
|
||||
lib/linux/_getcwd.c
|
||||
lib/linux/gettimeofday.c
|
||||
lib/linux/ioctl.c
|
||||
lib/linux/_open3.c
|
||||
lib/linux/_read.c
|
||||
lib/linux/time.c
|
||||
lib/linux/unlink.c
|
||||
lib/linux/waitpid.c
|
||||
lib/linux/$mes_cpu-mes-$compiler/syscall.c
|
||||
"
|
||||
fi
|
||||
|
||||
libtcc1_SOURCES="
|
||||
lib/libtcc1.c
|
||||
"
|
||||
|
||||
libc_tcc_SOURCES="
|
||||
$libc_SOURCES
|
||||
lib/ctype/islower.c
|
||||
lib/ctype/isupper.c
|
||||
lib/ctype/tolower.c
|
||||
lib/ctype/toupper.c
|
||||
lib/mes/search-path.c
|
||||
lib/posix/execvp.c
|
||||
lib/stdio/fclose.c
|
||||
lib/stdio/fdopen.c
|
||||
lib/stdio/ferror.c
|
||||
lib/stdio/fflush.c
|
||||
lib/stdio/fopen.c
|
||||
lib/stdio/fprintf.c
|
||||
lib/stdio/fread.c
|
||||
lib/stdio/fseek.c
|
||||
lib/stdio/ftell.c
|
||||
lib/stdio/fwrite.c
|
||||
lib/stdio/printf.c
|
||||
lib/stdio/remove.c
|
||||
lib/stdio/snprintf.c
|
||||
lib/stdio/sprintf.c
|
||||
lib/stdio/sscanf.c
|
||||
lib/stdio/vfprintf.c
|
||||
lib/stdio/vprintf.c
|
||||
lib/stdio/vsnprintf.c
|
||||
lib/stdio/vsprintf.c
|
||||
lib/stdio/vsscanf.c
|
||||
lib/stdlib/calloc.c
|
||||
lib/stdlib/qsort.c
|
||||
lib/stdlib/strtof.c
|
||||
lib/stdlib/strtol.c
|
||||
lib/stdlib/strtold.c
|
||||
lib/stdlib/strtoll.c
|
||||
lib/stdlib/strtoul.c
|
||||
lib/stdlib/strtoull.c
|
||||
lib/string/memmem.c
|
||||
lib/string/strcat.c
|
||||
lib/string/strchr.c
|
||||
lib/string/strlwr.c
|
||||
lib/string/strncpy.c
|
||||
lib/string/strrchr.c
|
||||
lib/string/strstr.c
|
||||
lib/string/strupr.c
|
||||
lib/stub/sigaction.c
|
||||
lib/stub/ldexp.c
|
||||
lib/stub/mprotect.c
|
||||
lib/stub/localtime.c
|
||||
lib/stub/sigemptyset.c
|
||||
lib/stub/strtod.c
|
||||
lib/$mes_cpu-mes-$compiler/setjmp.c
|
||||
"
|
||||
|
||||
if test $mes_kernel = linux; then
|
||||
libc_tcc_SOURCES="$libc_tcc_SOURCES
|
||||
lib/linux/close.c
|
||||
lib/linux/rmdir.c
|
||||
lib/linux/stat.c
|
||||
"
|
||||
fi
|
||||
|
||||
libc_gnu_SOURCES="
|
||||
$libc_tcc_SOURCES
|
||||
lib/ctype/isalnum.c
|
||||
lib/ctype/isalpha.c
|
||||
lib/ctype/isascii.c
|
||||
lib/ctype/iscntrl.c
|
||||
lib/ctype/isprint.c
|
||||
lib/ctype/ispunct.c
|
||||
lib/dirent/__getdirentries.c
|
||||
lib/dirent/closedir.c
|
||||
lib/dirent/opendir.c
|
||||
lib/dirent/readdir.c
|
||||
lib/math/fabs.c
|
||||
lib/mes/fdgets.c
|
||||
lib/posix/alarm.c
|
||||
lib/posix/execl.c
|
||||
lib/posix/mktemp.c
|
||||
lib/posix/raise.c
|
||||
lib/posix/sbrk.c
|
||||
lib/posix/sleep.c
|
||||
lib/posix/unsetenv.c
|
||||
lib/stdio/clearerr.c
|
||||
lib/stdio/feof.c
|
||||
lib/stdio/fgets.c
|
||||
lib/stdio/fileno.c
|
||||
lib/stdio/freopen.c
|
||||
lib/stdio/perror.c
|
||||
lib/stdlib/__exit.c
|
||||
lib/stdlib/abort.c
|
||||
lib/stdlib/abs.c
|
||||
lib/stdlib/alloca.c
|
||||
lib/stdlib/atexit.c
|
||||
lib/stdlib/atol.c
|
||||
lib/stdlib/mbstowcs.c
|
||||
lib/string/bcmp.c
|
||||
lib/string/bcopy.c
|
||||
lib/string/bzero.c
|
||||
lib/string/index.c
|
||||
lib/string/rindex.c
|
||||
lib/string/strcspn.c
|
||||
lib/string/strdup.c
|
||||
lib/string/strerror.c
|
||||
lib/string/strncat.c
|
||||
lib/string/strpbrk.c
|
||||
lib/string/strspn.c
|
||||
lib/stub/__cleanup.c
|
||||
lib/stub/bsearch.c
|
||||
lib/stub/chown.c
|
||||
lib/stub/ctime.c
|
||||
lib/stub/fpurge.c
|
||||
lib/stub/freadahead.c
|
||||
lib/stub/frexp.c
|
||||
lib/stub/getlogin.c
|
||||
lib/stub/getpwnam.c
|
||||
lib/stub/getpwuid.c
|
||||
lib/stub/gmtime.c
|
||||
lib/stub/pclose.c
|
||||
lib/stub/popen.c
|
||||
lib/stub/rand.c
|
||||
lib/stub/setbuf.c
|
||||
lib/stub/setlocale.c
|
||||
lib/stub/setvbuf.c
|
||||
lib/stub/sigaddset.c
|
||||
lib/stub/sigblock.c
|
||||
lib/stub/sigdelset.c
|
||||
lib/stub/sigsetmask.c
|
||||
lib/stub/strftime.c
|
||||
lib/stub/sys_siglist.c
|
||||
lib/stub/system.c
|
||||
lib/stub/times.c
|
||||
lib/stub/ttyname.c
|
||||
lib/stub/umask.c
|
||||
lib/stub/utime.c
|
||||
"
|
||||
|
||||
if test $mes_kernel = linux; then
|
||||
libc_gnu_SOURCES="$libc_gnu_SOURCES
|
||||
lib/linux/chdir.c
|
||||
lib/linux/fcntl.c
|
||||
lib/linux/fstat.c
|
||||
lib/linux/getdents.c
|
||||
lib/linux/getegid.c
|
||||
lib/linux/geteuid.c
|
||||
lib/linux/getgid.c
|
||||
lib/linux/getpid.c
|
||||
lib/linux/getppid.c
|
||||
lib/linux/getrusage.c
|
||||
lib/linux/getuid.c
|
||||
lib/linux/kill.c
|
||||
lib/linux/link.c
|
||||
lib/linux/lstat.c
|
||||
lib/linux/mkdir.c
|
||||
lib/linux/nanosleep.c
|
||||
lib/linux/pipe.c
|
||||
lib/linux/rename.c
|
||||
lib/linux/setgid.c
|
||||
lib/linux/settimer.c
|
||||
lib/linux/setuid.c
|
||||
lib/linux/signal.c
|
||||
lib/linux/sigprogmask.c
|
||||
"
|
||||
fi
|
||||
|
||||
mes_SOURCES="
|
||||
src/gc.c
|
||||
src/hash.c
|
||||
src/lib.c
|
||||
src/math.c
|
||||
src/mes.c
|
||||
src/module.c
|
||||
src/posix.c
|
||||
src/reader.c
|
||||
src/string.c
|
||||
src/struct.c
|
||||
src/vector.c
|
||||
"
|
|
@ -17,6 +17,8 @@
|
|||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
export PACKAGE
|
||||
export PACKAGE_NAME
|
||||
export PACKAGE_BUGREPORT
|
||||
export VERSION
|
||||
|
||||
export abs_top_builddir
|
||||
|
@ -40,6 +42,15 @@ export mandir
|
|||
export moduledir
|
||||
export sysconfdir
|
||||
|
||||
export bootstrap
|
||||
export compiler
|
||||
export courageous
|
||||
export mes_system
|
||||
export mes_cpu
|
||||
export mes_bits
|
||||
export mes_libc
|
||||
export mes_kernel
|
||||
|
||||
ifdef V
|
||||
export V
|
||||
endif
|
||||
|
@ -48,18 +59,10 @@ ifdef DESTDIR
|
|||
export DESTDIR
|
||||
endif
|
||||
|
||||
ifdef arch
|
||||
export arch
|
||||
endif
|
||||
|
||||
ifdef CC
|
||||
export CC
|
||||
endif
|
||||
|
||||
ifdef CC64
|
||||
export CC64
|
||||
endif
|
||||
|
||||
ifdef BLOOD_ELF
|
||||
export BLOOD_ELF
|
||||
endif
|
||||
|
@ -112,8 +115,12 @@ ifdef PERL
|
|||
export PERL
|
||||
endif
|
||||
|
||||
ifdef TCC
|
||||
export TCC
|
||||
ifdef SCHEME
|
||||
export SCHEME
|
||||
endif
|
||||
|
||||
ifdef SHELL
|
||||
export SHELL
|
||||
endif
|
||||
|
||||
ifdef GUILE_LOAD_PATH
|
||||
|
@ -139,7 +146,3 @@ endif
|
|||
ifdef M1FLAGS
|
||||
export M1FLAGS
|
||||
endif
|
||||
|
||||
ifdef TINYCC_PREFIX
|
||||
export TINYCC_PREFIX
|
||||
endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -18,20 +18,4 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -e
|
||||
. ./config.status
|
||||
. ${srcdest}build-aux/config.sh
|
||||
|
||||
sh ${srcdest}build-aux/test-cc.sh $1
|
||||
|
||||
if [ ! "$mesc_p" ]; then
|
||||
#FIXME: c&p
|
||||
unset CFLAGS CPPFLAGS LDFLAGS gcc_p tcc_p posix_p
|
||||
MES=${MES-guile}
|
||||
mesc_p=1
|
||||
mes_p=1
|
||||
mes_arch=x86-mes
|
||||
program_prefix=$mes_arch-
|
||||
CC="./pre-inst-env mescc"
|
||||
sh ${srcdest}build-aux/test-cc.sh $1
|
||||
fi
|
||||
for i in $(find . -name '*.c' -o -name '*.h' -o -name '*.i'); do indent $i --no-tabs --line-length 110 --honour-newlines; done
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
#! @SHELL@
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -20,34 +20,44 @@
|
|||
|
||||
set -e
|
||||
|
||||
. ./config.status
|
||||
. ./config.sh
|
||||
|
||||
mes_prefix=@prefix@/share/mes
|
||||
v=
|
||||
_v=
|
||||
if test "$V" = 2; then
|
||||
set -x
|
||||
fi
|
||||
if test "$V" -gt 0; then
|
||||
v=v
|
||||
_v=-v
|
||||
fi
|
||||
|
||||
# use bash or lose if pipes fail
|
||||
if [ "$(basename $SHELL)" == bash ]; then
|
||||
set -u
|
||||
|
||||
# Use bash or lose if pipes fail
|
||||
if test -n "$BASHOPTS"; then
|
||||
set -o pipefail
|
||||
fi
|
||||
|
||||
mkdir -p $DESTDIR@bindir@
|
||||
if [ -f src/x86-mes-mes ]; then
|
||||
cp src/x86-mes-mes $DESTDIR@bindir@/mes
|
||||
fi
|
||||
cp scripts/mescc.scm $DESTDIR@bindir@/mescc.scm
|
||||
cp scripts/mescc $DESTDIR@bindir@/mescc
|
||||
DESTDIR=${DESTDIR-}
|
||||
mkdir -p ${DESTDIR}${bindir}
|
||||
cp $_v src/mes ${DESTDIR}${bindir}/mes
|
||||
cp $_v scripts/mesar ${DESTDIR}${bindir}/mesar
|
||||
cp $_v scripts/mescc.scm ${DESTDIR}${bindir}/mescc.scm
|
||||
cp $_v scripts/mescc ${DESTDIR}${bindir}/mescc
|
||||
|
||||
sed \
|
||||
-e "s,^#! /bin/sh,#! @SHELL@," \
|
||||
scripts/diff.scm > $DESTDIR@bindir@/diff.scm
|
||||
chmod -w+x $DESTDIR@bindir@/diff.scm
|
||||
-e "s,^#! /bin/sh,#! ${SHELL}," \
|
||||
scripts/diff.scm > ${DESTDIR}${bindir}/diff.scm
|
||||
chmod +x ${DESTDIR}${bindir}/diff.scm
|
||||
|
||||
mkdir -p $DESTDIR@docdir@
|
||||
mkdir -p ${DESTDIR}${docdir}
|
||||
|
||||
if [ -n "@PERL@" ]\
|
||||
&& [ -n "@GIT@" ]\
|
||||
&& @PERL@ -v > /dev/null\
|
||||
&& @GIT@ status > /dev/null; then
|
||||
@PERL@ ${srcdest}build-aux/gitlog-to-changelog --srcdir=. > ChangeLog
|
||||
if test -n "${PERL}"\
|
||||
&& test -n "${GIT}"\
|
||||
&& ${PERL} -v > /dev/null\
|
||||
&& ! test -f .git-for-build; then
|
||||
${PERL} ${srcdest}build-aux/gitlog-to-changelog --srcdir=. > ChangeLog+
|
||||
fi
|
||||
|
||||
cp\
|
||||
|
@ -58,57 +68,50 @@ cp\
|
|||
INSTALL\
|
||||
NEWS\
|
||||
README\
|
||||
$DESTDIR@docdir@
|
||||
${DESTDIR}${docdir}
|
||||
|
||||
if [ -f ChangeLog ]; then
|
||||
cp ChangeLog $DESTDIR@docdir@
|
||||
if test -f ChangeLog+; then
|
||||
cp $_v ChangeLog+ ${DESTDIR}${docdir}/ChangeLog
|
||||
rm -f ChangeLog+
|
||||
else
|
||||
cp ChangeLog $DESTDIR@docdir@
|
||||
cp $_v ChangeLog ${DESTDIR}${docdir}
|
||||
fi
|
||||
|
||||
if [ -f ChangeLog ]; then
|
||||
cp ChangeLog @docdir@
|
||||
mkdir -p $DESTDIR$libdir
|
||||
mkdir -p $DESTDIR$pkgdatadir
|
||||
# rm -f $(find lib -type f -a -executable)
|
||||
# rm -f $(find scaffold -type f -a -executable)
|
||||
tar -cf- -C ${srcdir} include lib/$mes_cpu-mes | tar -${v}xf- -C $DESTDIR$prefix
|
||||
if test -z "$srcdest"; then
|
||||
tar -cf- --exclude='*.go' module | tar -${v}xf- -C $DESTDIR$pkgdatadir
|
||||
else
|
||||
cp ChangeLog @docdir@
|
||||
tar -cf- -C ${srcdest} module | tar -${v}xf- -C $DESTDIR$pkgdatadir
|
||||
fi
|
||||
tar -cf- -C ${srcdest}mes module | tar -${v}xf- -C $DESTDIR$pkgdatadir
|
||||
if test -d gcc-lib/$mes_cpu-mes; then
|
||||
tar -cf- -C gcc-lib/$mes_cpu-mes . | tar -${v}xf- -C $DESTDIR$libdir
|
||||
fi
|
||||
if test -d mescc-lib/$mes_cpu-mes; then
|
||||
tar -cf- -C mescc-lib $mes_cpu-mes | tar -${v}xf- -C $DESTDIR$libdir
|
||||
fi
|
||||
|
||||
mkdir -p $DESTDIR$mes_prefix
|
||||
if [ -z "$srcdest" ]; then
|
||||
tar -cf- --exclude='*.E' --exclude='*.*-out' include lib | tar -xf- -C $DESTDIR$mes_prefix
|
||||
tar -cf- --exclude='*.go' module | tar -xf- -C $DESTDIR$mes_prefix
|
||||
tar -cf- --exclude='*.gcc*' --exclude='*.mes*' scaffold | tar -xf- -C $DESTDIR$mes_prefix
|
||||
else
|
||||
tar -cf- -C ${srcdest} include lib | tar -xf- -C $DESTDIR$mes_prefix
|
||||
tar -cf- -C lib --exclude='*.E' --exclude='*.*-out' | tar -xf- -C $DESTDIR$mes_prefix
|
||||
tar -cf- -C ${srcdest} module | tar -xf- -C $DESTDIR$mes_prefix
|
||||
tar -cf- -C ${srcdest} scaffold | tar -xf- -C $DESTDIR$mes_prefix
|
||||
fi
|
||||
tar -cf- -C ${srcdest}mes module | tar -xf- -C $DESTDIR$mes_prefix
|
||||
mkdir -p ${DESTDIR}${guile_site_dir}
|
||||
mkdir -p ${DESTDIR}${guile_site_ccache_dir}
|
||||
tar -cf- -C ${srcdest}module --exclude='*.go' . | tar -${v}xf- -C ${DESTDIR}${guile_site_dir}
|
||||
tar -cf- -C module --exclude='*.scm' . | tar -${v}xf- -C ${DESTDIR}${guile_site_ccache_dir}
|
||||
|
||||
if [ -f src/mes.x86-mes-S ]; then
|
||||
cp src/mes.x86-mes-S $DESTDIR$mes_prefix/lib/x86-mes/mes.S
|
||||
fi
|
||||
if [ -f src/mes.x86_64-mes-S ]; then
|
||||
cp src/mes.x86_64-mes-S $DESTDIR$mes_prefix/lib/x86_64-mes/mes.S
|
||||
if test -f doc/mes.info; then
|
||||
mkdir -p ${DESTDIR}${infodir}
|
||||
tar -cf- doc/mes.info* doc/images | tar -${v}xf- --strip-components=1 -C ${DESTDIR}${infodir}
|
||||
install-info --info-dir=${DESTDIR}${infodir} doc/mes.info
|
||||
fi
|
||||
|
||||
mkdir -p $DESTDIR@guile_site_dir@
|
||||
mkdir -p $DESTDIR@guile_site_ccache_dir@
|
||||
tar -cf- -C ${srcdest}module --exclude='*.go' . | tar -xf- -C $DESTDIR@guile_site_dir@
|
||||
tar -cf- -C module --exclude='*.scm' . | tar -xf- -C $DESTDIR@guile_site_ccache_dir@
|
||||
|
||||
if [ -f doc/mes.info ]; then
|
||||
mkdir -p $DESTDIR@infodir@
|
||||
tar -cf- doc/mes.info* doc/images | tar -xf- --strip-components=1 -C $DESTDIR@infodir@
|
||||
install-info --info-dir=$DESTDIR@infodir@ doc/mes.info
|
||||
if test -f doc/mes.1; then
|
||||
mkdir -p ${DESTDIR}${mandir}/man1
|
||||
cp $_v doc/mes.1 ${DESTDIR}${mandir}/man1/
|
||||
fi
|
||||
|
||||
if [ -f doc/mes.1 ]; then
|
||||
mkdir -p $DESTDIR@mandir@/man1
|
||||
cp doc/mes.1 $DESTDIR@mandir@/man1/
|
||||
fi
|
||||
|
||||
if [ -f doc/mescc.1 ]; then
|
||||
mkdir -p $DESTDIR@mandir@/man1
|
||||
cp doc/mescc.1 $DESTDIR@mandir@/man1/
|
||||
if test -f doc/mescc.1; then
|
||||
mkdir -p ${DESTDIR}${mandir}/man1
|
||||
cp $_v doc/mescc.1 ${DESTDIR}${mandir}/man1/
|
||||
fi
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
|
||||
;;; This file is part of GNU Mes.
|
||||
;;;
|
||||
|
@ -17,6 +17,7 @@
|
|||
;;; along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(use-modules (guix packages))
|
||||
(set! %load-path (cons "guix" %load-path))
|
||||
(include "../.guix.scm")
|
||||
(define %source-dir (dirname (dirname (current-filename))))
|
||||
(add-to-load-path (string-append %source-dir "/guix"))
|
||||
(use-modules (git mes))
|
||||
(packages->manifest (map cadr (package-direct-inputs mes)))
|
||||
|
|
|
@ -101,50 +101,23 @@ exec ${GUILE-guile} --no-auto-compile -L $(dirname $0) -C $(dirname $0) -e '(mes
|
|||
|
||||
(define %start 1)
|
||||
(define (symbol->header s i)
|
||||
(format #f "#define cell_~a ~a\n" s i))
|
||||
|
||||
(define (symbol->source s i)
|
||||
(string-append
|
||||
(format #f "g_free++;\n")
|
||||
(format #f "g_cells[cell_~a] = scm_~a;\n\n" s s)))
|
||||
|
||||
(define (symbol->names s i)
|
||||
(if %gcc?
|
||||
(format #f "NAME_SYMBOL (cell_~a, scm_~a.name);\n" s s)
|
||||
(format #f "NAME_SYMBOL (cell_~a, scm_~a.cdr);\n" s s)))
|
||||
(format #f "// CONSTANT ~a ~a\n" s i)
|
||||
(format #f "#define ~a ~a\n" s i)))
|
||||
|
||||
(define (function->header f i)
|
||||
(let* ((arity (or (assoc-ref (function.annotation f) 'arity)
|
||||
(if (string-null? (function.formals f)) 0
|
||||
(length (string-split (function.formals f) #\,)))))
|
||||
(n (if (eq? arity 'n) -1 arity)))
|
||||
(string-append
|
||||
(format #f "SCM ~a (~a);\n" (function.name f) (function.formals f))
|
||||
(if %gcc?
|
||||
(format #f "struct function fun_~a = {.function~a=&~a, .arity=~a, .name=~s};\n" (function.name f) arity (function.name f) n (function-scm-name f))
|
||||
(format #f "struct function fun_~a = {&~a, ~a, ~s};\n" (function.name f) (function.name f) n (function-scm-name f)))
|
||||
(if %gcc?
|
||||
(format #f "struct scm ~a = {TFUNCTION, .name=0, .function=0};\n" (function-builtin-name f))
|
||||
(format #f "struct scm ~a = {TFUNCTION, 0, 0};\n" (function-builtin-name f)))
|
||||
(format #f "SCM cell_~a;\n\n" (function.name f)))))
|
||||
(format #f "SCM ~a (~a);\n" (function.name f) (function.formals f))))
|
||||
|
||||
(define (function->source f i)
|
||||
(string-append
|
||||
(if %gcc?
|
||||
(format #f "~a.function = g_function;\n" (function-builtin-name f))
|
||||
(format #f "~a.car = g_function;\n" (function-builtin-name f)))
|
||||
(format #f "g_functions[g_function++] = fun_~a;\n" (function.name f))
|
||||
(format #f "cell_~a = g_free++;\n" (function.name f))
|
||||
(format #f "g_cells[cell_~a] = ~a;\n\n" (function.name f) (function-builtin-name f))))
|
||||
|
||||
(define (function->environment f i)
|
||||
(string-append
|
||||
(if %gcc?
|
||||
(format #f "scm_~a.string = MAKE_BYTES0 (fun_~a.name);\n" (function.name f) (function.name f))
|
||||
(format #f "scm_~a.cdr = MAKE_BYTES0 (fun_~a.name);\n" (function.name f) (function.name f)))
|
||||
(if %gcc?
|
||||
(format #f "a = acons (cstring_to_symbol (CSTRING_STRUCT (scm_~a)), ~a, a);\n\n" (function.name f) (function-cell-name f))
|
||||
(format #f "a = acons (cstring_to_symbol (CSTRING_STRUCT (scm_~a)), ~a, a);\n\n" (function.name f) (function-cell-name f)))))
|
||||
(let* ((arity (or (assoc-ref (function.annotation f) 'arity)
|
||||
(if (string-null? (function.formals f)) 0
|
||||
(length (string-split (function.formals f) #\,)))))
|
||||
(n (if (eq? arity 'n) -1 arity)))
|
||||
(format #f " a = init_builtin (builtin_type, ~s, ~a, &~a, a);\n" (function.name f) n (function.name f))))
|
||||
|
||||
(define (disjoin . predicates)
|
||||
(lambda (. arguments)
|
||||
|
@ -152,12 +125,11 @@ exec ${GUILE-guile} --no-auto-compile -L $(dirname $0) -C $(dirname $0) -e '(mes
|
|||
|
||||
(define (snarf-symbols string)
|
||||
(let* ((lines (string-split string #\newline))
|
||||
(scm (filter (cut string-prefix? "struct scm scm_" <>) lines))
|
||||
(symbols (filter (disjoin (cut string-contains <> "TSPECIAL") (cut string-contains <> "TSYMBOL")) scm)))
|
||||
(symbols (filter (cut string-prefix? " init_symbol (" <>) lines)))
|
||||
(define (line->symbol line)
|
||||
((compose
|
||||
(lambda (s) (string-take s (string-index s #\space)))
|
||||
(cut string-drop <> (string-length "struct scm scm_")))
|
||||
(lambda (s) (string-take s (string-index s #\,)))
|
||||
(cut string-drop <> (string-length " init_symbol (")))
|
||||
line))
|
||||
(map line->symbol symbols)))
|
||||
|
||||
|
@ -218,27 +190,16 @@ exec ${GUILE-guile} --no-auto-compile -L $(dirname $0) -C $(dirname $0) -e '(mes
|
|||
(source (make-file
|
||||
(string-append base-name ".i")
|
||||
(string-join (map function->source (filter (negate no-environment?) functions) (iota (length functions) (+ (length symbols) %start))) "")))
|
||||
(environment (make-file
|
||||
(string-append base-name ".environment.i")
|
||||
(string-join (map function->environment (filter (negate no-environment?) functions) (iota (length functions) (+ (length symbols) %start))) "")))
|
||||
(symbols.h (make-file
|
||||
(string-append base-name ".symbols.h")
|
||||
(string-join (map symbol->header symbols (iota (length symbols) %start)) "")))
|
||||
(symbols.i (make-file
|
||||
(string-append base-name ".symbols.i")
|
||||
(string-join (map symbol->source symbols (iota (length symbols))) "")))
|
||||
(symbol-names.i (make-file
|
||||
(string-append base-name ".symbol-names.i")
|
||||
(string-join (map symbol->names symbols (iota (length symbols))) ""))))
|
||||
(list header source environment symbols.h symbols.i symbol-names.i)))
|
||||
(string-join (map symbol->header symbols (iota (length symbols) %start)) ""))))
|
||||
(list header source symbols.h)))
|
||||
|
||||
(define (file-write file)
|
||||
(system* "mkdir" "-p" (dirname (file.name file)))
|
||||
(with-output-to-file (file.name file) (lambda () (display (file.content file)))))
|
||||
|
||||
(define (main args)
|
||||
(let* ((files (if (not (and (pair? (cdr args)) (equal? (cadr args) "--mes"))) (cdr args)
|
||||
(begin (set! %gcc? #f)
|
||||
(cddr args))))
|
||||
(let* ((files (cdr args))
|
||||
(files (append-map generate-includes files)))
|
||||
(map file-write (filter content? files))))
|
||||
(for-each file-write (filter content? files))))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! @BASH@
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -18,13 +18,15 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
srcdir="@srcdir@"
|
||||
abs_top_srcdir="@abs_top_srcdir@"
|
||||
export abs_top_srcdir
|
||||
abs_top_builddir="@abs_top_builddir@"
|
||||
export abs_top_builddir
|
||||
prefix=${prefix-@prefix@}
|
||||
export prefix
|
||||
program_prefix=${program_prefix-@program_prefix@}
|
||||
|
||||
MES_PREFIX=${MES_PREFIX-${srcdest}mes}
|
||||
MES_PREFIX=${MES_PREFIX-${abs_top_srcdir}}
|
||||
export MES_PREFIX
|
||||
|
||||
GUILE_LOAD_COMPILED_PATH="$abs_top_builddir/scripts:$abs_top_builddir/module${GUILE_LOAD_COMPILED_PATH:+:}$GUILE_LOAD_COMPILED_PATH"
|
||||
|
@ -34,12 +36,15 @@ if [ -n "$srcdest" ]; then
|
|||
fi
|
||||
export GUILE_LOAD_COMPILED_PATH GUILE_LOAD_PATH
|
||||
|
||||
PATH="$abs_top_builddir/scripts:$abs_top_builddir/src:$abs_top_builddir/build-aux:$PATH"
|
||||
PATH="$abs_top_builddir/scripts:$abs_top_builddir/scripts:$abs_top_builddir/src:$abs_top_builddir/build-aux:$PATH"
|
||||
export PATH
|
||||
|
||||
MES=${MES-${abs_top_builddir}/src/${program_prefix}mes}
|
||||
export MES
|
||||
|
||||
bindir=${abs_top_builddir}/scripts
|
||||
export bindir
|
||||
|
||||
GUIX_PACKAGE_PATH="$abs_top_srcdir/guix${GUIX_PACKAGE_PATH:+:}$GUIX_PACKAGE_PATH"
|
||||
export GUIX_PACKAGE_PATH
|
||||
|
||||
|
|
|
@ -23,18 +23,14 @@ set -e
|
|||
. ${srcdest}build-aux/config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
|
||||
snarf=" "
|
||||
if [ -n "$1" ]; then
|
||||
snarf=.mes
|
||||
fi
|
||||
trace "SNARF$snarf gc.c" ${srcdest}build-aux/mes-snarf.scm $1 src/gc.c
|
||||
trace "SNARF$snarf hash.c" ${srcdest}build-aux/mes-snarf.scm $1 src/hash.c
|
||||
trace "SNARF$snarf lib.c" ${srcdest}build-aux/mes-snarf.scm $1 src/lib.c
|
||||
trace "SNARF$snarf math.c" ${srcdest}build-aux/mes-snarf.scm $1 src/math.c
|
||||
trace "SNARF$snarf mes.c" ${srcdest}build-aux/mes-snarf.scm $1 src/mes.c
|
||||
trace "SNARF$snarf module.c" ${srcdest}build-aux/mes-snarf.scm $1 src/module.c
|
||||
trace "SNARF$snarf posix.c" ${srcdest}build-aux/mes-snarf.scm $1 src/posix.c
|
||||
trace "SNARF$snarf reader.c" ${srcdest}build-aux/mes-snarf.scm $1 src/reader.c
|
||||
trace "SNARF$snarf strings.c" ${srcdest}build-aux/mes-snarf.scm $1 src/strings.c
|
||||
trace "SNARF$snarf struct.c" ${srcdest}build-aux/mes-snarf.scm $1 src/struct.c
|
||||
trace "SNARF$snarf vector.c" ${srcdest}build-aux/mes-snarf.scm $1 src/vector.c
|
||||
trace "SNARF$snarf gc.c" ${srcdest}build-aux/mes-snarf.scm src/gc.c
|
||||
trace "SNARF$snarf hash.c" ${srcdest}build-aux/mes-snarf.scm src/hash.c
|
||||
trace "SNARF$snarf lib.c" ${srcdest}build-aux/mes-snarf.scm src/lib.c
|
||||
trace "SNARF$snarf math.c" ${srcdest}build-aux/mes-snarf.scm src/math.c
|
||||
trace "SNARF$snarf mes.c" ${srcdest}build-aux/mes-snarf.scm src/mes.c
|
||||
trace "SNARF$snarf module.c" ${srcdest}build-aux/mes-snarf.scm src/module.c
|
||||
trace "SNARF$snarf posix.c" ${srcdest}build-aux/mes-snarf.scm src/posix.c
|
||||
trace "SNARF$snarf reader.c" ${srcdest}build-aux/mes-snarf.scm src/reader.c
|
||||
trace "SNARF$snarf strings.c" ${srcdest}build-aux/mes-snarf.scm src/string.c
|
||||
trace "SNARF$snarf struct.c" ${srcdest}build-aux/mes-snarf.scm src/struct.c
|
||||
trace "SNARF$snarf vector.c" ${srcdest}build-aux/mes-snarf.scm src/vector.c
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -20,30 +20,19 @@
|
|||
|
||||
set -e
|
||||
|
||||
if [ ! "$config_status" ]; then
|
||||
. ./config.status
|
||||
if [ "$V" = 2 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
. ${srcdest}build-aux/config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
. ${srcdest}build-aux/cc.sh
|
||||
t=${1-scaffold/boot/00-zero.scm}
|
||||
b=$(basename "$t" .scm)
|
||||
|
||||
t=${1-scaffold/tests/t}
|
||||
o="$t"
|
||||
|
||||
rm -f "${program_prefix}$o"
|
||||
compile "$t"
|
||||
link "$t"
|
||||
|
||||
r=0
|
||||
[ -f "$t".exit ] && r=$(cat "$t".exit)
|
||||
set +e
|
||||
$(dirname "$o")/${program_prefix}$(basename "$o") $ARGS > "$o".${program_prefix}stdout
|
||||
m=$?
|
||||
cat "$o".${program_prefix}stdout
|
||||
set -e
|
||||
|
||||
[ $m = $r ]
|
||||
if [ -f "$t".expect ]; then
|
||||
$DIFF -ub "$t".expect "$o".${program_prefix}stdout
|
||||
if [ "$(basename $MES)" = guile ]; then
|
||||
$MES -L ${srcdest}module -C module -L . -c '(begin (use-modules (mes guile)) (include-from-path "'"$t"'"))'
|
||||
elif [ -z "${b/5[0-9]-*/}" ]; then
|
||||
cat "$t" | MES_BOOT=boot-00.scm $MES
|
||||
elif [ -z "${b/6[0-9]-*/}" ]; then
|
||||
cat "$t" | MES_BOOT=boot-01.scm $MES
|
||||
else
|
||||
MES_BOOT=$t $MES;
|
||||
fi
|
|
@ -0,0 +1,80 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
# GNU Mes is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU Mes is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -e
|
||||
|
||||
if test -z "$config_sh"; then
|
||||
. ./config.sh
|
||||
fi
|
||||
|
||||
if [ "$V" = 2 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
t=${1-lib/tests/scaffold/t.c}
|
||||
b=$(dirname "$t")/$(basename "$t" .c)
|
||||
o="$b"
|
||||
o=lib/tests/${b#*lib/tests/}
|
||||
if [ "$o" = "$b" ]; then
|
||||
o=./$(basename "$t" .c)
|
||||
fi
|
||||
|
||||
rm -f "$o"
|
||||
CC=${CC-gcc}
|
||||
|
||||
i=$(basename "$t" .c)
|
||||
if [ -z "${i/[012][0-9]-*/}" ]; then
|
||||
LIBS=
|
||||
elif [ -z "${i/[34][0-9]-*/}" ]; then
|
||||
LIBS='-l c-mini'
|
||||
elif [ -z "${i/[78][0-9a-z]-*/}" ]; then
|
||||
LIBS='-l c+tcc'
|
||||
elif [ -z "${i/9[0-9a-z]-*/}" ]; then
|
||||
LIBS='-l c+gnu'
|
||||
else
|
||||
LIBS='-l c'
|
||||
fi
|
||||
|
||||
if test $mes_libc = system; then
|
||||
crt1=
|
||||
LIBS='-l mes'
|
||||
else
|
||||
crt1=crt1.o
|
||||
fi
|
||||
|
||||
$CC -c $CPPFLAGS $CFLAGS -o "$o".o "$t"
|
||||
$CC $CFLAGS $LDFLAGS -L . -o "$o" $crt1 "$o".o $LIBS
|
||||
|
||||
set +e
|
||||
timeout 10 "$o" -s --long file0 file1 > "$o".1 2> "$o".2
|
||||
r=$?
|
||||
set -e
|
||||
if [ -f "$b".exit ]; then
|
||||
e=$(cat "$b".exit)
|
||||
else
|
||||
e=0
|
||||
fi
|
||||
[ $r = $e ] || exit 1
|
||||
if [ -f "$b".stdout ]; then
|
||||
$DIFF -ub "$b".stdout "$o".1
|
||||
fi
|
||||
if [ -f "$b".stderr ]; then
|
||||
$DIFF -ub "$b".stderr "$o".2
|
||||
fi
|
|
@ -0,0 +1,148 @@
|
|||
#!/bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2018-03-07.03; # UTC
|
||||
|
||||
# Copyright (C) 2011-2018 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
# Make unconditional expansion of undefined variables an error. This
|
||||
# helps a lot in preventing typo-related bugs.
|
||||
set -u
|
||||
|
||||
usage_error ()
|
||||
{
|
||||
echo "$0: $*" >&2
|
||||
print_usage >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
END
|
||||
}
|
||||
|
||||
test_name= # Used for reporting.
|
||||
log_file= # Where to save the output of the test script.
|
||||
trs_file= # Where to save the metadata of the test run.
|
||||
expect_failure=no
|
||||
color_tests=no
|
||||
enable_hard_errors=yes
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) print_usage; exit $?;;
|
||||
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||
--test-name) test_name=$2; shift;;
|
||||
--log-file) log_file=$2; shift;;
|
||||
--trs-file) trs_file=$2; shift;;
|
||||
--color-tests) color_tests=$2; shift;;
|
||||
--expect-failure) expect_failure=$2; shift;;
|
||||
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||
--) shift; break;;
|
||||
-*) usage_error "invalid option: '$1'";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
missing_opts=
|
||||
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
||||
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
||||
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
||||
if test x"$missing_opts" != x; then
|
||||
usage_error "the following mandatory options are missing:$missing_opts"
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage_error "missing argument"
|
||||
fi
|
||||
|
||||
if test $color_tests = yes; then
|
||||
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||
red='[0;31m' # Red.
|
||||
grn='[0;32m' # Green.
|
||||
lgn='[1;32m' # Light green.
|
||||
blu='[1;34m' # Blue.
|
||||
mgn='[0;35m' # Magenta.
|
||||
std='[m' # No color.
|
||||
else
|
||||
red= grn= lgn= blu= mgn= std=
|
||||
fi
|
||||
|
||||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||
trap "st=129; $do_exit" 1
|
||||
trap "st=130; $do_exit" 2
|
||||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
estatus=$?
|
||||
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
tweaked_estatus=1
|
||||
else
|
||||
tweaked_estatus=$estatus
|
||||
fi
|
||||
|
||||
case $tweaked_estatus:$expect_failure in
|
||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||
esac
|
||||
|
||||
# Report the test outcome and exit status in the logs, so that one can
|
||||
# know whether the test passed or failed simply by looking at the '.log'
|
||||
# file, without the need of also peaking into the corresponding '.trs'
|
||||
# file (automake bug#11814).
|
||||
echo "$res $test_name (exit status: $estatus)" >>$log_file
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
||||
# Register the test result, and other relevant metadata.
|
||||
echo ":test-result: $res" > $trs_file
|
||||
echo ":global-test-result: $res" >> $trs_file
|
||||
echo ":recheck: $recheck" >> $trs_file
|
||||
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -0,0 +1,143 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2011-2018 Free Software Foundation, Inc.
|
||||
# Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
# GNU Mes is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or (at
|
||||
# your option) any later version.
|
||||
#
|
||||
# GNU Mes is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Adapted from GNU Automake
|
||||
|
||||
TEST_SUITE_LOG=test-suite.log
|
||||
dry_run=false
|
||||
create_global_log=cat
|
||||
subdir=$(basename $(pwd))
|
||||
|
||||
TEST_LOGS=
|
||||
for t in $TESTS; do
|
||||
b=$(dirname $t)/$(basename $t $test_ext)
|
||||
TEST_LOGS="$TEST_LOGS $b.log"
|
||||
if test -e $b.log \
|
||||
&& test -e $b.trs\
|
||||
&& ! $recheck; then
|
||||
echo `grep :test-result $b.trs | cut -d' ' -f 2`: $b
|
||||
continue
|
||||
fi
|
||||
d=$(dirname $t)
|
||||
case " `echo $XFAIL_TESTS` " in
|
||||
*[\ \ ]$t[\ \ ]*)
|
||||
fail=yes;;
|
||||
*)
|
||||
fail=no;;
|
||||
esac
|
||||
mkdir -p $d
|
||||
${SHELL} ${srcdest}build-aux/test-driver\
|
||||
--test-name $t \
|
||||
--log-file $b.log\
|
||||
--trs-file $b.trs\
|
||||
--color-tests $colors\
|
||||
--enable-hard-errors no\
|
||||
--expect-failure $fail\
|
||||
-- $log_compiler\
|
||||
${srcdest}$t
|
||||
done
|
||||
|
||||
if test $colors = yes; then
|
||||
red='[0;31m'
|
||||
grn='[0;32m'
|
||||
lgn='[1;32m'
|
||||
blu='[1;34m'
|
||||
mgn='[0;35m'
|
||||
brg='[1m'
|
||||
std='[m'
|
||||
else
|
||||
mgn= red= grn= lgn= blu= brg= std=
|
||||
fi
|
||||
bases="$TEST_LOGS"
|
||||
bases=`for i in $bases; do echo $i; done | sed 's/\.log$//'`
|
||||
bases=`echo $bases`
|
||||
ws='[ ]'
|
||||
results=`for b in $bases; do echo $b.trs; done`
|
||||
test -n "$results" || results=/dev/null
|
||||
all=` grep "^$ws*:test-result:" $results | wc -l`
|
||||
pass=` grep "^$ws*:test-result:$ws*PASS" $results | wc -l`
|
||||
fail=` grep "^$ws*:test-result:$ws*FAIL" $results | wc -l`
|
||||
skip=` grep "^$ws*:test-result:$ws*SKIP" $results | wc -l`
|
||||
xfail=`grep "^$ws*:test-result:$ws*XFAIL" $results | wc -l`
|
||||
xpass=`grep "^$ws*:test-result:$ws*XPASS" $results | wc -l`
|
||||
error=`grep "^$ws*:test-result:$ws*ERROR" $results | wc -l`
|
||||
if test `expr $fail + $xpass + $error` -eq 0; then
|
||||
success=true
|
||||
else
|
||||
success=false
|
||||
fi
|
||||
br='==================='; br=$br$br$br$br
|
||||
result_count ()
|
||||
{
|
||||
if test x"$1" = x"--maybe-color"; then
|
||||
maybe_colorize=yes
|
||||
elif test x"$1" = x"--no-color"; then
|
||||
maybe_colorize=no
|
||||
else
|
||||
echo "$@: invalid 'result_count' usage" >&2; exit 4
|
||||
fi
|
||||
shift
|
||||
desc=$1 count=$2
|
||||
if test $maybe_colorize = yes && test $count -gt 0; then
|
||||
color_start=$3 color_end=$std
|
||||
else
|
||||
color_start= color_end=
|
||||
fi
|
||||
echo "${color_start}# $desc $count${color_end}"
|
||||
}
|
||||
create_testsuite_report ()
|
||||
{
|
||||
result_count $1 "TOTAL:" $all "$brg"
|
||||
result_count $1 "PASS: " $pass "$grn"
|
||||
result_count $1 "SKIP: " $skip "$blu"
|
||||
result_count $1 "XFAIL:" $xfail "$lgn"
|
||||
result_count $1 "FAIL: " $fail "$red"
|
||||
result_count $1 "XPASS:" $xpass "$red"
|
||||
result_count $1 "ERROR:" $error "$mgn"
|
||||
}
|
||||
{
|
||||
echo "${PACKAGE}: ${subdir}/${TEST_SUITE_LOG}"
|
||||
create_testsuite_report --no-color
|
||||
echo
|
||||
echo
|
||||
for b in $bases; do echo $b; done\
|
||||
| $create_global_log
|
||||
} >${TEST_SUITE_LOG}.tmp || exit 1
|
||||
mv ${TEST_SUITE_LOG}.tmp ${TEST_SUITE_LOG}
|
||||
if $success; then
|
||||
col="$grn"
|
||||
else
|
||||
col="$red"
|
||||
test x"$V" = x0 || cat ${TEST_SUITE_LOG}
|
||||
fi
|
||||
echo "${col}$br${std}"
|
||||
echo "${col}Testsuite summary for ${PACKAGE_NAME}${std}"
|
||||
echo "${col}$br${std}"
|
||||
create_testsuite_report --maybe-color
|
||||
echo "$col$br$std"
|
||||
if $success; then :; else
|
||||
echo "${col}See ${subdir}/${TEST_SUITE_LOG}${std}"
|
||||
if test -n "${PACKAGE_BUGREPORT}"; then
|
||||
echo "${col}Please report to ${PACKAGE_BUGREPORT}${std}"
|
||||
fi
|
||||
echo "$col$br$std"
|
||||
fi
|
||||
$success || exit 1
|
|
@ -16,26 +16,34 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
if [ -z "$V" -o "$V0" = 0 ]; then
|
||||
LOG=
|
||||
if [ -z "$V" -o "$V" = 0 ]; then
|
||||
trace () {
|
||||
echo " $1"
|
||||
shift
|
||||
eval "$@" $LOG
|
||||
echo "$@" >> build.log
|
||||
eval "$@ $LOG"
|
||||
cat .log 1>&2
|
||||
cat .log >> build.log
|
||||
}
|
||||
LOG=" >>build.log 2>&1"
|
||||
LOG=" >.log 2>&1"
|
||||
fi
|
||||
if [ "$V" = 1 ]; then
|
||||
trace () {
|
||||
shift
|
||||
echo "$@"
|
||||
echo "$@" >> build.log
|
||||
eval "$@ $LOG"
|
||||
cat .log 1>&2
|
||||
cat .log >> build.log
|
||||
}
|
||||
LOG=" >>build.log 2>&1"
|
||||
LOG=" >.log 2>&1"
|
||||
fi
|
||||
if [ "$V" = 2 ]; then
|
||||
set -x
|
||||
trace () {
|
||||
shift
|
||||
echo "$@" >> build.log
|
||||
eval "$@"
|
||||
}
|
||||
fi
|
||||
|
|
|
@ -20,31 +20,45 @@
|
|||
|
||||
#set -e
|
||||
|
||||
. ./config.status
|
||||
. ${srcdest}build-aux/config.sh
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
. ./config.sh
|
||||
|
||||
GUILE=${GUILE-$(command -v guile)} || true
|
||||
if [ -z "$GUILE" -o "$GUILE" = true ]; then
|
||||
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-2.2}
|
||||
else
|
||||
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-$(guile -c '(display (effective-version))')}
|
||||
v=
|
||||
_v=
|
||||
if test "$V" = 2; then
|
||||
set -x
|
||||
fi
|
||||
if test "$V" -gt 0; then
|
||||
v=v
|
||||
_v=-v
|
||||
fi
|
||||
|
||||
datadir=${datadir-$prefix/share}
|
||||
docdir=${docdir-$datadir/doc/mes-$VERSION}
|
||||
infodir=${infodir-$datadir/info}
|
||||
mandir=${mandir-$datadir/man}
|
||||
moduledir=${moduledir-$datadir/mes/module}
|
||||
guile_site_dir=${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION}
|
||||
guile_site_ccache_dir=${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache}
|
||||
set -u
|
||||
|
||||
MES_PREFIX=${MES_PREFIX-$prefix/share/mes}
|
||||
rm ${DESTDIR}${bindir}/mes
|
||||
rm ${DESTDIR}${bindir}/ar
|
||||
rm ${DESTDIR}${bindir}/mescc
|
||||
rm ${DESTDIR}${bindir}/mescc.scm
|
||||
rm ${DESTDIR}${bindir}/diff.scm
|
||||
rmdir ${DESTDIR}${bindir} || :
|
||||
|
||||
rm $DESTDIR$prefix/bin/mes
|
||||
rm $DESTDIR$prefix/bin/mescc
|
||||
rm -f $DESTDIR$prefix/bin/diff.scm
|
||||
rmdir $DESTDIR$prefix/bin || :
|
||||
rm -r ${DESTDIR}${libdir}/$mes_cpu-mes
|
||||
rm ${DESTDIR}${libdir}/libc-mini.a
|
||||
rm ${DESTDIR}${libdir}/libmes.a
|
||||
if cmp gcc-lib/libc.a ${DESTDIR}${libdir}/libc.a; then
|
||||
rm ${DESTDIR}${libdir}/libc.a
|
||||
fi
|
||||
if cmp gcc-lib/libtcc1.a ${DESTDIR}${libdir}/libtcc1.a; then
|
||||
rm ${DESTDIR}${libdir}/libtcc1.a
|
||||
fi
|
||||
rm ${DESTDIR}${libdir}/libc+tcc.a
|
||||
rm ${DESTDIR}${libdir}/libc+gnu.a
|
||||
|
||||
rm -r ${DESTDIR}${includedir}/mes
|
||||
rm $(grep -lr _MES_ ${DESTDIR}${includedir})
|
||||
rmdir ${DESTDIR}${includedir}/linux/x86
|
||||
rmdir ${DESTDIR}${includedir}/linux/x86_64
|
||||
rmdir ${DESTDIR}${includedir}/linux
|
||||
rmdir -p ${DESTDIR}${includedir}/sys
|
||||
|
||||
for i in\
|
||||
AUTHORS\
|
||||
|
@ -56,28 +70,27 @@ for i in\
|
|||
NEWS\
|
||||
README\
|
||||
;do
|
||||
rm $DESTDIR$docdir/$i || :;
|
||||
rm ${DESTDIR}${docdir}/$i || :;
|
||||
done
|
||||
|
||||
rmdir $DESTDIR$docdir || :
|
||||
rm -r ${DESTDIR}${pkgdatadir}
|
||||
rm -r ${DESTDIR}${guile_site_ccache_dir}/mes
|
||||
rm -r ${DESTDIR}${guile_site_ccache_dir}/mescc
|
||||
|
||||
rm -r $DESTDIR$MES_PREFIX
|
||||
rm -r $DESTDIR$guile_site_ccache_dir/mes
|
||||
rm -r $DESTDIR$guile_site_ccache_dir/mescc
|
||||
rm -r ${DESTDIR}${guile_site_dir}/mes
|
||||
rm ${DESTDIR}${guile_site_dir}/mescc.scm
|
||||
rm -r ${DESTDIR}${guile_site_dir}/mescc
|
||||
|
||||
rm -r $DESTDIR$guile_site_dir/mes
|
||||
rm -r $DESTDIR$guile_site_dir/mescc
|
||||
rm ${DESTDIR}${infodir}/dir
|
||||
rm ${DESTDIR}${infodir}/mes.info*
|
||||
rm ${DESTDIR}${infodir}/images/gcc-mesboot*
|
||||
rm ${DESTDIR}${infodir}/images/README
|
||||
rm ${DESTDIR}${mandir}/man1/mes.1
|
||||
rm ${DESTDIR}${mandir}/man1/mescc.1
|
||||
|
||||
rm $DESTDIR$prefix/share/info/dir
|
||||
rm $DESTDIR$prefix/share/info/mes.info*
|
||||
rm $DESTDIR$prefix/share/info/images/gcc-mesboot*
|
||||
rm $DESTDIR$prefix/share/info/images/README
|
||||
rm $DESTDIR$mandir/man1/mes.1
|
||||
rm $DESTDIR$mandir/man1/mescc.1
|
||||
|
||||
rmdir -p $DESTDIR$prefix/share/doc
|
||||
rmdir -p $DESTDIR$prefix/share/info/images
|
||||
rmdir -p $DESTDIR$guile_site_dir
|
||||
rmdir -p $DESTDIR$guile_site_ccache_dir
|
||||
rmdir -p $DESTDIR$mandir/man1
|
||||
rmdir -p ${DESTDIR}${docdir}
|
||||
rmdir -p ${DESTDIR}${infodir}/images
|
||||
rmdir -p ${DESTDIR}${guile_site_dir}
|
||||
rmdir -p ${DESTDIR}${guile_site_ccache_dir}
|
||||
rmdir -p ${DESTDIR}${mandir}/man1
|
||||
true
|
||||
|
|
|
@ -4,7 +4,7 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
!#
|
||||
|
||||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; configure: This file is part of GNU Mes.
|
||||
;;;
|
||||
|
@ -32,6 +32,12 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
#:use-module (ice-9 rdelim)
|
||||
#:export (main))
|
||||
|
||||
(define *shell* "sh")
|
||||
(define PACKAGE "mes")
|
||||
(define PACKAGE-NAME "GNU Mes")
|
||||
(define PACKAGE-BUGREPORT "bug-mes@gnu.org")
|
||||
(define VERSION "0.19")
|
||||
|
||||
(cond-expand
|
||||
(guile)
|
||||
(mes (mes-use-module (srfi srfi-1))
|
||||
|
@ -63,10 +69,6 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
(and (and warn? (format (current-error-port) "warning: not found: ~a\n" name))
|
||||
default)))
|
||||
|
||||
(define *shell* "sh")
|
||||
(define PACKAGE "mes")
|
||||
(define VERSION "0.19")
|
||||
|
||||
;;; Utility
|
||||
(define (logf port string . rest)
|
||||
(apply format (cons* port string rest))
|
||||
|
@ -91,6 +93,8 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
(output (read-string port))
|
||||
(status (close-pipe port))
|
||||
(error (with-input-from-file ".error" read-string)))
|
||||
(when (file-exists? ".error")
|
||||
(delete-file ".error"))
|
||||
(set-current-error-port err)
|
||||
(verbose "command[~a]: ~s => ~a [~a]\n" status command output error)
|
||||
(if (not (zero? status)) ""
|
||||
|
@ -223,6 +227,8 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
(let ((name (dependency-name dependency)))
|
||||
(stderr "checking for ~a..." name)
|
||||
(let ((result (check cc name)))
|
||||
(when (file-exists? ".config.c")
|
||||
(delete-file ".config.c"))
|
||||
(stderr " ~a\n" (if result "yes" "no"))
|
||||
(if result (set-field dependency (dependency-file-name) name)
|
||||
dependency))))
|
||||
|
@ -231,6 +237,8 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
(let ((name (dependency-name dependency)))
|
||||
(stderr "checking for ~a..." name)
|
||||
(let ((result (check cc (dependency-data dependency))))
|
||||
(when (file-exists? ".config.c")
|
||||
(delete-file ".config.c"))
|
||||
(stderr " ~a\n" (if result "yes" "no"))
|
||||
(if result (set-field dependency (dependency-file-name) name)
|
||||
dependency))))
|
||||
|
@ -239,6 +247,8 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
(let ((name (dependency-name dependency)))
|
||||
(stderr "checking for ~a..." name)
|
||||
(let ((result (check cc (dependency-data dependency))))
|
||||
(when (file-exists? ".config.c")
|
||||
(delete-file ".config.c"))
|
||||
(stderr " ~a\n" (if result "yes" "no"))
|
||||
(if result (set-field dependency (dependency-file-name) name)
|
||||
dependency))))
|
||||
|
@ -271,6 +281,7 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
(bindir (value #t))
|
||||
(datadir (value #t))
|
||||
(docdir (value #t))
|
||||
(includedir (value #t))
|
||||
(libdir (value #t))
|
||||
(srcdir (value #t))
|
||||
(sysconfdir (value #t))
|
||||
|
@ -282,14 +293,15 @@ MES_ARENA=100000000 exec ${SCHEME-guile} -L . --no-auto-compile -e '(configure)'
|
|||
(with-courage)
|
||||
(infodir (value #t))
|
||||
(mandir (value #t))
|
||||
(disable-colors)
|
||||
(enable-colors)
|
||||
(disable-silent-rules)
|
||||
(enable-silent-rules)
|
||||
(with-system-libc)
|
||||
|
||||
(enable-fast-install) ; Ignored for Guix
|
||||
(includedir (value #t)) ; Ignored for Debian
|
||||
(mandir (value #t)) ; Ignored for Debian
|
||||
(localstatedir (value #t)) ; Ignored for Debian
|
||||
(libdir (value #t)) ; Ignored for Debian
|
||||
(libexecdir (value #t)) ; Ignored for Debian
|
||||
(runstatedir (value #t)) ; Ignored for Debian
|
||||
(disable-maintainer-mode) ; Ignored for Debian
|
||||
|
@ -312,17 +324,24 @@ Defaults for the options are specified in brackets.
|
|||
Options:
|
||||
-h, --help display this help
|
||||
--build=BUILD configure for building on BUILD [guessed]
|
||||
--colors no colorized output
|
||||
--disable-silent-rules
|
||||
verbose build output [V=1]
|
||||
--host=HOST cross-compile to build programs to run on HOST [BUILD]
|
||||
--mes use Mes C Library
|
||||
-v, --verbose be verbose
|
||||
--with-courage assert being courageous to configure for unsupported platform
|
||||
--with-courage Assert that even if this platform is unsupported,
|
||||
you will be courageous and port GNU Mes to it
|
||||
(see \"Porting GNU Mes\" in the manual.)
|
||||
--with-cheating cheat using Guile instead of Mes
|
||||
--with-system-libc use system libc
|
||||
|
||||
Installation directories:
|
||||
--prefix=DIR install in prefix DIR [~a]
|
||||
|
||||
--bindir=DIR user executables [PREFIX/bin]
|
||||
--includedir=DIR C header files [PREFIX/include]
|
||||
--infodir=DIR info documentation [PREFIX/share/info]
|
||||
--libdir=DIR object code libraries [EPREFIX/lib]
|
||||
--mandir=DIR man pages [PREFIX/share/man]
|
||||
|
||||
Program names:
|
||||
|
@ -335,8 +354,6 @@ Ignored for Guix:
|
|||
Ignored for Debian:
|
||||
--disable-dependency-tracking
|
||||
--disable-maintainer-mode
|
||||
--includedir=DIR
|
||||
--libdir=DIR
|
||||
--libexecdir=DIR
|
||||
--localstatedir=DIR
|
||||
--runstatedir=DIR
|
||||
|
@ -348,31 +365,27 @@ Some influential environment variables:
|
|||
GUILD guild command
|
||||
MES_FOR_BUILD build system MES [can be mes or guile]
|
||||
MES_SEED location of mes-seed
|
||||
TINYCC_PREFIX location of tinycc [for tests/test2]
|
||||
" PACKAGE VERSION (getenv "prefix")))
|
||||
|
||||
(define (main args)
|
||||
(let* ((options (parse-opts args))
|
||||
(build-type (option-ref options 'build %host-type))
|
||||
|
||||
(host-type (option-ref options 'host %host-type))(prefix "/usr/local")
|
||||
(host-type (option-ref options 'host build-type))
|
||||
|
||||
(prefix "/usr/local")
|
||||
(prefix (option-ref options 'prefix prefix))
|
||||
(program-prefix (option-ref options 'program-prefix ""))
|
||||
(program-suffix (option-ref options 'program-suffix ""))
|
||||
(infodir (option-ref options 'infodir "${prefix}/share/info"))
|
||||
(mandir (option-ref options 'infodir "${prefix}/share/man"))
|
||||
(mandir (option-ref options 'mandir "${prefix}/share/man"))
|
||||
(sysconfdir (option-ref options 'sysconfdir "${prefix}/etc"))
|
||||
|
||||
(bindir (option-ref options 'bindir "${prefix}/bin"))
|
||||
(datadir (option-ref options 'datadir "${prefix}/share"))
|
||||
(docdir (option-ref options 'docdir "${datadir}/doc/mes-${VERSION}"))
|
||||
(includedir (option-ref options 'libdir "${prefix}/include"))
|
||||
(libdir (option-ref options 'libdir "${prefix}/lib"))
|
||||
(moduledir "${datadir}/mes/module")
|
||||
(moduledir/ (string-append
|
||||
(gulp-pipe* "echo" prefix)
|
||||
"/share/mes/module/"))
|
||||
(pkgdatadir (string-append datadir "/mes"))
|
||||
(guile-effective-version (effective-version))
|
||||
(guile-site-dir (if (equal? prefix ".") (canonicalize-path ".")
|
||||
(string-append prefix "/share/guile/site/" guile-effective-version)))
|
||||
|
@ -389,8 +402,11 @@ Some influential environment variables:
|
|||
|
||||
(with-cheating? (option-ref options 'with-cheating #f))
|
||||
(with-courage? (option-ref options 'with-courage #f))
|
||||
(disable-colors? (option-ref options 'disable-colors #f))
|
||||
(enable-colors? (option-ref options 'enable-colors #f))
|
||||
(disable-silent-rules? (option-ref options 'disable-silent-rules #f))
|
||||
(enable-silent-rules? (option-ref options 'enable-silent-rules #f))
|
||||
(with-system-libc? (option-ref options 'with-system-libc #f))
|
||||
(vars (filter (cut string-index <> #\=) (option-ref options '() '())))
|
||||
(help? (option-ref options 'help #f))
|
||||
(mes? (option-ref options 'mes #f)))
|
||||
|
@ -417,6 +433,7 @@ Some influential environment variables:
|
|||
(list (make-dep "hex2" #:version '(0 3))
|
||||
(make-dep "M1" #:version '(0 3))
|
||||
(make-dep "blood-elf" #:version '(0 1))
|
||||
(make-dep "diff" #:optional? #t)
|
||||
(make-dep "guile" #:version '(2 0) #:commands '("guile-2.2" "guile-2.0" "guile-2" "guile") #:optional? #t)
|
||||
(make-dep "mes" #:version '(0 18) #:optional? #t)
|
||||
(make-dep "guix" #:version '(0 13) #:optional? #t)
|
||||
|
@ -475,16 +492,24 @@ Some influential environment variables:
|
|||
(cons (check-link-c cc (make-dep "if cc can create executables" #:data "int main () {return 0;}"))
|
||||
deps)
|
||||
deps))
|
||||
(mes? (or mes? (not (file-name "if cc can create executables" deps))))
|
||||
(system-libc? (and with-system-libc? (file-name "if cc can create executables" deps)))
|
||||
(build-type (or (and cc (gulp-pipe* cc "-dumpmachine")) build-type))
|
||||
(arch (car (string-split build-type #\-)))
|
||||
(arch (if (member arch '("i386" "i486" "i586" "i686")) "x86"
|
||||
arch))
|
||||
(mes-arch arch)
|
||||
(mes-arch (if mes? (string-append mes-arch "-mes") mes-arch))
|
||||
(mes-arch (if gcc? (string-append mes-arch "-gcc") mes-arch))
|
||||
(mes-arch (if tcc? (string-append mes-arch "-gcc") mes-arch))
|
||||
(posix? (and (not mesc?) (not mes?))))
|
||||
(build-type-list (string-split build-type #\-))
|
||||
(mes-cpu (car build-type-list))
|
||||
(mes-cpu (cond ((member mes-cpu '("i386" "i486" "i586" "i686")) "x86")
|
||||
((member mes-cpu '("arm" "armv4" "armv7l")) "arm")
|
||||
(else mes-cpu)))
|
||||
(mes-bits (if (member mes-cpu '("x86_64")) "64"
|
||||
"32"))
|
||||
(mes-libc (if system-libc? "system" "mes"))
|
||||
|
||||
(kernel-list (filter (compose not (cut equal? <> "unknown")) (cdr build-type-list)))
|
||||
(mes-kernel (cond ((or (equal? '("linux" "gnu") kernel-list)
|
||||
(equal? "linux" (car kernel-list))) "linux")
|
||||
((equal? '( "gnu") kernel-list) "gnu")
|
||||
(else "unknown")))
|
||||
(compiler (if gcc? "gcc" "mescc"))
|
||||
(mes-system (string-join (list mes-cpu mes-kernel "mes") "-")))
|
||||
|
||||
(define* (substitute file-name pairs
|
||||
#:key (target (if (string-suffix? ".in" file-name)
|
||||
|
@ -500,8 +525,12 @@ Some influential environment variables:
|
|||
line pairs))
|
||||
(loop (read-line in 'concat))))))))
|
||||
|
||||
(when (and (not (member arch '("x86" "x86_64"))) (not with-courage?))
|
||||
(stderr "platform not supported: ~a, try --with-courage\n" arch)
|
||||
(when (and (not (member mes-system '("arm-linux-mes"
|
||||
"x86-linux-mes"
|
||||
"x86_64-linux-mes")))
|
||||
(not with-courage?))
|
||||
(stderr "platform not supported: ~a
|
||||
See \"Porting GNU Mes\" in the manual, or try --with-courage\n" mes-system)
|
||||
(exit 1))
|
||||
(when (pair? missing)
|
||||
(stderr "\nMissing dependencies: ~a\n" (string-join (map dependency-name missing)))
|
||||
|
@ -512,21 +541,24 @@ Some influential environment variables:
|
|||
;; Debian wants to run `make clean' from a tarball
|
||||
(and (zero? (system* "git" "init"))
|
||||
(zero? (system* "git" "add" "."))
|
||||
(zero? (system* "touch" ".git-for-build"))
|
||||
(zero? (system* "git" "commit" "--allow-empty" "-m" "Import mes")))))
|
||||
|
||||
(let ((pairs `(("@PACKAGE@" . ,PACKAGE)
|
||||
("@PACKAGE_NAME@" . ,PACKAGE-NAME)
|
||||
("@PACKAGE_BUGREPORT@" . ,PACKAGE-BUGREPORT)
|
||||
("@VERSION@" . ,VERSION)
|
||||
|
||||
("@arch@" . ,arch)
|
||||
("@build@" . ,build-type)
|
||||
("@host@" . ,host-type)
|
||||
|
||||
("@gcc_p@" . ,(if gcc? "1" ""))
|
||||
("@mes_arch@" . ,mes-arch)
|
||||
("@mes_p@" . ,(if mes? "1" ""))
|
||||
("@mesc_p@" . ,(if mesc? "1" ""))
|
||||
("@posix_p@" . ,(if posix? "1" ""))
|
||||
("@tcc_p@" . ,(if tcc? "1" ""))
|
||||
("@courageous@" . ,(if with-courage? "true" "false"))
|
||||
("@compiler@" . ,compiler)
|
||||
("@mes_bits@" . ,mes-bits)
|
||||
("@mes_kernel@" . ,mes-kernel)
|
||||
("@mes_cpu@" . ,mes-cpu)
|
||||
("@mes_libc@" . ,mes-libc)
|
||||
("@mes_system@" . ,mes-system)
|
||||
|
||||
("@abs_top_srcdir@" . ,abs-top-srcdir)
|
||||
("@abs_top_builddir@" . ,abs-top-builddir)
|
||||
|
@ -539,21 +571,24 @@ Some influential environment variables:
|
|||
("@program_prefix@" . ,program-prefix)
|
||||
("@bindir@" . ,bindir)
|
||||
("@datadir@" . ,datadir)
|
||||
("@pkgdatadir@" . ,pkgdatadir)
|
||||
("@docdir@" . ,docdir)
|
||||
("@guile_site_ccache_dir@" . ,guile-site-ccache-dir)
|
||||
("@guile_site_dir@" . ,guile-site-dir)
|
||||
("@infodir@" . ,infodir)
|
||||
("@includedir@" . ,includedir)
|
||||
("@libdir@" . ,libdir)
|
||||
("@mandir@" . ,mandir)
|
||||
("@moduledir@" . ,moduledir)
|
||||
("@sysconfdir@" . ,sysconfdir)
|
||||
|
||||
("@GUILE_EFFECTIVE_VERSION@" . ,(effective-version))
|
||||
("@V@" . ,(if disable-silent-rules? 1 0))
|
||||
("@colors@" . ,(if disable-colors? "no" "yes"))
|
||||
("@V@" . ,(if disable-silent-rules? "1" "0"))
|
||||
|
||||
("@AR@" . ,(or (file-name "ar" deps) ""))
|
||||
("@BASH@" . ,(or (file-name "bash" deps) ""))
|
||||
("@CC@" . ,(or (file-name "cc" deps) ""))
|
||||
("@DIFF@" . ,(or (file-name "diff" deps) (string-append abs-top-builddir "/pre-inst-env diff.scm")))
|
||||
("@DOT@" . ,(or (file-name "dot" deps) ""))
|
||||
("@GIT@" . ,(or (file-name "git" deps) ""))
|
||||
("@GUILE@" . ,guile)
|
||||
|
@ -564,13 +599,16 @@ Some influential environment variables:
|
|||
guile))
|
||||
("@MES_SEED@" . ,(or mes-seed ""))
|
||||
("@PERL@" . ,(or (file-name "perl" deps) ""))
|
||||
("@SHELL@" . ,(or (file-name "sh" deps) ""))
|
||||
("#SCHEME=\"@SCHEME@\"" . ,(if with-cheating? (string-append "\nSCHEME=\"" guile "\"") ""))
|
||||
("@SCHEME@" . ,(if with-cheating? guile ""))
|
||||
("@SHELL@" . ,(or (file-name "bash" deps)
|
||||
(file-name "sh" deps)
|
||||
"sh"))
|
||||
|
||||
("@CFLAGS@" . ,(or (getenv "CFLAGS") ""))
|
||||
("@HEX2FLAGS@" . ,(or (getenv "HEX2FLAGS") ""))
|
||||
("@M1FLAGS@" . ,(or (getenv "M1FLAGS") ""))
|
||||
|
||||
("mes/module/" . ,(string-append moduledir/))
|
||||
,@(map
|
||||
(lambda (o)
|
||||
(cons (string-append "@" (variable-name o) "@") (or (format #f "~a" (dependency-file-name o)) "")))
|
||||
|
@ -588,35 +626,52 @@ Some influential environment variables:
|
|||
(substitute src pairs #:target target)))
|
||||
'(
|
||||
"build-aux/GNUmakefile.in"
|
||||
"build-aux/config.status.in"
|
||||
"build-aux/config.sh.in"
|
||||
"build-aux/build.sh.in"
|
||||
"build-aux/bootstrap.sh.in"
|
||||
"build-aux/check.sh.in"
|
||||
"build-aux/install.sh.in"
|
||||
"build-aux/pre-inst-env.in"
|
||||
"build-aux/uninstall.sh.in"
|
||||
"mes/module/mes/boot-0.scm.in"
|
||||
"scripts/mesar.in"
|
||||
"scripts/mescc.scm.in"
|
||||
"scripts/mescc.in"
|
||||
))
|
||||
(chmod "pre-inst-env" #o755)
|
||||
(chmod "scripts/mesar" #o755)
|
||||
(chmod "scripts/mescc" #o755)
|
||||
(chmod "scripts/mescc.scm" #o755)
|
||||
(chmod "build.sh" #o755)
|
||||
(chmod "bootstrap.sh" #o755)
|
||||
(chmod "check.sh" #o755)
|
||||
(chmod "install.sh" #o755)
|
||||
(chmod "uninstall.sh" #o755)
|
||||
|
||||
(system* "mkdir" "-p" "include/mes")
|
||||
(let ((pkgdatadir (gulp-pipe* "sh" "-c" (string-append "prefix=" prefix
|
||||
";datadir=" datadir
|
||||
";echo ${datadir}/mes"))))
|
||||
(with-output-to-file "include/mes/config.h"
|
||||
(lambda _
|
||||
(if system-libc?
|
||||
(display "#define SYSTEM_LIBC 1
|
||||
")
|
||||
(display "#undef SYSTEM_LIBC
|
||||
"))
|
||||
(display (string-append "
|
||||
#define MES_VERSION \"" VERSION "\"
|
||||
#define MES_PKGDATADIR \"" pkgdatadir "\"
|
||||
")))))
|
||||
(substitute (string-append srcdest "build-aux/config.make.in") pairs #:target ".config.make"))
|
||||
|
||||
(let ((make (and=> (file-name "make" deps) basename)))
|
||||
(format (current-output-port)
|
||||
"
|
||||
GNU Mes is configured for ~a
|
||||
(display (string-append "
|
||||
GNU Mes is configured for
|
||||
compiler: " compiler "
|
||||
cpu: " mes-cpu "
|
||||
bits: " mes-bits "
|
||||
libc: " mes-libc "
|
||||
kernel: " mes-kernel "
|
||||
system: " mes-system "
|
||||
|
||||
Run:
|
||||
~a to build mes
|
||||
~a help for help on other targets\n"
|
||||
mes-arch
|
||||
(or make "./build.sh")
|
||||
(or make "./build.sh"))))))
|
||||
" (or make "./build.sh") " to build mes
|
||||
" (or make "./build.sh") " help for help on other targets\n"))))))
|
||||
|
|
189
configure.sh
189
configure.sh
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -24,28 +24,60 @@ VERSION=0.19
|
|||
srcdir=${srcdir-$(dirname $0)}
|
||||
. ${srcdest}build-aux/trace.sh
|
||||
|
||||
# parse --mes
|
||||
# parse --with-system-libc
|
||||
cmdline=$(echo " $@")
|
||||
p=${cmdline/ --mes/}
|
||||
if [ "$p" != "$cmdline" ]; then
|
||||
mes_p=${mes_p-1}
|
||||
p=${cmdline/ --with-system-libc/}
|
||||
if test "$p" != "$cmdline"; then
|
||||
mes_libc=${mes_libc-system}
|
||||
else
|
||||
mes_libc=mes
|
||||
fi
|
||||
|
||||
# parse --with-courage
|
||||
cmdline=$(echo " $@")
|
||||
p=${cmdline/ --with-courage/}
|
||||
if test "$p" != "$cmdline"; then
|
||||
courageous=true
|
||||
else
|
||||
courageous=false
|
||||
fi
|
||||
|
||||
# parse --prefix=PREFIX
|
||||
p=${cmdline/ --prefix=/ -prefix=}
|
||||
if [ "$p" != "$cmdline" ]; then
|
||||
if test "$p" != "$cmdline"; then
|
||||
p=${p##* -prefix=}
|
||||
p=${p% *}
|
||||
p=${p% -*}
|
||||
prefix=${p-/usr/local}
|
||||
|
||||
else
|
||||
prefix=${prefix-/usr/local}
|
||||
fi
|
||||
|
||||
# parse --build=BUILD
|
||||
p=${cmdline/ --build=/ -build=}
|
||||
if [ "$p" != "$cmdline" ]; then
|
||||
p=${p##* -build=}
|
||||
p=${p% *}
|
||||
p=${p% -*}
|
||||
build=${p-$build}
|
||||
else
|
||||
build=$build
|
||||
fi
|
||||
|
||||
# parse --host=HOST
|
||||
p=${cmdline/ --host=/ -host=}
|
||||
if [ "$p" != "$cmdline" ]; then
|
||||
p=${p##* -host=}
|
||||
p=${p% *}
|
||||
p=${p% -*}
|
||||
host=${p-$build}
|
||||
elif test -n "$build"; then
|
||||
host=${host-$build}
|
||||
fi
|
||||
|
||||
# parse --program-prefix=
|
||||
p=${cmdline/ --program-prefix=/ -program-prefix=}
|
||||
if [ "$p" != "$cmdline" ]; then
|
||||
if test "$p" != "$cmdline"; then
|
||||
p=${p##* -program-prefix=}
|
||||
p=${p% *}
|
||||
p=${p% -*}
|
||||
|
@ -56,10 +88,11 @@ AR=${AR-$(command -v ar)} || true
|
|||
BASH=${BASH-$(command -v bash)}
|
||||
BLOOD_ELF=${BLOOD_ELF-$(command -v blood-elf)}
|
||||
CC=${CC-$(command -v gcc)} || true
|
||||
DIFF=${DIFF-$(command -v diff || echo $PWD/pre-inst-env diff.scm)}
|
||||
GUILD=${GUILD-$(command -v guild)} || true
|
||||
GUILE_TOOLS=${GUILE_TOOLS-$(command -v guile-tools)} || true
|
||||
if [ ! "$GUILD" ]; then
|
||||
if [ "$GUILE_TOOLS" ]; then
|
||||
if test ! "$GUILD"; then
|
||||
if test "$GUILE_TOOLS"; then
|
||||
GUILD=$GUILE_TOOLS
|
||||
else
|
||||
GUILD=true
|
||||
|
@ -71,9 +104,11 @@ M1=${M1-$(command -v M1)}
|
|||
MES_FOR_BUILD=${MES_FOR_BUILD-$(command -v mes || command -v guile || echo mes)}
|
||||
GIT=${GIT-$(command -v git)} || true
|
||||
PERL=${PERL-$(command -v perl)} || true
|
||||
SHELL=${BASH-$SHELL}
|
||||
|
||||
MES_SEED=${MES_SEED-../mes-seed}
|
||||
|
||||
if [ "$srcdir" = . ]; then
|
||||
if test "$srcdir" = .; then
|
||||
top_builddir=.
|
||||
else
|
||||
srcdest=${srcdest}
|
||||
|
@ -82,7 +117,7 @@ fi
|
|||
abs_top_srcdir=${abs_top_srcdir-$(cd ${srcdir} && pwd)}
|
||||
abs_top_builddir=$PWD
|
||||
|
||||
if [ -z "$GUILE" -o "$GUILE" = true ]; then
|
||||
if test -z "$GUILE" -o "$GUILE" = true; then
|
||||
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-2.2}
|
||||
else
|
||||
GUILE_EFFECTIVE_VERSION=${GUILE_EFFECTIVE_VERSION-$(guile -c '(display (effective-version))')}
|
||||
|
@ -91,27 +126,29 @@ bindir=$(eval echo ${bindir-$prefix/bin})
|
|||
datadir=$(eval echo ${datadir-$prefix/share})
|
||||
docdir=$(eval echo ${docdir-$datadir/doc/mes-$VERSION})
|
||||
infodir=$(eval echo ${infodir-$datadir/info})
|
||||
includedir=$(eval echo ${libdir-$prefix/include})
|
||||
libdir=$(eval echo ${libdir-$prefix/lib})
|
||||
pkgdatadir=$(eval echo ${pkgdatadir-$datadir/mes})
|
||||
mandir=$(eval echo ${mandir-$datadir/man})
|
||||
moduledir=$(eval echo ${moduledir-$datadir/mes/module})
|
||||
moduledir_="$moduledir/"
|
||||
guile_site_dir=$(eval echo ${guile_site_dir-$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION})
|
||||
guile_site_ccache_dir=$(eval echo ${guile_site_ccache_dir-$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache})
|
||||
|
||||
subst () {
|
||||
echo "creating $2"
|
||||
sed \
|
||||
-e s,"@PACKAGE@,$PACKAGE,"\
|
||||
-e s,"@PACKAGE_NAME@,$PACKAGE_NAME,"\
|
||||
-e s,"@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,"\
|
||||
-e s,"@VERSION@,$VERSION,"\
|
||||
-e s,"@arch@,$arch,"\
|
||||
-e s,"@build@,$build,"\
|
||||
-e s,"@host@,$host,"\
|
||||
-e s,"@compiler@,$compiler,"\
|
||||
-e s,"@gcc_p@,$gcc_p,"\
|
||||
-e s,"@mes_p@,$mes_p,"\
|
||||
-e s,"@mesc_p@,$mesc_p,"\
|
||||
-e s,"@tcc_p@,$tcc_p,"\
|
||||
-e s,"@mes_arch@,$mes_arch,"\
|
||||
-e s,"@posix_p@,$posix_p,"\
|
||||
-e s,"@courageous@,$courageous,"\
|
||||
-e s,"@mes_bits@,$mes_bits,"\
|
||||
-e s,"@mes_kernel@,$mes_kernel,"\
|
||||
-e s,"@mes_cpu@,$mes_cpu,"\
|
||||
-e s,"@mes_libc@,$mes_libc,"\
|
||||
-e s,"@mes_system@,$mes_system,"\
|
||||
-e s,"@abs_top_srcdir@,$abs_top_srcdir,"\
|
||||
-e s,"@abs_top_builddir@,$abs_top_builddir,"\
|
||||
-e s,"@top_builddir@,$top_builddir,"\
|
||||
|
@ -125,9 +162,10 @@ subst () {
|
|||
-e s,"@guile_site_dir@,$guile_site_dir,"\
|
||||
-e s,"@guile_site_ccache_dir@,$guile_site_ccache_dir,"\
|
||||
-e s,"@infodir@,$infodir,"\
|
||||
-e s,"@includedir@,$includedir,"\
|
||||
-e s,"@libdir@,$libdir,"\
|
||||
-e s,"@mandir@,$mandir,"\
|
||||
-e s,"@moduledir@,$moduledir,"\
|
||||
-e s,"@pkgdatadir@,$pkgdatadir,"\
|
||||
-e s,"@sysconfdir@,$sysconfdir,"\
|
||||
-e s,"@GUILE_EFFECTIVE_VERSION@,$GUILE_EFFECTIVE_VERSION,"\
|
||||
-e s,"@V@,$V,"\
|
||||
|
@ -135,6 +173,7 @@ subst () {
|
|||
-e s,"@BASH@,$BASH,"\
|
||||
-e s,"@BLOOD_ELF@,$BLOOD_ELF,"\
|
||||
-e s,"@CC@,$CC,"\
|
||||
-e s,"@DIFF@,$DIFF,"\
|
||||
-e s,"@GIT@,$GIT,"\
|
||||
-e s,"@GUILD@,$GUILD,"\
|
||||
-e s,"@GUILE@,$GUILE,"\
|
||||
|
@ -148,72 +187,100 @@ subst () {
|
|||
-e s,"@MES_SEED@,$MES_SEED,"\
|
||||
-e s,"@MES_SEED@,$MES_SEED,"\
|
||||
-e s,"@SHELL@,$SHELL,"\
|
||||
-e s,"mes/module/,$moduledir/,"\
|
||||
$1 > $2
|
||||
}
|
||||
|
||||
subst ${srcdest}build-aux/pre-inst-env.in pre-inst-env
|
||||
chmod +x pre-inst-env
|
||||
subst ${srcdest}scripts/mescc.in scripts/mescc
|
||||
chmod +x scripts/mescc
|
||||
subst ${srcdest}scripts/mescc.scm.in scripts/mescc.scm
|
||||
chmod +x scripts/mescc.scm
|
||||
|
||||
host=${host-$($CC -dumpmachine 2>/dev/null || echo x86)}
|
||||
if [ -z "$host" ]; then
|
||||
arch=${arch-$(get_machine || uname -m)}
|
||||
host=${host-$($CC -dumpmachine 2>/dev/null)}
|
||||
if test -z "$host$host_type"; then
|
||||
mes_cpu=${arch-$(get_machine || uname -m)}
|
||||
else
|
||||
arch=${host%%-*}
|
||||
mes_cpu=${host%%-*}
|
||||
fi
|
||||
if [ "$arch" = i386\
|
||||
-o "$arch" = i486\
|
||||
-o "$arch" = i586\
|
||||
-o "$arch" = i686\
|
||||
]; then
|
||||
arch=x86
|
||||
if test "$mes_cpu" = i386\
|
||||
|| test "$mes_cpu" = i486\
|
||||
|| test "$mes_cpu" = i586\
|
||||
|| test "$mes_cpu" = i686; then
|
||||
mes_cpu=x86
|
||||
fi
|
||||
if test "$mes_cpu" = armv4\
|
||||
|| test "$arch" = armv7l; then
|
||||
mes_cpu=arm
|
||||
fi
|
||||
if test "$mes_cpu" = amd64; then
|
||||
mes_cpu=x86_64
|
||||
fi
|
||||
|
||||
case "$host" in
|
||||
*linux-gnu|*linux)
|
||||
mes_kernel=linux;;
|
||||
*gnu)
|
||||
mes_kernel=gnu;;
|
||||
*)
|
||||
mes_kernel=linux;;
|
||||
esac
|
||||
|
||||
case "$mes_cpu" in
|
||||
x86_64)
|
||||
mes_bits=64;;
|
||||
*)
|
||||
mes_bits=32;;
|
||||
esac
|
||||
#
|
||||
if $CC --version | grep gcc; then #2>/dev/null; then
|
||||
gcc_p=1
|
||||
compiler=gcc
|
||||
elif $CC --version | grep tcc; then #2>/dev/null; then
|
||||
tcc_p=1
|
||||
compiler=tcc
|
||||
compiler=gcc
|
||||
else
|
||||
mes_p=1
|
||||
mesc_p=1
|
||||
compiler=mescc
|
||||
fi
|
||||
|
||||
mes_arch=$arch
|
||||
if [ "$mes_p" -o "$mesc_p" ]; then
|
||||
mes_arch=$arch-mes
|
||||
fi
|
||||
mes_system=$mes_cpu-$mes_kernel-mes
|
||||
|
||||
if [ ! "$mesc_p" ]; then
|
||||
mes_arch=$mes_arch-$compiler
|
||||
fi
|
||||
if [ ! "$mesc_p" -a ! "$mes_p" ]; then
|
||||
posix_p=1
|
||||
fi
|
||||
|
||||
subst ${srcdest}mes/module/mes/boot-0.scm.in mes/module/mes/boot-0.scm
|
||||
subst ${srcdest}build-aux/GNUmakefile.in GNUmakefile
|
||||
subst ${srcdest}build-aux/config.status.in config.status
|
||||
subst ${srcdest}build-aux/build.sh.in build.sh
|
||||
chmod +x build.sh
|
||||
subst ${srcdest}build-aux/config.sh.in config.sh
|
||||
subst ${srcdest}build-aux/bootstrap.sh.in bootstrap.sh
|
||||
chmod +x bootstrap.sh
|
||||
subst ${srcdest}build-aux/build.sh.in build.sh
|
||||
chmod +x build.sh
|
||||
subst ${srcdest}build-aux/check.sh.in check.sh
|
||||
chmod +x check.sh
|
||||
subst ${srcdest}build-aux/install.sh.in install.sh
|
||||
chmod +x install.sh
|
||||
subst ${srcdest}build-aux/pre-inst-env.in pre-inst-env
|
||||
chmod +x pre-inst-env
|
||||
subst ${srcdest}scripts/mesar.in scripts/mesar
|
||||
chmod +x scripts/mesar
|
||||
subst ${srcdest}scripts/mescc.scm.in scripts/mescc.scm
|
||||
chmod +x scripts/mescc.scm
|
||||
subst ${srcdest}scripts/mescc.in scripts/mescc
|
||||
chmod +x scripts/mescc
|
||||
subst ${srcdest}build-aux/uninstall.sh.in uninstall.sh
|
||||
chmod +x uninstall.sh
|
||||
|
||||
mkdir -p include/mes
|
||||
rm -f include/mes/config.h
|
||||
if test $mes_libc = system; then
|
||||
cat >> include/mes/config.h <<EOF
|
||||
#define SYSTEM_LIBC 1
|
||||
EOF
|
||||
else
|
||||
cat >> include/mes/config.h <<EOF
|
||||
#undef SYSTEM_LIBC
|
||||
EOF
|
||||
fi
|
||||
cat >> include/mes/config.h <<EOF
|
||||
#define MES_VERSION "$VERSION"
|
||||
#define MES_PKGDATADIR "$pkgdatadir"
|
||||
EOF
|
||||
|
||||
cat <<EOF
|
||||
GNU Mes is configured for $mes_arch
|
||||
GNU Mes is configured for
|
||||
compiler: $compiler
|
||||
cpu: $mes_cpu
|
||||
bits: $mes_bits
|
||||
libc: $mes_libc
|
||||
kernel: $mes_kernel
|
||||
system: $mes_system
|
||||
|
||||
Run:
|
||||
./build.sh to build mes
|
||||
|
|
|
@ -26,7 +26,7 @@ Gcc-compiled tcc is known to compile GNU Gcc.
|
|||
MesCC (mescc.mes).
|
||||
|
||||
MesCC can compile a modified TinyCC[8] that is close to being
|
||||
self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
|
||||
self-hosting. A GNU Gcc-compiled tcc is known[9] to compile GCC.
|
||||
|
||||
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
|
||||
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||
|
|
|
@ -31,7 +31,7 @@ global variables' insight.
|
|||
MesCC (mescc.mes).
|
||||
|
||||
MesCC can compile a modified TinyCC[8] that is close to being
|
||||
self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
|
||||
self-hosting. A GNU Gcc-compiled tcc is known[9] to compile GCC.
|
||||
|
||||
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
|
||||
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||
|
|
|
@ -25,7 +25,7 @@ MesCC-tools and Mes sources and corresponding ascii/binary seeds.
|
|||
MesCC.
|
||||
|
||||
Mes+MesCC can compile a modified TinyCC[8] that is close to being
|
||||
self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
|
||||
self-hosting. A GNU Gcc-compiled tcc is known[9] to compile GCC.
|
||||
|
||||
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
|
||||
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||
|
|
|
@ -31,7 +31,7 @@ Packages are available from Guix's wip-bootstrap branch.
|
|||
MesCC.
|
||||
|
||||
Mes+MesCC can compile an only slightly patched TinyCC[8] that is
|
||||
self-hosting. A GNU Ccc-compiled tcc is known[9] to compile GCC.
|
||||
self-hosting. A GNU Gcc-compiled tcc is known[9] to compile GCC.
|
||||
|
||||
Mes is inspired by The Maxwell Equations of Software: LISP-1.5[10]
|
||||
-- John McCarthy page 13, GNU Guix's source/binary packaging
|
||||
|
|
|
@ -5,7 +5,8 @@ Subject: GNU Mes 0.19 released
|
|||
We are pleased to announce the release of GNU Mes 0.19, representing
|
||||
100 commits over 10 weeks.
|
||||
|
||||
Mes has now brought the Reduced Binary Seed bootstrap to Guix and work
|
||||
Mes has now brought the Reduced Binary Seed bootstrap to Guix (bootstrap
|
||||
a GNU/Linux system without binary GNU toolchain or equivalent) and work
|
||||
is ongoing to audit and verify this bootstrap path in NixOS.
|
||||
|
||||
This release introduces strings as byte-array, hash-tables and native
|
||||
|
@ -68,8 +69,8 @@ Packages are available from Guix's core-updates branch.
|
|||
|
||||
Here are the MD5 and SHA1 checksums:
|
||||
|
||||
f9f901f175fbc8a5a3d90c9c551ccc8c mes-0.19.tar.gz
|
||||
4f7612731a745ebb806548186453d55e0d0bf217 mes-0.19.tar.gz
|
||||
99e134df87adc5fc5fd2c04941929c23 mes-0.19.tar.gz
|
||||
c9781b3b6a814acc985c2ac68caa111a56583bca mes-0.19.tar.gz
|
||||
|
||||
[*] Use a .sig file to verify that the corresponding file (without the
|
||||
.sig suffix) is intact. First, be sure to download both the .sig file
|
||||
|
@ -131,7 +132,7 @@ installed in Guix from a git checkout by running
|
|||
** Noteworthy bug fixes
|
||||
*** Mes now supports characters #\xNN.
|
||||
*** Mes now supports assq-ref and assoc-ref with alist == #f.
|
||||
*** Mes now support \xNN in strings. Fixes using Nyacc-0.86.0.
|
||||
*** Mes now supports \xNN in strings. This allows using Nyacc-0.86.0.
|
||||
*** MesCC now supports the unary plus operator.
|
||||
*** MesCC now supports the `U' integer suffix.
|
||||
*** MesCC now comes with INTnn_MIN/MAX, UINTnn defines in stdint.h.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
-*- org -*-
|
||||
#+TITLE: GNU Mes images
|
||||
|
||||
Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
|
@ -9,6 +9,5 @@ Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
|||
|
||||
gcc-mesboot-graph.dot
|
||||
This graph is generated from Guix wip-bootstrap, doing:
|
||||
sed -i s,package-with-bootstrap-guile,identity, gnu/packages/{commencement,mes}.scm
|
||||
~/src/guix-bootstrap/pre-inst-env guix graph gcc-mesboot > doc/images/gcc-mesboot-graph.dot
|
||||
~/src/guix/core-updates/pre-inst-env guix graph --type=bag -e '(@@ (gnu packages commencement) gcc-mesboot)' > doc/images/gcc-mesboot-graph.dot
|
||||
dot -T png doc/images/gcc-mesboot-graph.dot > doc/images/gcc-mesboot-graph.png
|
||||
|
|
|
@ -1,124 +1,123 @@
|
|||
digraph "Guix bag" {
|
||||
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" [label = "gcc-mesboot@4.9.4", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/7nv5rwsxx4v2g5fgbilj0c96gx34897q-gcc-mesboot1-wrapper-4.7.4.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/k9iiipnm44yl1j7lq1b4llh9fmjb482i-gcc-mesboot-4.9.4.drv" -> "/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" [label = "binutils-mesboot@2.20.1a", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [color = darkviolet];
|
||||
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkviolet];
|
||||
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" [color = darkviolet];
|
||||
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet];
|
||||
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet];
|
||||
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkviolet];
|
||||
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkviolet];
|
||||
"/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = darkviolet];
|
||||
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [label = "binutils-mesboot0@2.20.1a", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" [color = red];
|
||||
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = red];
|
||||
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = red];
|
||||
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = red];
|
||||
"/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = red];
|
||||
"/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" [label = "tcc-boot@0.9.27", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" -> "/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" -> "/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" [label = "mes-boot@0.18", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" -> "/gnu/store/q6bf80szhn5cfyhyl7m2aakj4f7hlyrh-mescc-tools-boot-0.5.2.drv" [color = cyan3];
|
||||
"/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = cyan3];
|
||||
"/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" -> "/gnu/store/gz3agxnnlgkafw2c8jnvk2hqmlh85pkc-guile-bootstrap-2.0.drv" [color = cyan3];
|
||||
"/gnu/store/q6bf80szhn5cfyhyl7m2aakj4f7hlyrh-mescc-tools-boot-0.5.2.drv" [label = "mescc-tools-boot@0.5.2", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/q6bf80szhn5cfyhyl7m2aakj4f7hlyrh-mescc-tools-boot-0.5.2.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet];
|
||||
"/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [label = "bootstrap-binaries@0", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/gz3agxnnlgkafw2c8jnvk2hqmlh85pkc-guile-bootstrap-2.0.drv" [label = "guile-bootstrap@2.0", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" [label = "tcc-boot0@0.9.26-4.46ee3f1", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" -> "/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" [color = darkseagreen];
|
||||
"/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" -> "/gnu/store/q6bf80szhn5cfyhyl7m2aakj4f7hlyrh-mescc-tools-boot-0.5.2.drv" [color = darkseagreen];
|
||||
"/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/4lbzsyzndxc3pp0rqd7qkd2fr278xnrb-tcc-boot0-0.9.26-4.46ee3f1.drv" -> "/gnu/store/gz3agxnnlgkafw2c8jnvk2hqmlh85pkc-guile-bootstrap-2.0.drv" [color = darkseagreen];
|
||||
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [label = "diffutils-mesboot@2.7", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" -> "/gnu/store/gvh2cb2arylz028y5ak3c9s4gxngfj50-mes-boot-0.18.drv" [color = red];
|
||||
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" -> "/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" [color = red];
|
||||
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = red];
|
||||
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = red];
|
||||
"/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = red];
|
||||
"/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [label = "make-mesboot0@3.80", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" -> "/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" [color = blue];
|
||||
"/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = blue];
|
||||
"/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = blue];
|
||||
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [label = "glibc-mesboot0@2.2.5", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [color = dimgrey];
|
||||
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" [color = dimgrey];
|
||||
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = dimgrey];
|
||||
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/sivwa9pmj19nfad8zavgqjll11hahcyb-mesboot-headers-0.18.drv" [color = dimgrey];
|
||||
"/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = dimgrey];
|
||||
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" [label = "gcc-core-mesboot@2.95.3", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/15srbzj4y43vwfv79fxf1v1ajjw5kjwa-tcc-boot-0.9.27.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/sivwa9pmj19nfad8zavgqjll11hahcyb-mesboot-headers-0.18.drv" [label = "mesboot-headers@0.18", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/sivwa9pmj19nfad8zavgqjll11hahcyb-mesboot-headers-0.18.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet];
|
||||
"/gnu/store/sivwa9pmj19nfad8zavgqjll11hahcyb-mesboot-headers-0.18.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkviolet];
|
||||
"/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [label = "linux-libre-headers-bootstrap@0", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" [label = "gcc-mesboot0@2.95.3", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [color = darkviolet];
|
||||
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/3hqzkw9ag2f3p1skzynr0wq3499ghmsf-gcc-core-mesboot-2.95.3.drv" [color = darkviolet];
|
||||
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkviolet];
|
||||
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet];
|
||||
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkviolet];
|
||||
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkviolet];
|
||||
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkviolet];
|
||||
"/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = darkviolet];
|
||||
"/gnu/store/7nv5rwsxx4v2g5fgbilj0c96gx34897q-gcc-mesboot1-wrapper-4.7.4.drv" [label = "gcc-mesboot1-wrapper@4.7.4", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/7nv5rwsxx4v2g5fgbilj0c96gx34897q-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = blue];
|
||||
"/gnu/store/7nv5rwsxx4v2g5fgbilj0c96gx34897q-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" [color = blue];
|
||||
"/gnu/store/7nv5rwsxx4v2g5fgbilj0c96gx34897q-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" [color = blue];
|
||||
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" [label = "glibc-mesboot@2.16.0", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" [color = darkseagreen];
|
||||
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkseagreen];
|
||||
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" [color = darkseagreen];
|
||||
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" [color = darkseagreen];
|
||||
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkseagreen];
|
||||
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/1aqmzzsa18kmckm6jw9slr4i0xkrw9g0-glibc-mesboot-2.16.0.drv" -> "/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" [color = darkseagreen];
|
||||
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" [label = "glibc-headers-mesboot@2.16.0", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" [color = darkseagreen];
|
||||
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkseagreen];
|
||||
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" [color = darkseagreen];
|
||||
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/sivwa9pmj19nfad8zavgqjll11hahcyb-mesboot-headers-0.18.drv" [color = darkseagreen];
|
||||
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkseagreen];
|
||||
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/hcyw9rs7n3w9kj3xf230509fhjqfxcvj-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" [color = darkseagreen];
|
||||
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" [label = "gcc-mesboot1@4.7.4", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/rpz0s3f2cfhsvj6734ss2j4jqisly67x-binutils-mesboot-2.20.1a.drv" [color = darkseagreen];
|
||||
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" [color = darkseagreen];
|
||||
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkseagreen];
|
||||
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/jrqric1r8zyiw50rzb6q2mrfhf3yi0nc-diffutils-mesboot-2.7.drv" [color = darkseagreen];
|
||||
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/9bi0anc7vq3m6zm845wyaq9mfdasyqkg-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" [color = darkseagreen];
|
||||
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" [label = "make-mesboot@3.82", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/6112c8hrb47fd1svdjyaiy79x3r1ryv3-binutils-mesboot0-2.20.1a.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/yc8llxzasyyq94h71knnd3p0fqkbhd37-glibc-mesboot0-2.2.5.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/20r0xxzq1nah1rx23sv5d22sjlinj820-gcc-mesboot0-2.95.3.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/qkrrqygyc11bq450xq4jxkaj4aqf8xlv-make-mesboot0-3.80.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/ksmskl74pjjanjvak62pnyxpkphylrnf-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/b84wdn9yjagp0z7dklqaac3nhabllcxp-make-mesboot-3.82.drv" -> "/gnu/store/72kjcwwjxbkhblx6wrfd7kn2y0lmfyy0-linux-libre-headers-bootstrap-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" [label = "gcc-mesboot@4.9.4", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" [color = magenta];
|
||||
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/7v6fpp5msmjbhmprikrfcj047016gd54-gcc-mesboot1-wrapper-4.7.4.drv" [color = magenta];
|
||||
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" [color = magenta];
|
||||
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" [color = magenta];
|
||||
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = magenta];
|
||||
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = magenta];
|
||||
"/gnu/store/q8f5yjxp0kcdn2mwqf83bvhal71cnr71-gcc-mesboot-4.9.4.drv" -> "/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" [color = magenta];
|
||||
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" [label = "binutils-mesboot@2.20.1a", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [color = magenta];
|
||||
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = magenta];
|
||||
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" [color = magenta];
|
||||
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = magenta];
|
||||
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = magenta];
|
||||
"/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = magenta];
|
||||
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [label = "binutils-mesboot0@2.20.1a", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" [color = red];
|
||||
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = red];
|
||||
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = red];
|
||||
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = red];
|
||||
"/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = red];
|
||||
"/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" [label = "tcc-boot@0.9.27", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" -> "/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" [color = dimgrey];
|
||||
"/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" -> "/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" [color = dimgrey];
|
||||
"/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||
"/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" [label = "mes-boot@0.19", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" -> "/gnu/store/msykyiih9lwrd86x00vs00i8s5ipjks4-bootstrap-mescc-tools-0.5.2.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" -> "/gnu/store/cfw60j3987wrvb26f2bpbw5l5q6q53fj-bootstrap-mes-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/msykyiih9lwrd86x00vs00i8s5ipjks4-bootstrap-mescc-tools-0.5.2.drv" [label = "bootstrap-mescc-tools@0.5.2", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [label = "bootstrap-binaries@0", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/cfw60j3987wrvb26f2bpbw5l5q6q53fj-bootstrap-mes-0.drv" [label = "bootstrap-mes@0", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" [label = "tcc-boot0@0.9.26-6.c004e9a", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" [color = magenta];
|
||||
"/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/msykyiih9lwrd86x00vs00i8s5ipjks4-bootstrap-mescc-tools-0.5.2.drv" [color = magenta];
|
||||
"/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||
"/gnu/store/nvhjn6b5hi4mj7wnjxrmj0dmdigq9m2z-tcc-boot0-0.9.26-6.c004e9a.drv" -> "/gnu/store/cfw60j3987wrvb26f2bpbw5l5q6q53fj-bootstrap-mes-0.drv" [color = magenta];
|
||||
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [label = "diffutils-mesboot@2.7", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" -> "/gnu/store/mw6swkryp89aml4jzac5lm8kmcv5k6gy-mes-boot-0.19.drv" [color = peachpuff4];
|
||||
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" -> "/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" [color = peachpuff4];
|
||||
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = peachpuff4];
|
||||
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = peachpuff4];
|
||||
"/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = peachpuff4];
|
||||
"/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [label = "make-mesboot0@3.80", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" -> "/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" [color = dimgrey];
|
||||
"/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||
"/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [label = "glibc-mesboot0@2.2.5", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [color = red];
|
||||
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" [color = red];
|
||||
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = red];
|
||||
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = red];
|
||||
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = red];
|
||||
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/hnxdqmhjdvh1ra9ar4lxl25xf6a7bhzz-mesboot-headers-0.19.drv" [color = red];
|
||||
"/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = red];
|
||||
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" [label = "gcc-core-mesboot@2.95.3", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [color = dimgrey];
|
||||
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/fglx0fz62bygkdxxg878j7x9pfl37zhh-tcc-boot-0.9.27.drv" [color = dimgrey];
|
||||
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = dimgrey];
|
||||
"/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = dimgrey];
|
||||
"/gnu/store/hnxdqmhjdvh1ra9ar4lxl25xf6a7bhzz-mesboot-headers-0.19.drv" [label = "mesboot-headers@0.19", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/hnxdqmhjdvh1ra9ar4lxl25xf6a7bhzz-mesboot-headers-0.19.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = blue];
|
||||
"/gnu/store/hnxdqmhjdvh1ra9ar4lxl25xf6a7bhzz-mesboot-headers-0.19.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = blue];
|
||||
"/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [label = "linux-libre-headers-bootstrap@0", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" [label = "gcc-mesboot0@2.95.3", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [color = darkseagreen];
|
||||
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/kcyh6k46ijm9nsq1as26rr0aq7rkx4f7-gcc-core-mesboot-2.95.3.drv" [color = darkseagreen];
|
||||
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = darkseagreen];
|
||||
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = darkseagreen];
|
||||
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = darkseagreen];
|
||||
"/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = darkseagreen];
|
||||
"/gnu/store/7v6fpp5msmjbhmprikrfcj047016gd54-gcc-mesboot1-wrapper-4.7.4.drv" [label = "gcc-mesboot1-wrapper@4.7.4", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/7v6fpp5msmjbhmprikrfcj047016gd54-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = red];
|
||||
"/gnu/store/7v6fpp5msmjbhmprikrfcj047016gd54-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" [color = red];
|
||||
"/gnu/store/7v6fpp5msmjbhmprikrfcj047016gd54-gcc-mesboot1-wrapper-4.7.4.drv" -> "/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" [color = red];
|
||||
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" [label = "glibc-mesboot@2.16.0", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" [color = magenta];
|
||||
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = magenta];
|
||||
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" [color = magenta];
|
||||
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" [color = magenta];
|
||||
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = magenta];
|
||||
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = magenta];
|
||||
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = magenta];
|
||||
"/gnu/store/lp6fycqqd8adndlfylh4mlihm0qakxzw-glibc-mesboot-2.16.0.drv" -> "/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" [color = magenta];
|
||||
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" [label = "glibc-headers-mesboot@2.16.0", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/hnxdqmhjdvh1ra9ar4lxl25xf6a7bhzz-mesboot-headers-0.19.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/p9sl13frcs2wdcddkh20hc51l7lpavza-glibc-headers-mesboot-2.16.0.drv" -> "/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" [color = darkgoldenrod];
|
||||
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" [label = "gcc-mesboot1@4.7.4", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/2lpg626q4x8v7hgqajywpq1rc8y72hzx-binutils-mesboot-2.20.1a.drv" [color = cyan3];
|
||||
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" [color = cyan3];
|
||||
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = cyan3];
|
||||
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = cyan3];
|
||||
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = cyan3];
|
||||
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/r50fj43103526ga6pi2f9jkk4gvaav7m-diffutils-mesboot-2.7.drv" [color = cyan3];
|
||||
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = cyan3];
|
||||
"/gnu/store/7pllq0crksfkr7856y1pawcy4scc7l4q-gcc-mesboot1-4.7.4.drv" -> "/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" [color = cyan3];
|
||||
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" [label = "make-mesboot@3.82", shape = box, fontname = Helvetica];
|
||||
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/x9shp86cz9f4rb5xvhs37zzxg1ngi4dr-binutils-mesboot0-2.20.1a.drv" [color = dimgrey];
|
||||
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/2633565gzh4jqh7c5zf6i0iy9yxqigcv-glibc-mesboot0-2.2.5.drv" [color = dimgrey];
|
||||
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/slnyk8gbnvfwy1m1was8myivpss58idd-gcc-mesboot0-2.95.3.drv" [color = dimgrey];
|
||||
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/57da9mdiqhyn72m8wv00pdvzqi2ng4xb-make-mesboot0-3.80.drv" [color = dimgrey];
|
||||
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/7wqw4023spvggi15vcxyxvivxa4rmmv8-bootstrap-binaries-0.drv" [color = dimgrey];
|
||||
"/gnu/store/5ad88jy4a1gpbslzdiksk7zjyh28wzkr-make-mesboot-3.82.drv" -> "/gnu/store/r0z9bix88pz0wf6sgcn9185iwcsdracs-linux-libre-headers-bootstrap-0.drv" [color = dimgrey];
|
||||
|
||||
}
|
||||
|
|
83
doc/mes.texi
83
doc/mes.texi
|
@ -34,7 +34,7 @@ Documentation License''.
|
|||
|
||||
@titlepage
|
||||
@title GNU Mes Reference Manual
|
||||
@subtitle Full Source Bootstrapping of the GNU GuixSD Operating System
|
||||
@subtitle Full Source Bootstrapping of the GNU Guix Operating System
|
||||
@author Jan (janneke) Nieuwenhuizen
|
||||
|
||||
@page
|
||||
|
@ -169,7 +169,7 @@ For all softwares on such a system we have the full source code and
|
|||
build recipes available.
|
||||
|
||||
@c The Free System Distribution Guidelines (GNU FSDG)@footnote{Examples of
|
||||
@c free operating systems are GNU GuixSD, GNU Parabola and Trisquel, see
|
||||
@c free operating systems are GNU Guix, GNU Parabola and Trisquel, see
|
||||
@c https://www.gnu.org/distros/free-system-distribution-guidelines.html}
|
||||
@c can serve as help to create such a system
|
||||
|
||||
|
@ -253,7 +253,7 @@ binary seed that all software distributions inject are the so called
|
|||
@emph{bootstrap binaries}. Bootstrap binaries are the initial binary
|
||||
seeds that are used to start building the distribution.
|
||||
|
||||
The GNU GuixSD operating system has a relatively small closure of
|
||||
The GNU Guix operating system has a relatively small closure of
|
||||
bootstrap binaries: GNU binutils, GNU gcc, GNU Libc, GNU Guile, and
|
||||
``Static binaries'' (think: bash, bzip2, coreutils, gawk, grep, gzip,
|
||||
patch, sed, tar, xz).
|
||||
|
@ -553,7 +553,7 @@ Recipe for yogurt: Add yogurt to milk.
|
|||
@end quotation
|
||||
|
||||
The bootstrap problem we have set out to solve is that none of our
|
||||
modern software distributions, and GuixSD in particular, can be created
|
||||
modern software distributions, and Guix in particular, can be created
|
||||
all from source code. In addition to the carefully signed source code
|
||||
of all the programs (the `milk') an opaque binary seed (the `yogurt') is
|
||||
injected as an essential dependency.
|
||||
|
@ -592,8 +592,8 @@ responsibility.
|
|||
|
||||
The Mes full source bootstrap process@footnote{TBH, the current state of
|
||||
affairs demands to label this a `Reduced Binary Seed bootstrap'} is
|
||||
currently being developed in GuixSD@footnote{See
|
||||
@file{gnu/packages/commencement.scm} in the @var{core-updates-next} branch in Guix
|
||||
currently being developed in Guix@footnote{See
|
||||
@file{gnu/packages/commencement.scm} in the @var{core-updates} branch in Guix
|
||||
git
|
||||
@url{http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/mes.scm?h=wip-bootstrap}}.
|
||||
In it's intiial form it is only available for x86-linux.
|
||||
|
@ -622,11 +622,11 @@ glibc-source + binutils + gcc + glibc0 => glibc
|
|||
|
||||
@c This graph is generated from wip-bootstrap, doing:
|
||||
|
||||
@c ~/src/guix-boot/pre-inst-env guix graph --type=bag -e '(@@ (gnu packages commencement) gcc-mesboot)' doc/images/gcc-mesboot-graph.dot
|
||||
@c ~/src/guix/core-updates/pre-inst-env guix graph --type=bag -e '(@@ (gnu packages commencement) gcc-mesboot)' > doc/images/gcc-mesboot-graph.dot
|
||||
@c dot -T png doc/images/gcc-mesboot-graph.dot > doc/images/gcc-mesboot-graph.png
|
||||
|
||||
Here's a generated dependency diagram to for the final bootstrap gcc
|
||||
that builds the rest of GuixSD
|
||||
that builds the rest of Guix.
|
||||
|
||||
@image{images/gcc-mesboot-graph,2in,,Reference graph of the gcc-mesboot}
|
||||
|
||||
|
@ -757,6 +757,11 @@ The initial size of the arena @pxref{5.3,,, sicp, SICP} in cells. Default: 20,0
|
|||
|
||||
The maximum size of the arena in cells. Default: 100,000,000.
|
||||
|
||||
@item MES_MAX_STRING
|
||||
@vindex MES_MAX_STRING
|
||||
|
||||
The maximum size of a string. Default: 524,288.
|
||||
|
||||
@item MES_DEBUG
|
||||
@vindex MES_DEBUG
|
||||
|
||||
|
@ -814,6 +819,12 @@ The @var{option}s can be among the following:
|
|||
|
||||
@table @code
|
||||
|
||||
@item --align
|
||||
align globals
|
||||
|
||||
@item --base-address=ADRRESS
|
||||
use BaseAddress ADDRESS [0x1000000]
|
||||
|
||||
@item -c
|
||||
@cindex compile
|
||||
preprocess, compile and assemble only; do not link
|
||||
|
@ -821,6 +832,12 @@ preprocess, compile and assemble only; do not link
|
|||
@item -D @var{DEFINE}[=@var{VALUE}]
|
||||
@cindex define DEFINE [VALUE=1]
|
||||
|
||||
@item -dumpmachine
|
||||
@cindex arch
|
||||
@cindex architecture
|
||||
@cindex machine
|
||||
display the compiler's target processor
|
||||
|
||||
@item -E
|
||||
preprocess only; do not compile, assemble or link
|
||||
|
||||
|
@ -842,18 +859,30 @@ append DIR to library path
|
|||
@item -l LIBNAME
|
||||
link with LIBNAME
|
||||
|
||||
@item -m BITS
|
||||
compile for BITS bits [32]
|
||||
|
||||
@item -O LEVEL
|
||||
use optimizing LEVEL
|
||||
|
||||
@item -o FILE
|
||||
write output to FILE
|
||||
|
||||
@item -S
|
||||
preprocess and compile only; do not assemble or link
|
||||
|
||||
@item --std=STANDARD
|
||||
assume that the input sources are for STANDARD
|
||||
|
||||
@item -v, --version
|
||||
display version and exit
|
||||
|
||||
@item -w,--write=TYPE
|
||||
dump Nyacc AST using TYPE @{pretty-print,write@}
|
||||
|
||||
@item -x LANGUAGE
|
||||
specify LANGUAGE of the following input files
|
||||
|
||||
@end table
|
||||
|
||||
@menu
|
||||
|
@ -897,6 +926,7 @@ during the parsing phase.
|
|||
@menu
|
||||
* Building from Git:: The latest and greatest.
|
||||
* Running Mes From the Source Tree:: Hacker tricks.
|
||||
* Porting GNU Mes:: Teach Mes about your platform.
|
||||
* The Perfect Setup:: The right tools.
|
||||
* Coding Style:: Hygiene of the contributor.
|
||||
* Submitting Patches:: Share your work.
|
||||
|
@ -918,7 +948,7 @@ all the dependencies and appropriate environment variables are set up to
|
|||
hack on Mes:
|
||||
|
||||
@example
|
||||
guix environment -l guix.scm
|
||||
guix environment -l .guix.scm
|
||||
@end example
|
||||
|
||||
Finally, you have to invoke @code{make check} to run tests
|
||||
|
@ -934,6 +964,39 @@ available (@pxref{Building from Git}), and then simply prefix each
|
|||
command by @command{./pre-inst-env} (the @file{pre-inst-env} script
|
||||
lives in the top build tree of Mes).
|
||||
|
||||
@node Porting GNU Mes
|
||||
@section Porting GNU Mes
|
||||
|
||||
Mes was written for x86-linux. A 64 bit (x86_64) is almost done, only a
|
||||
few bugs remain. The Guix bootstrap for x86_64 uses x86 mes and that is
|
||||
not expected to change.
|
||||
|
||||
An ARM (armv4/armv7l) linux port is underway. A port to GNU/Hurd
|
||||
(x86-gnu) is also underway.
|
||||
|
||||
Initial scaffold, built by @file{build-aux/build-scaffold.sh}:
|
||||
@example
|
||||
@file{lib/x86-mes-gcc/exit-42.S}
|
||||
@file{lib/x86-mes/elf32-0exit-42.hex2}
|
||||
@file{lib/x86-mes/elf32-body-exit-42.hex2}
|
||||
|
||||
@file{lib/x86-mes-gcc/hello-mes.S}
|
||||
@file{lib/x86-mes/elf32-0hello-mes.hex2}
|
||||
@file{lib/x86-mes/elf32-body-hello-mes.hex2}
|
||||
@end example
|
||||
|
||||
Porting MesCC:
|
||||
@example
|
||||
@file{lib/x86-mes/x86.M1}
|
||||
|
||||
@file{module/mescc/mescc.scm}
|
||||
@file{module/mescc/i386/as.scm}
|
||||
@file{module/mescc/i386/info.scm}
|
||||
|
||||
@file{mes/module/mescc/i386/as.mes}
|
||||
@file{mes/module/mescc/i386/info.mes}
|
||||
@end example
|
||||
|
||||
@node The Perfect Setup
|
||||
@section The Perfect Setup
|
||||
|
||||
|
@ -1041,7 +1104,7 @@ Please send bug reports with full details to @email{bug-mes@@gnu.org}.
|
|||
We would like to thank the following people for their help: Jeremiah
|
||||
Orians, Peter de Wachter, rain1, Ricardo Wurmus, Rutger van Beusekom.
|
||||
|
||||
We also thank Ludovic Courtès for creating GuixSD and making the
|
||||
We also thank Ludovic Courtès for creating GNU Guix and making the
|
||||
bootstrap problem so painfully visible, John McCarthy for creating
|
||||
LISP-1.5 and Alan Kay for their inspiring comment on
|
||||
@url{https://queue.acm.org/detail.cfm?id=1039523, Page 13}.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; .guix.scm -- Guix package definition
|
||||
;;; guix.scm -- Guix package definition
|
||||
|
||||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Mes.
|
||||
;;;
|
||||
|
@ -22,19 +22,21 @@
|
|||
;;
|
||||
;; GNU Guix development package. To build and install, run:
|
||||
;;
|
||||
;; guix package -f .guix.scm
|
||||
;; guix package -f guix.scm
|
||||
;;
|
||||
;; To build it, but not install it, run:
|
||||
;;
|
||||
;; guix build -f .guix.scm
|
||||
;; guix build -f guix.scm
|
||||
;;
|
||||
;; To use as the basis for a development environment, run:
|
||||
;;
|
||||
;; guix environment -l .guix.scm
|
||||
;; guix environment -l guix.scm
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
(set! %load-path (cons "guix" %load-path))
|
||||
(define %source-dir (dirname (current-filename)))
|
||||
(add-to-load-path (string-append %source-dir "/guix"))
|
||||
|
||||
(use-modules (git mes))
|
||||
|
||||
;; Return it here so `guix build/environment/package' can consume it directly.
|
124
guix/git/mes.scm
124
guix/git/mes.scm
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Mes --- Maxwell Equations of Software
|
||||
;;; Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;; Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Mes.
|
||||
;;;
|
||||
|
@ -38,8 +38,8 @@
|
|||
#:use-module (gnu packages package-management)
|
||||
#:use-module (gnu packages version-control)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages texinfo)
|
||||
#:use-module ((guix build utils) #:select (with-directory-excursion))
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (guix gexp)
|
||||
|
@ -50,37 +50,67 @@
|
|||
|
||||
(define %source-dir (getcwd))
|
||||
|
||||
(define git-file?
|
||||
(let* ((pipe (with-directory-excursion %source-dir
|
||||
(open-pipe* OPEN_READ "git" "ls-files")))
|
||||
(files (let loop ((lines '()))
|
||||
(match (read-line pipe)
|
||||
((? eof-object?)
|
||||
(reverse lines))
|
||||
(line
|
||||
(loop (cons line lines))))))
|
||||
(status (close-pipe pipe)))
|
||||
(lambda (file stat)
|
||||
(match (stat:type stat)
|
||||
('directory #t)
|
||||
((or 'regular 'symlink)
|
||||
(any (cut string-suffix? <> file) files))
|
||||
(_ #f)))))
|
||||
(define-public mescc-tools
|
||||
(package
|
||||
(name "mescc-tools")
|
||||
(version "0.6.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"http://git.savannah.nongnu.org/cgit/mescc-tools.git/snapshot/"
|
||||
name "-Release_" version
|
||||
".tar.gz"))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1dmni3q1l36n7y4dzpzqb60d970d8xmaznl88gaa4lhinkr4bl3i"))))
|
||||
(build-system gnu-build-system)
|
||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
||||
(arguments
|
||||
`(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
|
||||
"CC=gcc")
|
||||
#:test-target "test"
|
||||
#:phases (modify-phases %standard-phases
|
||||
(delete 'configure))))
|
||||
(synopsis "Tools for the full source bootstrapping process")
|
||||
(description
|
||||
"Mescc-tools is a collection of tools for use in a full source
|
||||
bootstrapping process. It consists of the M1 macro assembler, the hex2
|
||||
linker, the blood-elf symbol table generator, the kaem shell, exec_enable and
|
||||
get_machine.")
|
||||
(home-page "https://savannah.nongnu.org/projects/mescc-tools")
|
||||
(license gpl3+)))
|
||||
|
||||
(define-public nyacc
|
||||
(package
|
||||
(name "nyacc")
|
||||
(version "0.86.0")
|
||||
(version "0.99.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://savannah/nyacc/"
|
||||
name "-" version ".tar.gz"))
|
||||
(patches (search-patches "nyacc-binary-literals.patch"))
|
||||
(uri (string-append "mirror://savannah/nyacc/nyacc-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0lkd9lyspvhxlfs0496gsllwinh62jk9wij6gpadvx9gwz6yavd9"))))
|
||||
"0hl5qxx19i4x1r0839sxm19ziqq65g4hy97yik81cc2yb9yvgyv3"))
|
||||
(modules '((guix build utils)))
|
||||
(snippet
|
||||
'(begin
|
||||
(substitute* (find-files "." "^Makefile\\.in$")
|
||||
(("^SITE_SCM_DIR =.*")
|
||||
"SITE_SCM_DIR = \
|
||||
@prefix@/share/guile/site/@GUILE_EFFECTIVE_VERSION@\n")
|
||||
(("^SITE_SCM_GO_DIR =.*")
|
||||
"SITE_SCM_GO_DIR = \
|
||||
@prefix@/lib/guile/@GUILE_EFFECTIVE_VERSION@/site-ccache\n")
|
||||
(("^INFODIR =.*")
|
||||
"INFODIR = @prefix@/share/info\n")
|
||||
(("^DOCDIR =.*")
|
||||
"DOCDIR = @prefix@/share/doc/$(PACKAGE_TARNAME)\n"))
|
||||
#t))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs
|
||||
`(("pkg-config" ,pkg-config)))
|
||||
(inputs
|
||||
`(("guile" ,guile-2.2)))
|
||||
(synopsis "LALR(1) Parser Generator in Guile")
|
||||
(description
|
||||
|
@ -90,39 +120,9 @@ extensive examples, including parsers for the Javascript and C99 languages.")
|
|||
(home-page "https://savannah.nongnu.org/projects/nyacc")
|
||||
(license (list gpl3+ lgpl3+))))
|
||||
|
||||
(define-public mescc-tools
|
||||
(package
|
||||
(name "mescc-tools")
|
||||
(version "0.5.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://git.savannah.nongnu.org/cgit/"
|
||||
"mescc-tools.git/snapshot/"
|
||||
"mescc-tools-Release_" version
|
||||
".tar.gz"))
|
||||
(patches (search-patches "mescc-tools-boot.patch"))
|
||||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"01x7bhmgwyf6mc2g1hcvibhps98nllacqm4f0j5l51b1mbi18pc2"))))
|
||||
(build-system gnu-build-system)
|
||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
||||
(arguments
|
||||
`(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
|
||||
#:test-target "test"
|
||||
#:phases (modify-phases %standard-phases
|
||||
(delete 'configure))))
|
||||
(synopsis "Tools for the full source bootstrapping process")
|
||||
(description
|
||||
"Mescc-tools is a collection of tools for use in a full source
|
||||
bootstrapping process. Currently consists of the M1 macro assembler and the
|
||||
hex2 linker.")
|
||||
(home-page "https://github.com/oriansj/mescc-tools")
|
||||
(license gpl3+)))
|
||||
|
||||
(define-public mes
|
||||
(let ((triplet "i686-unknown-linux-gnu")
|
||||
(version "0.19"))
|
||||
(version "0.20"))
|
||||
(package
|
||||
(name "mes")
|
||||
(version version)
|
||||
|
@ -131,7 +131,7 @@ hex2 linker.")
|
|||
(uri (string-append
|
||||
"https://ftp.gnu.org/pub/gnu/mes/mes-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 #!mes!# "1dsaaqyanzsq9m5wrcd2bjhb3qd6928c9q97rg5r730pyqjwxyxf"))))
|
||||
(base32 #!mes!# "06qkwkahcpzk5v4qydpvcvzm7lx8g8pflc48f9l7bpjz6hl5lk4s"))))
|
||||
(build-system gnu-build-system)
|
||||
(supported-systems '("i686-linux" "x86_64-linux"))
|
||||
(propagated-inputs
|
||||
|
@ -152,13 +152,7 @@ hex2 linker.")
|
|||
("perl" ,perl) ; build-aux/gitlog-to-changelog
|
||||
("texinfo" ,texinfo)))
|
||||
(arguments
|
||||
`(#:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'build 'make-git-source-writable
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(for-each make-file-writable
|
||||
(find-files "." ".*\\.M1")))))))
|
||||
`(#:strip-binaries? #f)) ; binutil's strip b0rkes MesCC/M1/hex2 binaries
|
||||
(synopsis "Scheme interpreter and C compiler for full source bootstrapping")
|
||||
(description
|
||||
"GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed
|
||||
|
@ -170,11 +164,13 @@ Guile.")
|
|||
(license gpl3+))))
|
||||
|
||||
(define-public mes.git
|
||||
(let ((version "0.19")
|
||||
(let ((version "0.20")
|
||||
(revision "0")
|
||||
(commit (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ))))
|
||||
(package
|
||||
(inherit mes)
|
||||
(name "mes.git")
|
||||
(version (string-append version "-" revision "." (string-take commit 7)))
|
||||
(source (local-file %source-dir #:recursive? #t #:select? git-file?)))))
|
||||
(source (local-file %source-dir
|
||||
#:recursive? #t
|
||||
#:select? (git-predicate %source-dir))))))
|
||||
|
|
|
@ -1,222 +0,0 @@
|
|||
From c184e95096881a13f29ebd7fc507fe305d3d8de5 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Nieuwenhuizen <janneke@gnu.org>
|
||||
Date: Thu, 4 Oct 2018 22:03:31 +0200
|
||||
Subject: [PATCH] build.sh: Update for mes 0.18.
|
||||
|
||||
---
|
||||
build.sh | 92 +++++++++++++++++++++++++++++++++++++-----------------
|
||||
install.sh | 6 ++--
|
||||
2 files changed, 66 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/build.sh b/build.sh
|
||||
index 335a7bb..19a0029 100755
|
||||
--- a/build.sh
|
||||
+++ b/build.sh
|
||||
@@ -18,7 +18,8 @@
|
||||
# along with mescc-tools. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set -eux
|
||||
-MES_SEED=${MES_SEED-../mescc-tools-seed/libs}
|
||||
+MES_PREFIX=${MES_PREFIX-../mes}
|
||||
+MES_SEED=${MES_SEED-../mes-seed}
|
||||
MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed}
|
||||
|
||||
#########################################
|
||||
@@ -32,15 +33,23 @@ MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed}
|
||||
# blood-elf
|
||||
# Create proper debug segment
|
||||
$MESCC_TOOLS_SEED/blood-elf\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/blood-elf.M1\
|
||||
-o blood-elf-blood-elf-footer.M1
|
||||
|
||||
# Build
|
||||
# M1-macro phase
|
||||
$MESCC_TOOLS_SEED/M1 --LittleEndian --Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/blood-elf.M1\
|
||||
-f blood-elf-blood-elf-footer.M1\
|
||||
-o blood-elf.hex2
|
||||
@@ -49,7 +58,7 @@ $MESCC_TOOLS_SEED/hex2\
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f blood-elf.hex2\
|
||||
--exec_enable\
|
||||
-o bin/blood-elf
|
||||
@@ -65,9 +74,13 @@ $MESCC_TOOLS_SEED/hex2\
|
||||
$MESCC_TOOLS_SEED/M1 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/M1.M1\
|
||||
-f M1-footer.M1\
|
||||
-o M1.hex2
|
||||
@@ -76,7 +89,7 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f M1.hex2\
|
||||
--exec_enable\
|
||||
-o bin/M1
|
||||
@@ -92,9 +105,13 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
./bin/M1 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/hex2.M1\
|
||||
-f hex2-footer.M1\
|
||||
-o hex2.hex2
|
||||
@@ -103,10 +120,10 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f hex2.hex2\
|
||||
--exec_enable\
|
||||
- -o bin/hex2
|
||||
+ -o bin/hex2-0
|
||||
|
||||
#########################
|
||||
# Phase-1 Self-host #
|
||||
@@ -123,18 +140,22 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
./bin/M1 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/blood-elf.M1\
|
||||
-f blood-elf-blood-elf-footer.M1\
|
||||
-o blood-elf.hex2
|
||||
# Hex2-linker phase
|
||||
-./bin/hex2 \
|
||||
+./bin/hex2-0 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f blood-elf.hex2\
|
||||
--exec_enable\
|
||||
-o blood-elf
|
||||
@@ -150,18 +171,22 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
./bin/M1 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/M1.M1\
|
||||
-f M1-footer.M1\
|
||||
-o M1.hex2
|
||||
# Hex2-linker phase
|
||||
-./bin/hex2 \
|
||||
+./bin/hex2-0 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f M1.hex2\
|
||||
--exec_enable\
|
||||
-o bin/M1
|
||||
@@ -177,18 +202,27 @@ $MESCC_TOOLS_SEED/hex2 \
|
||||
./bin/M1 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
- -f $MES_SEED/x86.M1\
|
||||
- -f $MES_SEED/crt1.M1\
|
||||
- -f $MES_SEED/libc+tcc-mes.M1\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/x86.M1\
|
||||
+ -f $MES_SEED/x86-mes/crt1.S\
|
||||
+ -f $MES_SEED/x86-mes/libc+tcc.S\
|
||||
+ -f $MESCC_TOOLS_SEED/file_print.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/match.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/numerate_number.M1\
|
||||
+ -f $MESCC_TOOLS_SEED/string.M1\
|
||||
-f $MESCC_TOOLS_SEED/hex2.M1\
|
||||
-f hex2-footer.M1\
|
||||
-o hex2.hex2
|
||||
# Hex2-linker phase
|
||||
-./bin/hex2 \
|
||||
+./bin/hex2-0 \
|
||||
--LittleEndian\
|
||||
--Architecture 1\
|
||||
--BaseAddress 0x1000000\
|
||||
- -f $MES_SEED/elf32-header.hex2\
|
||||
+ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
|
||||
-f hex2.hex2\
|
||||
--exec_enable\
|
||||
-o bin/hex2
|
||||
+
|
||||
+# TODO
|
||||
+touch bin/exec_enable
|
||||
+touch bin/get_machine
|
||||
+touch bin/kaem
|
||||
diff --git a/install.sh b/install.sh
|
||||
index e4dccff..29e58d6 100644
|
||||
--- a/install.sh
|
||||
+++ b/install.sh
|
||||
@@ -18,6 +18,6 @@
|
||||
PREFIX=${PREFIX-usr}
|
||||
|
||||
mkdir -p "$PREFIX/bin"
|
||||
-cp blood-elf "$PREFIX/bin/blood-elf"
|
||||
-cp hex2 "$PREFIX/bin/hex2"
|
||||
-cp M1 "$PREFIX/bin/M1"
|
||||
+cp bin/blood-elf "$PREFIX/bin/blood-elf"
|
||||
+cp bin/hex2 "$PREFIX/bin/hex2"
|
||||
+cp bin/M1 "$PREFIX/bin/M1"
|
||||
--
|
||||
2.18.0
|
||||
|
|
@ -20,29 +20,25 @@
|
|||
#ifndef __MES_ALLOCA_H
|
||||
#define __MES_ALLOCA_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_ALLOCA_H
|
||||
#include_next <alloca.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#ifndef __MES_SIZE_T
|
||||
#define __MES_SIZE_T
|
||||
#undef size_t
|
||||
typedef unsigned long size_t;
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#if _ALLOCA_UNSIGNED
|
||||
void * alloca (unsigned size);
|
||||
void *alloca (unsigned size);
|
||||
#elif _ALLOCA_CHAR
|
||||
char * alloca (int);
|
||||
char *alloca (int);
|
||||
#else
|
||||
void * alloca (size_t size);
|
||||
void *alloca (size_t size);
|
||||
#endif
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_ALLOCA_H
|
||||
|
|
28
include/ar.h
28
include/ar.h
|
@ -21,14 +21,14 @@
|
|||
#ifndef __MES_AR_H
|
||||
#define __MES_AR_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_AR_H
|
||||
#include_next <ar.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
// Taken from GNU C Library 2.2.5
|
||||
|
||||
|
@ -36,21 +36,21 @@
|
|||
`struct ar_hdr', and as many bytes of member file data as its `ar_size'
|
||||
member indicates, for each member file. */
|
||||
|
||||
#define ARMAG "!<arch>\n" /* String that begins an archive file. */
|
||||
#define SARMAG 8 /* Size of that string. */
|
||||
#define ARMAG "!<arch>\n" /* String that begins an archive file. */
|
||||
#define SARMAG 8 /* Size of that string. */
|
||||
|
||||
#define ARFMAG "`\n" /* String in ar_fmag at end of each header. */
|
||||
#define ARFMAG "`\n" /* String in ar_fmag at end of each header. */
|
||||
|
||||
struct ar_hdr
|
||||
{
|
||||
char ar_name[16]; /* Member file name, sometimes / terminated. */
|
||||
char ar_date[12]; /* File date, decimal seconds since Epoch. */
|
||||
char ar_uid[6], ar_gid[6]; /* User and group IDs, in ASCII decimal. */
|
||||
char ar_mode[8]; /* File mode, in ASCII octal. */
|
||||
char ar_size[10]; /* File size, in ASCII decimal. */
|
||||
char ar_fmag[2]; /* Always contains ARFMAG. */
|
||||
};
|
||||
{
|
||||
char ar_name[16]; /* Member file name, sometimes / terminated. */
|
||||
char ar_date[12]; /* File date, decimal seconds since Epoch. */
|
||||
char ar_uid[6], ar_gid[6]; /* User and group IDs, in ASCII decimal. */
|
||||
char ar_mode[8]; /* File mode, in ASCII octal. */
|
||||
char ar_size[10]; /* File size, in ASCII decimal. */
|
||||
char ar_fmag[2]; /* Always contains ARFMAG. */
|
||||
};
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_ARGZ_H
|
||||
|
|
|
@ -20,14 +20,14 @@
|
|||
#ifndef __MES_ARGZ_H
|
||||
#define __MES_ARGZ_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_ARGZ_H
|
||||
#include_next <argz.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#ifndef libc_hidden_def
|
||||
#define libc_hidden_def(x)
|
||||
|
@ -37,6 +37,6 @@
|
|||
size_t __argz_count (char const *argz, size_t len);
|
||||
void __argz_extract (char const *argz, size_t len, char **argv);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_ARGZ_H
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
#ifndef __MES_ASSERT_H
|
||||
#define __MES_ASSERT_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_ASSERT_H
|
||||
#include_next <assert.h>
|
||||
#else // ! WITH_GLIBC
|
||||
#define assert(x) ((x) ? (void)0 : assert_fail (#x))
|
||||
void assert_fail (char* s);
|
||||
#endif // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
#define assert(x) ((x) ? (void)0 : __assert_fail (#x))
|
||||
void __assert_fail (char *s);
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_ASSERT_H
|
||||
|
|
|
@ -20,20 +20,31 @@
|
|||
#ifndef __MES_CTYPE_H
|
||||
#define __MES_CTYPE_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_CTYPE_H
|
||||
#include_next <ctype.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
#include <endian.h>
|
||||
|
||||
int isalnum (int c);
|
||||
int isalpha (int c);
|
||||
int isascii (int c);
|
||||
int iscntrl (int c);
|
||||
int isdigit (int c);
|
||||
int isxdigit (int c);
|
||||
int islower (int c);
|
||||
int isnumber (int c, int base);
|
||||
int isprint (int c);
|
||||
int ispunct (int c);
|
||||
int isspace (int c);
|
||||
#endif // ! WITH_GLIBC
|
||||
int isupper (int c);
|
||||
int isxdigit (int c);
|
||||
int tolower (int c);
|
||||
int toupper (int c);
|
||||
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_CTYPE_H
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
#ifndef __MES_DIRENT_H
|
||||
#define __MES_DIRENT_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_DIRENT_H
|
||||
#include_next <dirent.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#include <dirstream.h>
|
||||
|
||||
|
@ -41,18 +41,18 @@
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
int __getdirentries (int filedes, char *buffer, size_t nbytes, off_t *basep);
|
||||
int __getdirentries (int filedes, char *buffer, size_t nbytes, off_t * basep);
|
||||
|
||||
struct dirent
|
||||
{
|
||||
ino_t d_ino;
|
||||
off_t d_off;
|
||||
unsigned short int d_reclen;
|
||||
{
|
||||
ino_t d_ino;
|
||||
off_t d_off;
|
||||
unsigned short int d_reclen;
|
||||
#if 0
|
||||
unsigned char d_type;
|
||||
unsigned char d_type;
|
||||
#endif
|
||||
char d_name[256]; /* We must not include limits.h! */
|
||||
};
|
||||
char d_name[256]; /* We must not include limits.h! */
|
||||
};
|
||||
|
||||
/* Open a directory stream on NAME.
|
||||
Return a DIR stream on the directory, or NULL if it could not be opened. */
|
||||
|
@ -60,17 +60,17 @@ DIR *opendir (char const *name);
|
|||
|
||||
/* Close the directory stream DIRP.
|
||||
Return 0 if successful, -1 if not. */
|
||||
int closedir (DIR *dirp);
|
||||
int closedir (DIR * dirp);
|
||||
|
||||
/* Read a directory entry from DIRP.
|
||||
Return a pointer to a `struct dirent' describing the entry,
|
||||
or NULL for EOF or error. The storage returned may be overwritten
|
||||
by a later readdir call on the same DIR stream. */
|
||||
struct dirent *readdir (DIR *dirp);
|
||||
struct dirent *readdir (DIR * dirp);
|
||||
|
||||
/* Rewind DIRP to the beginning of the directory. */
|
||||
extern void rewinddir (DIR *dirp);
|
||||
extern void rewinddir (DIR * dirp);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_DIRENT_H
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
#ifndef __MES_DIRSTREAM_H
|
||||
#define __MES_DIRSTREAM_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC && HAVE_DIRSTREAM_H
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_DIRSTREAM_H
|
||||
#include_next <dirstream.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
@ -37,19 +37,19 @@
|
|||
|
||||
/* Directory stream type. */
|
||||
struct __dirstream
|
||||
{
|
||||
int fd; /* File descriptor. */
|
||||
{
|
||||
int fd; /* File descriptor. */
|
||||
|
||||
char *data; /* Directory block. */
|
||||
size_t allocation; /* Space allocated for the block. */
|
||||
size_t size; /* Total valid data in the block. */
|
||||
size_t offset; /* Current offset into the block. */
|
||||
char *data; /* Directory block. */
|
||||
size_t allocation; /* Space allocated for the block. */
|
||||
size_t size; /* Total valid data in the block. */
|
||||
size_t offset; /* Current offset into the block. */
|
||||
|
||||
off_t filepos; /* Position of next entry to read. */
|
||||
};
|
||||
off_t filepos; /* Position of next entry to read. */
|
||||
};
|
||||
|
||||
typedef struct __dirstream DIR;
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_DIRSTREAM_H
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
#ifndef __MES_DLFCN_H
|
||||
#define __MES_DLFCN_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_DLFCN_H
|
||||
#include_next <dlfcn.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#define RTLD_LAZY 0x00001
|
||||
#define RTLD_NOW 0x00002
|
||||
|
@ -39,6 +39,6 @@
|
|||
void *dlopen (char const *filename, int flags);
|
||||
int dlclose (void *handle);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_DLFCN_H
|
||||
|
|
|
@ -20,17 +20,17 @@
|
|||
#ifndef __MES_ENDIAN_H
|
||||
#define __MES_ENDIAN_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_ENDIAN_H
|
||||
#include_next <endian.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
#define __LITTLE_ENDIAN 1234
|
||||
#define __BIG_ENDIAN 4321
|
||||
#define __BYTE_ORDER __LITTLE_ENDIAN
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_ENDIAN_H
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
#ifndef __MES_ERRNO_H
|
||||
#define __MES_ERRNO_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_ERRNO_H
|
||||
#include_next <errno.h>
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#ifndef __MES_ERRNO_T
|
||||
#define __MES_ERRNO_T 1
|
||||
|
@ -65,6 +65,6 @@ extern char *sys_errlist[];
|
|||
extern int sys_nerr;
|
||||
#endif // !__MESC__
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_ERRNO_H
|
||||
|
|
|
@ -20,15 +20,16 @@
|
|||
#ifndef __MES_FCNTL_H
|
||||
#define __MES_FCNTL_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_FCNTL_H
|
||||
#include_next <fcntl.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
// *INDENT-OFF*
|
||||
#define O_RDONLY 0
|
||||
#define O_WRONLY 1
|
||||
#define O_RDWR 2
|
||||
|
@ -37,6 +38,7 @@
|
|||
#define O_TRUNC 0x200
|
||||
#define O_APPEND 0x400
|
||||
#define O_DIRECTORY 0x10000
|
||||
// *INDENT-ON*
|
||||
|
||||
#define FD_CLOEXEC 1
|
||||
|
||||
|
@ -51,6 +53,6 @@ int dup2 (int old, int new);
|
|||
int fcntl (int filedes, int command, ...);
|
||||
int open (char const *s, int flags, ...);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_FCNTL_H
|
||||
|
|
|
@ -20,10 +20,9 @@
|
|||
#ifndef __MES_FEATURES_H
|
||||
#define __MES_FEATURES_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_FEATURES_H
|
||||
#include_next <features.h>
|
||||
#endif // (WITH_GLIBC)
|
||||
#endif // (SYSTEM_LIBC)
|
||||
|
||||
#endif // __MES_FEATURES_H
|
||||
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
#ifndef __MES_FLOAT_H
|
||||
#define __MES_FLOAT_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_FLOAT_H
|
||||
#include_next <float.h>
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#define MIN_EXP -1021
|
||||
#define DBL_MIN_EXP -1021
|
||||
#define LDBL_MIN_EXP -1021
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_FLOAT_H
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
#ifndef __MES_GETOPT_H
|
||||
#define __MES_GETOPT_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_GETOPT_H
|
||||
#include_next <getopt.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
#include <endian.h>
|
||||
int isdigit (int);
|
||||
int isxdigit (int);
|
||||
|
@ -57,6 +57,6 @@ int getopt_long (int argc, char *const *argv, char const *options,
|
|||
int getopt_long_only (int argc, char *const *argv, char const *options,
|
||||
struct option const *long_options, int *opt_index);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_GETOPT_H
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __MES_GRP_H
|
||||
#define __MES_GRP_H 1
|
||||
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_GRP_H
|
||||
#include_next <grp.h>
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
struct group
|
||||
{
|
||||
char *gr_name;
|
||||
gid_t gr_gid;
|
||||
char **gr_mem;
|
||||
};
|
||||
|
||||
struct group *getgrent (void);
|
||||
void endgrent (void);
|
||||
void setgrent (void);
|
||||
struct group *getgrgid (gid_t gid);
|
||||
struct group *getgrnam (char const *name);
|
||||
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_GRP_H
|
|
@ -20,15 +20,15 @@
|
|||
#ifndef __MES_INTTYPES_H
|
||||
#define __MES_INTTYPES_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_INTTYPES_H
|
||||
#include_next <inttypes.h>
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#include <stdint.h>
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_INTTYPES_H
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
#ifndef __MES_LIBGEN_H
|
||||
#define __MES_LIBGEN_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_LIBGEN_H
|
||||
#include_next <libgen.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
char* dirname (char*);
|
||||
#endif // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
char *dirname (char *);
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_LIBGEN_H
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __MES_LIBMES_H
|
||||
#define __MES_LIBMES_H
|
||||
|
||||
#include <libmes-mini.h>
|
||||
|
||||
int __mes_debug ();
|
||||
long abtol (char const** p, int base);
|
||||
char const* ntoab (long number, int base, int signed_p);
|
||||
char const* itoa (int number);
|
||||
char const* ltoa (long number);
|
||||
char const* ultoa (unsigned long number);
|
||||
char const* utoa (unsigned number);
|
||||
char const* ltoab (long x, int base);
|
||||
int atoi (char const *s);
|
||||
int eputc (int c);
|
||||
int fdgetc (int fd);
|
||||
int fdputc (int c, int fd);
|
||||
int fdputs (char const* s, int fd);
|
||||
int fdungetc (int c, int fd);
|
||||
int _fdungetc_p (int fd);
|
||||
int isdigit (int c);
|
||||
int isspace (int c);
|
||||
int isxdigit (int c);
|
||||
int _open3 (char const *file_name, int flags, int mask);
|
||||
int _open2 (char const *file_name, int flags);
|
||||
int oputc (int c);
|
||||
int oputs (char const* s);
|
||||
char *search_path (char const *file_name);
|
||||
|
||||
#endif //__MES_LIBMES_H
|
|
@ -20,14 +20,14 @@
|
|||
#ifndef __MES_LIMITS_H
|
||||
#define __MES_LIMITS_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_LIMITS_H
|
||||
#include_next <limits.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
@ -36,6 +36,6 @@
|
|||
#define PATH_MAX 512
|
||||
#define _POSIX_OPEN_MAX 16
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_LIMITS_H
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __MES_SYSCALL_H
|
||||
#define __MES_SYSCALL_H
|
||||
|
||||
long _sys_call (long sys_call);
|
||||
long _sys_call1 (long sys_call, long one);
|
||||
long _sys_call2 (long sys_call, long one, long two);
|
||||
long _sys_call3 (long sys_call, long one, long two, long three);
|
||||
long _sys_call4 (long sys_call, long one, long two, long three, long four);
|
||||
long _sys_call6 (long sys_call, long one, long two, long three, long four, long five, long six);
|
||||
|
||||
#endif //__MES_SYSCALL_H
|
|
@ -77,7 +77,7 @@
|
|||
#define SYS_getegid 0x6c
|
||||
#define SYS_getppid 0x6e
|
||||
|
||||
// make+POSIX
|
||||
// make+SYSTEM_LIBC
|
||||
#define SYS_rt_sigprocmask 0x0e
|
||||
|
||||
#endif // __MES_LINUX_X86_64_SYSCALL_H
|
||||
|
|
|
@ -20,23 +20,26 @@
|
|||
#ifndef __MES_LOCALE_H
|
||||
#define __MES_LOCALE_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_LOCALE_H
|
||||
#include_next <locale.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
// *INDENT-OFF*
|
||||
#ifndef LC_ALL
|
||||
#define LC_CTYPE 0
|
||||
#define LC_NUMERIC 1
|
||||
#define LC_COLLATE 3
|
||||
#define LC_ALL 6
|
||||
#endif
|
||||
char * setlocale (int category, char const *locale);
|
||||
// *INDENT-ON*
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
char *setlocale (int category, char const *locale);
|
||||
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_LOCALE_H
|
||||
|
|
|
@ -20,13 +20,12 @@
|
|||
#ifndef __MES_MATH_H
|
||||
#define __MES_MATH_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_MATH_H
|
||||
#include_next <math.h>
|
||||
#else // ! WITH_GLIBC
|
||||
double ldexp (double x, int exp);
|
||||
#endif // ! WITH_GLIBC
|
||||
|
||||
#else // ! SYSTEM_LIBC
|
||||
double fabs (double number);
|
||||
double ldexp (double value, int exponent);
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_MATH_H
|
||||
|
|
|
@ -20,17 +20,17 @@
|
|||
#ifndef __MES_MEMORY_H
|
||||
#define __MES_MEMORY_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_MEMORY_H
|
||||
#include_next <memory.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_MEMORY_H
|
||||
|
|
|
@ -0,0 +1,416 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __MES_BUILTINS_H
|
||||
#define __MES_BUILTINS_H
|
||||
|
||||
// src/gc.mes
|
||||
SCM gc_check ();
|
||||
SCM gc ();
|
||||
// src/hash.mes
|
||||
SCM hashq (SCM x, SCM size);
|
||||
SCM hash (SCM x, SCM size);
|
||||
SCM hashq_get_handle (SCM table, SCM key, SCM dflt);
|
||||
SCM hashq_ref (SCM table, SCM key, SCM dflt);
|
||||
SCM hash_ref (SCM table, SCM key, SCM dflt);
|
||||
SCM hashq_set_x (SCM table, SCM key, SCM value);
|
||||
SCM hash_set_x (SCM table, SCM key, SCM value);
|
||||
SCM hash_table_printer (SCM table);
|
||||
SCM make_hash_table (SCM x);
|
||||
// src/lib.mes
|
||||
SCM procedure_name_ (SCM x);
|
||||
SCM display_ (SCM x);
|
||||
SCM display_error_ (SCM x);
|
||||
SCM display_port_ (SCM x, SCM p);
|
||||
SCM write_ (SCM x);
|
||||
SCM write_error_ (SCM x);
|
||||
SCM write_port_ (SCM x, SCM p);
|
||||
SCM exit_ (SCM x);
|
||||
SCM frame_printer (SCM frame);
|
||||
SCM make_stack (SCM stack);
|
||||
SCM stack_length (SCM stack);
|
||||
SCM stack_ref (SCM stack, SCM index);
|
||||
SCM xassq (SCM x, SCM a);
|
||||
SCM memq (SCM x, SCM a);
|
||||
SCM equal2_p (SCM a, SCM b);
|
||||
SCM last_pair (SCM x);
|
||||
SCM pair_p (SCM x);
|
||||
// src/math.mes
|
||||
SCM greater_p (SCM x);
|
||||
SCM less_p (SCM x);
|
||||
SCM is_p (SCM x);
|
||||
SCM minus (SCM x);
|
||||
SCM plus (SCM x);
|
||||
SCM divide (SCM x);
|
||||
SCM modulo (SCM a, SCM b);
|
||||
SCM multiply (SCM x);
|
||||
SCM logand (SCM x);
|
||||
SCM logior (SCM x);
|
||||
SCM lognot (SCM x);
|
||||
SCM logxor (SCM x);
|
||||
SCM ash (SCM n, SCM count);
|
||||
// src/mes.mes
|
||||
SCM make_cell_ (SCM type, SCM car, SCM cdr);
|
||||
SCM type_ (SCM x);
|
||||
SCM car_ (SCM x);
|
||||
SCM cdr_ (SCM x);
|
||||
SCM arity_ (SCM x);
|
||||
SCM cons (SCM x, SCM y);
|
||||
SCM car (SCM x);
|
||||
SCM cdr (SCM x);
|
||||
SCM list (SCM x);
|
||||
SCM null_p (SCM x);
|
||||
SCM eq_p (SCM x, SCM y);
|
||||
SCM values (SCM x);
|
||||
SCM acons (SCM key, SCM value, SCM alist);
|
||||
SCM length (SCM x);
|
||||
SCM error (SCM key, SCM x);
|
||||
SCM append2 (SCM x, SCM y);
|
||||
SCM append_reverse (SCM x, SCM y);
|
||||
SCM reverse_x_ (SCM x, SCM t);
|
||||
SCM pairlis (SCM x, SCM y, SCM a);
|
||||
SCM call (SCM fn, SCM x);
|
||||
SCM assq (SCM x, SCM a);
|
||||
SCM assoc (SCM x, SCM a);
|
||||
SCM set_car_x (SCM x, SCM e);
|
||||
SCM set_cdr_x (SCM x, SCM e);
|
||||
SCM set_env_x (SCM x, SCM e, SCM a);
|
||||
SCM macro_get_handle (SCM name);
|
||||
SCM add_formals (SCM formals, SCM x);
|
||||
SCM eval_apply ();
|
||||
SCM make_builtin_type ();
|
||||
SCM make_builtin (SCM builtin_type, SCM name, SCM arity, SCM function);
|
||||
SCM builtin_arity (SCM builtin);
|
||||
SCM builtin_p (SCM x);
|
||||
SCM builtin_printer (SCM builtin);
|
||||
// CONSTANT cell_nil 1
|
||||
#define cell_nil 1
|
||||
// CONSTANT cell_f 2
|
||||
#define cell_f 2
|
||||
// CONSTANT cell_t 3
|
||||
#define cell_t 3
|
||||
// CONSTANT cell_dot 4
|
||||
#define cell_dot 4
|
||||
// CONSTANT cell_arrow 5
|
||||
#define cell_arrow 5
|
||||
// CONSTANT cell_undefined 6
|
||||
#define cell_undefined 6
|
||||
// CONSTANT cell_unspecified 7
|
||||
#define cell_unspecified 7
|
||||
// CONSTANT cell_closure 8
|
||||
#define cell_closure 8
|
||||
// CONSTANT cell_circular 9
|
||||
#define cell_circular 9
|
||||
// CONSTANT cell_begin 10
|
||||
#define cell_begin 10
|
||||
// CONSTANT cell_call_with_current_continuation 11
|
||||
#define cell_call_with_current_continuation 11
|
||||
// CONSTANT cell_vm_apply 12
|
||||
#define cell_vm_apply 12
|
||||
// CONSTANT cell_vm_apply2 13
|
||||
#define cell_vm_apply2 13
|
||||
// CONSTANT cell_vm_begin 14
|
||||
#define cell_vm_begin 14
|
||||
// CONSTANT cell_vm_begin_eval 15
|
||||
#define cell_vm_begin_eval 15
|
||||
// CONSTANT cell_vm_begin_expand 16
|
||||
#define cell_vm_begin_expand 16
|
||||
// CONSTANT cell_vm_begin_expand_eval 17
|
||||
#define cell_vm_begin_expand_eval 17
|
||||
// CONSTANT cell_vm_begin_expand_macro 18
|
||||
#define cell_vm_begin_expand_macro 18
|
||||
// CONSTANT cell_vm_begin_expand_primitive_load 19
|
||||
#define cell_vm_begin_expand_primitive_load 19
|
||||
// CONSTANT cell_vm_begin_primitive_load 20
|
||||
#define cell_vm_begin_primitive_load 20
|
||||
// CONSTANT cell_vm_begin_read_input_file 21
|
||||
#define cell_vm_begin_read_input_file 21
|
||||
// CONSTANT cell_vm_call_with_current_continuation2 22
|
||||
#define cell_vm_call_with_current_continuation2 22
|
||||
// CONSTANT cell_vm_call_with_values2 23
|
||||
#define cell_vm_call_with_values2 23
|
||||
// CONSTANT cell_vm_eval 24
|
||||
#define cell_vm_eval 24
|
||||
// CONSTANT cell_vm_eval2 25
|
||||
#define cell_vm_eval2 25
|
||||
// CONSTANT cell_vm_eval_check_func 26
|
||||
#define cell_vm_eval_check_func 26
|
||||
// CONSTANT cell_vm_eval_define 27
|
||||
#define cell_vm_eval_define 27
|
||||
// CONSTANT cell_vm_eval_macro_expand_eval 28
|
||||
#define cell_vm_eval_macro_expand_eval 28
|
||||
// CONSTANT cell_vm_eval_macro_expand_expand 29
|
||||
#define cell_vm_eval_macro_expand_expand 29
|
||||
// CONSTANT cell_vm_eval_pmatch_car 30
|
||||
#define cell_vm_eval_pmatch_car 30
|
||||
// CONSTANT cell_vm_eval_pmatch_cdr 31
|
||||
#define cell_vm_eval_pmatch_cdr 31
|
||||
// CONSTANT cell_vm_eval_set_x 32
|
||||
#define cell_vm_eval_set_x 32
|
||||
// CONSTANT cell_vm_evlis 33
|
||||
#define cell_vm_evlis 33
|
||||
// CONSTANT cell_vm_evlis2 34
|
||||
#define cell_vm_evlis2 34
|
||||
// CONSTANT cell_vm_evlis3 35
|
||||
#define cell_vm_evlis3 35
|
||||
// CONSTANT cell_vm_if 36
|
||||
#define cell_vm_if 36
|
||||
// CONSTANT cell_vm_if_expr 37
|
||||
#define cell_vm_if_expr 37
|
||||
// CONSTANT cell_vm_macro_expand 38
|
||||
#define cell_vm_macro_expand 38
|
||||
// CONSTANT cell_vm_macro_expand_car 39
|
||||
#define cell_vm_macro_expand_car 39
|
||||
// CONSTANT cell_vm_macro_expand_cdr 40
|
||||
#define cell_vm_macro_expand_cdr 40
|
||||
// CONSTANT cell_vm_macro_expand_define 41
|
||||
#define cell_vm_macro_expand_define 41
|
||||
// CONSTANT cell_vm_macro_expand_define_macro 42
|
||||
#define cell_vm_macro_expand_define_macro 42
|
||||
// CONSTANT cell_vm_macro_expand_lambda 43
|
||||
#define cell_vm_macro_expand_lambda 43
|
||||
// CONSTANT cell_vm_macro_expand_set_x 44
|
||||
#define cell_vm_macro_expand_set_x 44
|
||||
// CONSTANT cell_vm_return 45
|
||||
#define cell_vm_return 45
|
||||
// CONSTANT cell_symbol_dot 46
|
||||
#define cell_symbol_dot 46
|
||||
// CONSTANT cell_symbol_lambda 47
|
||||
#define cell_symbol_lambda 47
|
||||
// CONSTANT cell_symbol_begin 48
|
||||
#define cell_symbol_begin 48
|
||||
// CONSTANT cell_symbol_if 49
|
||||
#define cell_symbol_if 49
|
||||
// CONSTANT cell_symbol_quote 50
|
||||
#define cell_symbol_quote 50
|
||||
// CONSTANT cell_symbol_define 51
|
||||
#define cell_symbol_define 51
|
||||
// CONSTANT cell_symbol_define_macro 52
|
||||
#define cell_symbol_define_macro 52
|
||||
// CONSTANT cell_symbol_quasiquote 53
|
||||
#define cell_symbol_quasiquote 53
|
||||
// CONSTANT cell_symbol_unquote 54
|
||||
#define cell_symbol_unquote 54
|
||||
// CONSTANT cell_symbol_unquote_splicing 55
|
||||
#define cell_symbol_unquote_splicing 55
|
||||
// CONSTANT cell_symbol_syntax 56
|
||||
#define cell_symbol_syntax 56
|
||||
// CONSTANT cell_symbol_quasisyntax 57
|
||||
#define cell_symbol_quasisyntax 57
|
||||
// CONSTANT cell_symbol_unsyntax 58
|
||||
#define cell_symbol_unsyntax 58
|
||||
// CONSTANT cell_symbol_unsyntax_splicing 59
|
||||
#define cell_symbol_unsyntax_splicing 59
|
||||
// CONSTANT cell_symbol_set_x 60
|
||||
#define cell_symbol_set_x 60
|
||||
// CONSTANT cell_symbol_sc_expand 61
|
||||
#define cell_symbol_sc_expand 61
|
||||
// CONSTANT cell_symbol_macro_expand 62
|
||||
#define cell_symbol_macro_expand 62
|
||||
// CONSTANT cell_symbol_portable_macro_expand 63
|
||||
#define cell_symbol_portable_macro_expand 63
|
||||
// CONSTANT cell_symbol_sc_expander_alist 64
|
||||
#define cell_symbol_sc_expander_alist 64
|
||||
// CONSTANT cell_symbol_call_with_values 65
|
||||
#define cell_symbol_call_with_values 65
|
||||
// CONSTANT cell_symbol_call_with_current_continuation 66
|
||||
#define cell_symbol_call_with_current_continuation 66
|
||||
// CONSTANT cell_symbol_boot_module 67
|
||||
#define cell_symbol_boot_module 67
|
||||
// CONSTANT cell_symbol_current_module 68
|
||||
#define cell_symbol_current_module 68
|
||||
// CONSTANT cell_symbol_primitive_load 69
|
||||
#define cell_symbol_primitive_load 69
|
||||
// CONSTANT cell_symbol_read_input_file 70
|
||||
#define cell_symbol_read_input_file 70
|
||||
// CONSTANT cell_symbol_write 71
|
||||
#define cell_symbol_write 71
|
||||
// CONSTANT cell_symbol_display 72
|
||||
#define cell_symbol_display 72
|
||||
// CONSTANT cell_symbol_car 73
|
||||
#define cell_symbol_car 73
|
||||
// CONSTANT cell_symbol_cdr 74
|
||||
#define cell_symbol_cdr 74
|
||||
// CONSTANT cell_symbol_not_a_number 75
|
||||
#define cell_symbol_not_a_number 75
|
||||
// CONSTANT cell_symbol_not_a_pair 76
|
||||
#define cell_symbol_not_a_pair 76
|
||||
// CONSTANT cell_symbol_system_error 77
|
||||
#define cell_symbol_system_error 77
|
||||
// CONSTANT cell_symbol_throw 78
|
||||
#define cell_symbol_throw 78
|
||||
// CONSTANT cell_symbol_unbound_variable 79
|
||||
#define cell_symbol_unbound_variable 79
|
||||
// CONSTANT cell_symbol_wrong_number_of_args 80
|
||||
#define cell_symbol_wrong_number_of_args 80
|
||||
// CONSTANT cell_symbol_wrong_type_arg 81
|
||||
#define cell_symbol_wrong_type_arg 81
|
||||
// CONSTANT cell_symbol_buckets 82
|
||||
#define cell_symbol_buckets 82
|
||||
// CONSTANT cell_symbol_builtin 83
|
||||
#define cell_symbol_builtin 83
|
||||
// CONSTANT cell_symbol_frame 84
|
||||
#define cell_symbol_frame 84
|
||||
// CONSTANT cell_symbol_hashq_table 85
|
||||
#define cell_symbol_hashq_table 85
|
||||
// CONSTANT cell_symbol_module 86
|
||||
#define cell_symbol_module 86
|
||||
// CONSTANT cell_symbol_procedure 87
|
||||
#define cell_symbol_procedure 87
|
||||
// CONSTANT cell_symbol_record_type 88
|
||||
#define cell_symbol_record_type 88
|
||||
// CONSTANT cell_symbol_size 89
|
||||
#define cell_symbol_size 89
|
||||
// CONSTANT cell_symbol_stack 90
|
||||
#define cell_symbol_stack 90
|
||||
// CONSTANT cell_symbol_argv 91
|
||||
#define cell_symbol_argv 91
|
||||
// CONSTANT cell_symbol_mes_prefix 92
|
||||
#define cell_symbol_mes_prefix 92
|
||||
// CONSTANT cell_symbol_mes_version 93
|
||||
#define cell_symbol_mes_version 93
|
||||
// CONSTANT cell_symbol_internal_time_units_per_second 94
|
||||
#define cell_symbol_internal_time_units_per_second 94
|
||||
// CONSTANT cell_symbol_compiler 95
|
||||
#define cell_symbol_compiler 95
|
||||
// CONSTANT cell_symbol_arch 96
|
||||
#define cell_symbol_arch 96
|
||||
// CONSTANT cell_symbol_pmatch_car 97
|
||||
#define cell_symbol_pmatch_car 97
|
||||
// CONSTANT cell_symbol_pmatch_cdr 98
|
||||
#define cell_symbol_pmatch_cdr 98
|
||||
// CONSTANT cell_type_bytes 99
|
||||
#define cell_type_bytes 99
|
||||
// CONSTANT cell_type_char 100
|
||||
#define cell_type_char 100
|
||||
// CONSTANT cell_type_closure 101
|
||||
#define cell_type_closure 101
|
||||
// CONSTANT cell_type_continuation 102
|
||||
#define cell_type_continuation 102
|
||||
// CONSTANT cell_type_function 103
|
||||
#define cell_type_function 103
|
||||
// CONSTANT cell_type_keyword 104
|
||||
#define cell_type_keyword 104
|
||||
// CONSTANT cell_type_macro 105
|
||||
#define cell_type_macro 105
|
||||
// CONSTANT cell_type_number 106
|
||||
#define cell_type_number 106
|
||||
// CONSTANT cell_type_pair 107
|
||||
#define cell_type_pair 107
|
||||
// CONSTANT cell_type_port 108
|
||||
#define cell_type_port 108
|
||||
// CONSTANT cell_type_ref 109
|
||||
#define cell_type_ref 109
|
||||
// CONSTANT cell_type_special 110
|
||||
#define cell_type_special 110
|
||||
// CONSTANT cell_type_string 111
|
||||
#define cell_type_string 111
|
||||
// CONSTANT cell_type_struct 112
|
||||
#define cell_type_struct 112
|
||||
// CONSTANT cell_type_symbol 113
|
||||
#define cell_type_symbol 113
|
||||
// CONSTANT cell_type_values 114
|
||||
#define cell_type_values 114
|
||||
// CONSTANT cell_type_variable 115
|
||||
#define cell_type_variable 115
|
||||
// CONSTANT cell_type_vector 116
|
||||
#define cell_type_vector 116
|
||||
// CONSTANT cell_type_broken_heart 117
|
||||
#define cell_type_broken_heart 117
|
||||
// CONSTANT cell_symbol_test 118
|
||||
#define cell_symbol_test 118
|
||||
// src/module.mes
|
||||
SCM make_module_type ();
|
||||
SCM module_printer (SCM module);
|
||||
SCM module_variable (SCM module, SCM name);
|
||||
SCM module_ref (SCM module, SCM name);
|
||||
SCM module_define_x (SCM module, SCM name, SCM value);
|
||||
// src/posix.mes
|
||||
SCM peek_byte ();
|
||||
SCM read_byte ();
|
||||
SCM unread_byte (SCM i);
|
||||
SCM peek_char ();
|
||||
SCM read_char (SCM port);
|
||||
SCM unread_char (SCM i);
|
||||
SCM write_char (SCM i);
|
||||
SCM write_byte (SCM x);
|
||||
SCM getenv_ (SCM s);
|
||||
SCM setenv_ (SCM s, SCM v);
|
||||
SCM access_p (SCM file_name, SCM mode);
|
||||
SCM current_input_port ();
|
||||
SCM open_input_file (SCM file_name);
|
||||
SCM open_input_string (SCM string);
|
||||
SCM set_current_input_port (SCM port);
|
||||
SCM current_output_port ();
|
||||
SCM current_error_port ();
|
||||
SCM open_output_file (SCM x);
|
||||
SCM set_current_output_port (SCM port);
|
||||
SCM set_current_error_port (SCM port);
|
||||
SCM force_output (SCM p);
|
||||
SCM chmod_ (SCM file_name, SCM mode);
|
||||
SCM isatty_p (SCM port);
|
||||
SCM primitive_fork ();
|
||||
SCM execl_ (SCM file_name, SCM args);
|
||||
SCM waitpid_ (SCM pid, SCM options);
|
||||
SCM current_time ();
|
||||
SCM gettimeofday_ ();
|
||||
SCM get_internal_run_time ();
|
||||
SCM getcwd_ ();
|
||||
SCM dup_ (SCM port);
|
||||
SCM dup2_ (SCM old, SCM new);
|
||||
SCM delete_file (SCM file_name);
|
||||
// src/reader.mes
|
||||
SCM read_input_file_env_ (SCM e, SCM a);
|
||||
SCM read_input_file_env (SCM a);
|
||||
SCM read_env (SCM a);
|
||||
SCM reader_read_sexp (SCM c, SCM s, SCM a);
|
||||
SCM reader_read_character ();
|
||||
SCM reader_read_binary ();
|
||||
SCM reader_read_octal ();
|
||||
SCM reader_read_hex ();
|
||||
SCM reader_read_string ();
|
||||
// src/strings.mes
|
||||
SCM string_equal_p (SCM a, SCM b);
|
||||
SCM symbol_to_string (SCM symbol);
|
||||
SCM symbol_to_keyword (SCM symbol);
|
||||
SCM keyword_to_string (SCM keyword);
|
||||
SCM string_to_symbol (SCM string);
|
||||
SCM make_symbol (SCM string);
|
||||
SCM string_to_list (SCM string);
|
||||
SCM list_to_string (SCM list);
|
||||
SCM read_string (SCM port);
|
||||
SCM string_append (SCM x);
|
||||
SCM string_length (SCM string);
|
||||
SCM string_ref (SCM str, SCM k);
|
||||
// src/struct.mes
|
||||
SCM make_struct (SCM type, SCM fields, SCM printer);
|
||||
SCM struct_length (SCM x);
|
||||
SCM struct_ref (SCM x, SCM i);
|
||||
SCM struct_set_x (SCM x, SCM i, SCM e);
|
||||
// src/vector.mes
|
||||
SCM make_vector_ (SCM n);
|
||||
SCM vector_length (SCM x);
|
||||
SCM vector_ref (SCM x, SCM i);
|
||||
SCM vector_entry (SCM x);
|
||||
SCM vector_set_x (SCM x, SCM i, SCM e);
|
||||
SCM list_to_vector (SCM x);
|
||||
SCM vector_to_list (SCM v);
|
||||
|
||||
#endif //__MES_BUILTINS_H
|
|
@ -0,0 +1,324 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __MES_CONSTANTS_H
|
||||
#define __MES_CONSTANTS_H
|
||||
|
||||
/* Symbols */
|
||||
|
||||
// CONSTANT cell_nil 1
|
||||
#define cell_nil 1
|
||||
// CONSTANT cell_f 2
|
||||
#define cell_f 2
|
||||
// CONSTANT cell_t 3
|
||||
#define cell_t 3
|
||||
// CONSTANT cell_dot 4
|
||||
#define cell_dot 4
|
||||
// CONSTANT cell_arrow 5
|
||||
#define cell_arrow 5
|
||||
// CONSTANT cell_undefined 6
|
||||
#define cell_undefined 6
|
||||
// CONSTANT cell_unspecified 7
|
||||
#define cell_unspecified 7
|
||||
// CONSTANT cell_closure 8
|
||||
#define cell_closure 8
|
||||
// CONSTANT cell_circular 9
|
||||
#define cell_circular 9
|
||||
// CONSTANT cell_begin 10
|
||||
#define cell_begin 10
|
||||
// CONSTANT cell_call_with_current_continuation 11
|
||||
#define cell_call_with_current_continuation 11
|
||||
|
||||
// CONSTANT cell_vm_apply 12
|
||||
#define cell_vm_apply 12
|
||||
// CONSTANT cell_vm_apply2 13
|
||||
#define cell_vm_apply2 13
|
||||
// CONSTANT cell_vm_begin 14
|
||||
#define cell_vm_begin 14
|
||||
// CONSTANT cell_vm_begin_eval 15
|
||||
#define cell_vm_begin_eval 15
|
||||
// CONSTANT cell_vm_begin_expand 16
|
||||
#define cell_vm_begin_expand 16
|
||||
// CONSTANT cell_vm_begin_expand_eval 17
|
||||
#define cell_vm_begin_expand_eval 17
|
||||
// CONSTANT cell_vm_begin_expand_macro 18
|
||||
#define cell_vm_begin_expand_macro 18
|
||||
// CONSTANT cell_vm_begin_expand_primitive_load 19
|
||||
#define cell_vm_begin_expand_primitive_load 19
|
||||
// CONSTANT cell_vm_begin_primitive_load 20
|
||||
#define cell_vm_begin_primitive_load 20
|
||||
// CONSTANT cell_vm_begin_read_input_file 21
|
||||
#define cell_vm_begin_read_input_file 21
|
||||
// CONSTANT cell_vm_call_with_current_continuation2 22
|
||||
#define cell_vm_call_with_current_continuation2 22
|
||||
// CONSTANT cell_vm_call_with_values2 23
|
||||
#define cell_vm_call_with_values2 23
|
||||
// CONSTANT cell_vm_eval 24
|
||||
#define cell_vm_eval 24
|
||||
// CONSTANT cell_vm_eval2 25
|
||||
#define cell_vm_eval2 25
|
||||
// CONSTANT cell_vm_eval_check_func 26
|
||||
#define cell_vm_eval_check_func 26
|
||||
// CONSTANT cell_vm_eval_define 27
|
||||
#define cell_vm_eval_define 27
|
||||
// CONSTANT cell_vm_eval_macro_expand_eval 28
|
||||
#define cell_vm_eval_macro_expand_eval 28
|
||||
// CONSTANT cell_vm_eval_macro_expand_expand 29
|
||||
#define cell_vm_eval_macro_expand_expand 29
|
||||
// CONSTANT cell_vm_eval_pmatch_car 30
|
||||
#define cell_vm_eval_pmatch_car 30
|
||||
// CONSTANT cell_vm_eval_pmatch_cdr 31
|
||||
#define cell_vm_eval_pmatch_cdr 31
|
||||
// CONSTANT cell_vm_eval_set_x 32
|
||||
#define cell_vm_eval_set_x 32
|
||||
// CONSTANT cell_vm_evlis 33
|
||||
#define cell_vm_evlis 33
|
||||
// CONSTANT cell_vm_evlis2 34
|
||||
#define cell_vm_evlis2 34
|
||||
// CONSTANT cell_vm_evlis3 35
|
||||
#define cell_vm_evlis3 35
|
||||
// CONSTANT cell_vm_if 36
|
||||
#define cell_vm_if 36
|
||||
// CONSTANT cell_vm_if_expr 37
|
||||
#define cell_vm_if_expr 37
|
||||
// CONSTANT cell_vm_macro_expand 38
|
||||
#define cell_vm_macro_expand 38
|
||||
// CONSTANT cell_vm_macro_expand_car 39
|
||||
#define cell_vm_macro_expand_car 39
|
||||
// CONSTANT cell_vm_macro_expand_cdr 40
|
||||
#define cell_vm_macro_expand_cdr 40
|
||||
// CONSTANT cell_vm_macro_expand_define 41
|
||||
#define cell_vm_macro_expand_define 41
|
||||
// CONSTANT cell_vm_macro_expand_define_macro 42
|
||||
#define cell_vm_macro_expand_define_macro 42
|
||||
// CONSTANT cell_vm_macro_expand_lambda 43
|
||||
#define cell_vm_macro_expand_lambda 43
|
||||
// CONSTANT cell_vm_macro_expand_set_x 44
|
||||
#define cell_vm_macro_expand_set_x 44
|
||||
// CONSTANT cell_vm_return 45
|
||||
#define cell_vm_return 45
|
||||
|
||||
// CONSTANT cell_symbol_dot 46
|
||||
#define cell_symbol_dot 46
|
||||
// CONSTANT cell_symbol_lambda 47
|
||||
#define cell_symbol_lambda 47
|
||||
// CONSTANT cell_symbol_begin 48
|
||||
#define cell_symbol_begin 48
|
||||
// CONSTANT cell_symbol_if 49
|
||||
#define cell_symbol_if 49
|
||||
// CONSTANT cell_symbol_quote 50
|
||||
#define cell_symbol_quote 50
|
||||
// CONSTANT cell_symbol_define 51
|
||||
#define cell_symbol_define 51
|
||||
// CONSTANT cell_symbol_define_macro 52
|
||||
#define cell_symbol_define_macro 52
|
||||
|
||||
// CONSTANT cell_symbol_quasiquote 53
|
||||
#define cell_symbol_quasiquote 53
|
||||
// CONSTANT cell_symbol_unquote 54
|
||||
#define cell_symbol_unquote 54
|
||||
// CONSTANT cell_symbol_unquote_splicing 55
|
||||
#define cell_symbol_unquote_splicing 55
|
||||
// CONSTANT cell_symbol_syntax 56
|
||||
#define cell_symbol_syntax 56
|
||||
// CONSTANT cell_symbol_quasisyntax 57
|
||||
#define cell_symbol_quasisyntax 57
|
||||
// CONSTANT cell_symbol_unsyntax 58
|
||||
#define cell_symbol_unsyntax 58
|
||||
// CONSTANT cell_symbol_unsyntax_splicing 59
|
||||
#define cell_symbol_unsyntax_splicing 59
|
||||
|
||||
// CONSTANT cell_symbol_set_x 60
|
||||
#define cell_symbol_set_x 60
|
||||
|
||||
// CONSTANT cell_symbol_sc_expand 61
|
||||
#define cell_symbol_sc_expand 61
|
||||
// CONSTANT cell_symbol_macro_expand 62
|
||||
#define cell_symbol_macro_expand 62
|
||||
// CONSTANT cell_symbol_portable_macro_expand 63
|
||||
#define cell_symbol_portable_macro_expand 63
|
||||
// CONSTANT cell_symbol_sc_expander_alist 64
|
||||
#define cell_symbol_sc_expander_alist 64
|
||||
|
||||
// CONSTANT cell_symbol_call_with_values 65
|
||||
#define cell_symbol_call_with_values 65
|
||||
// CONSTANT cell_symbol_call_with_current_continuation 66
|
||||
#define cell_symbol_call_with_current_continuation 66
|
||||
// CONSTANT cell_symbol_boot_module 67
|
||||
#define cell_symbol_boot_module 67
|
||||
// CONSTANT cell_symbol_current_module 68
|
||||
#define cell_symbol_current_module 68
|
||||
// CONSTANT cell_symbol_primitive_load 69
|
||||
#define cell_symbol_primitive_load 69
|
||||
// CONSTANT cell_symbol_read_input_file 70
|
||||
#define cell_symbol_read_input_file 70
|
||||
// CONSTANT cell_symbol_write 71
|
||||
#define cell_symbol_write 71
|
||||
// CONSTANT cell_symbol_display 72
|
||||
#define cell_symbol_display 72
|
||||
|
||||
// CONSTANT cell_symbol_car 73
|
||||
#define cell_symbol_car 73
|
||||
// CONSTANT cell_symbol_cdr 74
|
||||
#define cell_symbol_cdr 74
|
||||
// CONSTANT cell_symbol_not_a_number 75
|
||||
#define cell_symbol_not_a_number 75
|
||||
// CONSTANT cell_symbol_not_a_pair 76
|
||||
#define cell_symbol_not_a_pair 76
|
||||
// CONSTANT cell_symbol_system_error 77
|
||||
#define cell_symbol_system_error 77
|
||||
// CONSTANT cell_symbol_throw 78
|
||||
#define cell_symbol_throw 78
|
||||
// CONSTANT cell_symbol_unbound_variable 79
|
||||
#define cell_symbol_unbound_variable 79
|
||||
// CONSTANT cell_symbol_wrong_number_of_args 80
|
||||
#define cell_symbol_wrong_number_of_args 80
|
||||
// CONSTANT cell_symbol_wrong_type_arg 81
|
||||
#define cell_symbol_wrong_type_arg 81
|
||||
|
||||
// CONSTANT cell_symbol_buckets 82
|
||||
#define cell_symbol_buckets 82
|
||||
// CONSTANT cell_symbol_builtin 83
|
||||
#define cell_symbol_builtin 83
|
||||
// CONSTANT cell_symbol_frame 84
|
||||
#define cell_symbol_frame 84
|
||||
// CONSTANT cell_symbol_hashq_table 85
|
||||
#define cell_symbol_hashq_table 85
|
||||
// CONSTANT cell_symbol_module 86
|
||||
#define cell_symbol_module 86
|
||||
// CONSTANT cell_symbol_procedure 87
|
||||
#define cell_symbol_procedure 87
|
||||
// CONSTANT cell_symbol_record_type 88
|
||||
#define cell_symbol_record_type 88
|
||||
// CONSTANT cell_symbol_size 89
|
||||
#define cell_symbol_size 89
|
||||
// CONSTANT cell_symbol_stack 90
|
||||
#define cell_symbol_stack 90
|
||||
|
||||
// CONSTANT cell_symbol_argv 91
|
||||
#define cell_symbol_argv 91
|
||||
// CONSTANT cell_symbol_mes_datadir 92
|
||||
#define cell_symbol_mes_datadir 92
|
||||
// CONSTANT cell_symbol_mes_version 93
|
||||
#define cell_symbol_mes_version 93
|
||||
|
||||
// CONSTANT cell_symbol_internal_time_units_per_second 94
|
||||
#define cell_symbol_internal_time_units_per_second 94
|
||||
// CONSTANT cell_symbol_compiler 95
|
||||
#define cell_symbol_compiler 95
|
||||
// CONSTANT cell_symbol_arch 96
|
||||
#define cell_symbol_arch 96
|
||||
// CONSTANT cell_symbol_pmatch_car 97
|
||||
#define cell_symbol_pmatch_car 97
|
||||
// CONSTANT cell_symbol_pmatch_cdr 98
|
||||
#define cell_symbol_pmatch_cdr 98
|
||||
|
||||
// CONSTANT cell_type_bytes 99
|
||||
#define cell_type_bytes 99
|
||||
// CONSTANT cell_type_char 100
|
||||
#define cell_type_char 100
|
||||
// CONSTANT cell_type_closure 101
|
||||
#define cell_type_closure 101
|
||||
// CONSTANT cell_type_continuation 102
|
||||
#define cell_type_continuation 102
|
||||
// CONSTANT cell_type_function 103
|
||||
#define cell_type_function 103
|
||||
// CONSTANT cell_type_keyword 104
|
||||
#define cell_type_keyword 104
|
||||
// CONSTANT cell_type_macro 105
|
||||
#define cell_type_macro 105
|
||||
// CONSTANT cell_type_number 106
|
||||
#define cell_type_number 106
|
||||
// CONSTANT cell_type_pair 107
|
||||
#define cell_type_pair 107
|
||||
// CONSTANT cell_type_port 108
|
||||
#define cell_type_port 108
|
||||
// CONSTANT cell_type_ref 109
|
||||
#define cell_type_ref 109
|
||||
// CONSTANT cell_type_special 110
|
||||
#define cell_type_special 110
|
||||
// CONSTANT cell_type_string 111
|
||||
#define cell_type_string 111
|
||||
// CONSTANT cell_type_struct 112
|
||||
#define cell_type_struct 112
|
||||
// CONSTANT cell_type_symbol 113
|
||||
#define cell_type_symbol 113
|
||||
// CONSTANT cell_type_values 114
|
||||
#define cell_type_values 114
|
||||
// CONSTANT cell_type_variable 115
|
||||
#define cell_type_variable 115
|
||||
// CONSTANT cell_type_vector 116
|
||||
#define cell_type_vector 116
|
||||
// CONSTANT cell_type_broken_heart 117
|
||||
#define cell_type_broken_heart 117
|
||||
|
||||
// CONSTANT cell_test 118
|
||||
#define cell_test 118
|
||||
|
||||
/* Cell types */
|
||||
|
||||
// CONSTANT TBYTES 0
|
||||
#define TBYTES 0
|
||||
// CONSTANT TCHAR 1
|
||||
#define TCHAR 1
|
||||
// CONSTANT TCLOSURE 2
|
||||
#define TCLOSURE 2
|
||||
// CONSTANT TCONTINUATION 3
|
||||
#define TCONTINUATION 3
|
||||
// CONSTANT TKEYWORD 4
|
||||
#define TKEYWORD 4
|
||||
// CONSTANT TMACRO 5
|
||||
#define TMACRO 5
|
||||
// CONSTANT TNUMBER 6
|
||||
#define TNUMBER 6
|
||||
// CONSTANT TPAIR 7
|
||||
#define TPAIR 7
|
||||
// CONSTANT TPORT 8
|
||||
#define TPORT 8
|
||||
// CONSTANT TREF 9
|
||||
#define TREF 9
|
||||
// CONSTANT TSPECIAL 10
|
||||
#define TSPECIAL 10
|
||||
// CONSTANT TSTRING 11
|
||||
#define TSTRING 11
|
||||
// CONSTANT TSTRUCT 12
|
||||
#define TSTRUCT 12
|
||||
// CONSTANT TSYMBOL 13
|
||||
#define TSYMBOL 13
|
||||
// CONSTANT TVALUES 14
|
||||
#define TVALUES 14
|
||||
// CONSTANT TVARIABLE 15
|
||||
#define TVARIABLE 15
|
||||
// CONSTANT TVECTOR 16
|
||||
#define TVECTOR 16
|
||||
// CONSTANT TBROKEN_HEART 17
|
||||
#define TBROKEN_HEART 17
|
||||
|
||||
/* Struct types */
|
||||
|
||||
// CONSTANT STRUCT_TYPE 0
|
||||
#define STRUCT_TYPE 0
|
||||
// CONSTANT STRUCT_PRINTER 1
|
||||
#define STRUCT_PRINTER 1
|
||||
|
||||
#define FRAME_SIZE 5
|
||||
#define FRAME_PROCEDURE 4
|
||||
|
||||
#endif //__MES_CONSTANTS_H
|
|
@ -18,15 +18,43 @@
|
|||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __MES_LIBMES_MINI_H
|
||||
#define __MES_LIBMES_MINI_H
|
||||
#ifndef __MES_LIB_MINI_H
|
||||
#define __MES_LIB_MINI_H
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#include <mes/config.h>
|
||||
#endif
|
||||
|
||||
// CONSTANT STDIN 0
|
||||
#ifndef STDIN
|
||||
#define STDIN 0
|
||||
#endif
|
||||
|
||||
// CONSTANT STDOUT 1
|
||||
#ifndef STDOUT
|
||||
#define STDOUT 1
|
||||
#endif
|
||||
|
||||
// CONSTANT STDERR 2
|
||||
#ifndef STDERR
|
||||
#define STDERR 2
|
||||
#endif
|
||||
|
||||
char **environ;
|
||||
int g_stdin;
|
||||
int g_stdout;
|
||||
int g_stderr;
|
||||
int __stdin;
|
||||
int __stdout;
|
||||
int __stderr;
|
||||
|
||||
#if !WITH_GLIBC
|
||||
int eputs (char const *s);
|
||||
int puts (char const *s);
|
||||
int oputs (char const *s);
|
||||
|
||||
#if SYSTEM_LIBC
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#else //!SYSTEM_LIBC
|
||||
|
||||
#ifndef _SIZE_T
|
||||
#define _SIZE_T
|
||||
|
@ -62,28 +90,9 @@ typedef int error_t;
|
|||
int errno;
|
||||
#endif // !__MES_ERRNO_T
|
||||
|
||||
#endif //!WITH_LIBC
|
||||
|
||||
#ifndef STDIN
|
||||
#define STDIN 0
|
||||
#endif
|
||||
|
||||
#ifndef STDOUT
|
||||
#define STDOUT 1
|
||||
#endif
|
||||
|
||||
#ifndef STDERR
|
||||
#define STDERR 2
|
||||
#endif
|
||||
|
||||
|
||||
int eputs (char const* s);
|
||||
int puts (char const* s);
|
||||
int oputs (char const* s);
|
||||
|
||||
#if !WITH_GLIBC
|
||||
size_t strlen (char const* s);
|
||||
size_t strlen (char const *s);
|
||||
ssize_t _write ();
|
||||
ssize_t write (int filedes, void const *buffer, size_t size);
|
||||
#endif // !WITH_GLIBC
|
||||
#endif // !SYSTEM_LIBC
|
||||
|
||||
#endif //__MES_LIBMES_MINI_H
|
||||
#endif //__MES_LIB_MINI_H
|
|
@ -0,0 +1,67 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __MES_LIB_H
|
||||
#define __MES_LIB_H
|
||||
|
||||
#include <mes/lib-mini.h>
|
||||
|
||||
int __mes_debug ();
|
||||
void __ungetc_init ();
|
||||
void __ungetc_clear (int filedes);
|
||||
void __ungetc_set (int filedes, int c);
|
||||
int __ungetc_p (int filedes);
|
||||
long abtol (char const **p, int base);
|
||||
char *itoa (int number);
|
||||
char *ltoa (long number);
|
||||
char *ltoab (long x, int base);
|
||||
char *ntoab (long number, int base, int signed_p);
|
||||
char *ultoa (unsigned long number);
|
||||
char *utoa (unsigned number);
|
||||
int eputc (int c);
|
||||
int fdgetc (int fd);
|
||||
char * fdgets (char *s, int count, int fd);
|
||||
int fdputc (int c, int fd);
|
||||
int fdputs (char const *s, int fd);
|
||||
int fdungetc (int c, int fd);
|
||||
char * _getcwd (char *buffer, size_t size);
|
||||
int isnumber (int c, int base);
|
||||
int mes_open (char const *file_name, int flags, int mask);
|
||||
int _open2 (char const *file_name, int flags);
|
||||
int _open3 (char const *file_name, int flags, int mask);
|
||||
int oputc (int c);
|
||||
int oputs (char const *s);
|
||||
char *search_path (char const *file_name);
|
||||
ssize_t _read (int fd, void *buffer, size_t size);
|
||||
|
||||
extern char *__brk;
|
||||
extern void (*__call_at_exit) (void);
|
||||
|
||||
#define __FILEDES_MAX 512
|
||||
|
||||
#if !SYSTEM_LIBC
|
||||
void __assert_fail (char *s);
|
||||
ssize_t __buffered_read (int filedes, void *buffer, size_t size);
|
||||
size_t __buffered_read_clear (int filedes);
|
||||
void _exit (int code);
|
||||
long brk (void *addr);
|
||||
#endif // !SYSTEM_LIBC
|
||||
|
||||
#endif //__MES_LIB_H
|
|
@ -0,0 +1,80 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __MES_MACROS_H
|
||||
#define __MES_MACROS_H
|
||||
|
||||
#define TYPE(x) g_cells[x].type
|
||||
#define CAR(x) g_cells[x].car
|
||||
#define CDR(x) g_cells[x].cdr
|
||||
|
||||
#define NTYPE(x) g_news[x].type
|
||||
#define NCAR(x) g_news[x].car
|
||||
#define NCDR(x) g_news[x].cdr
|
||||
|
||||
#define BYTES(x) g_cells[x].car
|
||||
#define LENGTH(x) g_cells[x].car
|
||||
#define REF(x) g_cells[x].car
|
||||
#define START(x) (g_cells[x].car >> 16)
|
||||
#define LEN(x) (g_cells[x].car & 0xffff)
|
||||
#define VARIABLE(x) g_cells[x].car
|
||||
|
||||
#define CLOSURE(x) g_cells[x].cdr
|
||||
#define CONTINUATION(x) g_cells[x].cdr
|
||||
|
||||
#define CBYTES(x) (char*)&g_cells[x].cdr
|
||||
#define CSTRING_STRUCT(x) (char*)&g_cells[x.cdr].cdr
|
||||
|
||||
#define MACRO(x) g_cells[x].car
|
||||
#define NAME(x) g_cells[x].cdr
|
||||
#define PORT(x) g_cells[x].car
|
||||
#define STRING(x) g_cells[x].cdr
|
||||
#define STRUCT(x) g_cells[x].cdr
|
||||
#define VALUE(x) g_cells[x].cdr
|
||||
#define VECTOR(x) g_cells[x].cdr
|
||||
|
||||
#define NLENGTH(x) g_news[x].car
|
||||
#define NCBYTES(x) (char*)&g_news[x].cdr
|
||||
#define NVALUE(x) g_news[x].cdr
|
||||
#define NSTRING(x) g_news[x].cdr
|
||||
#define NVECTOR(x) g_news[x].cdr
|
||||
|
||||
#define CSTRING(x) CBYTES (STRING (x))
|
||||
|
||||
#define MAKE_BYTES0(x) make_bytes (x, strlen (x))
|
||||
#define NAME_SYMBOL(symbol,name) {size_t s = strlen (name); CAR (symbol) = s; CDR (symbol) = make_bytes (name, s);}
|
||||
|
||||
#define MAKE_CHAR(n) make_cell__ (TCHAR, 0, n)
|
||||
#define MAKE_CONTINUATION(n) make_cell__ (TCONTINUATION, n, g_stack)
|
||||
#define MAKE_NUMBER(n) make_cell__ (TNUMBER, 0, (long)n)
|
||||
#define MAKE_REF(n) make_cell__ (TREF, n, 0)
|
||||
#define MAKE_STRING0(x) make_string (x, strlen (x))
|
||||
#define MAKE_STRING_PORT(x) make_cell__ (TPORT, -length__ (g_ports) - 2, x)
|
||||
#define MAKE_MACRO(name, x) make_cell__ (TMACRO, x, STRING (name))
|
||||
|
||||
#define CAAR(x) CAR (CAR (x))
|
||||
#define CADR(x) CAR (CDR (x))
|
||||
#define CDAR(x) CDR (CAR (x))
|
||||
#define CDDR(x) CDR (CDR (x))
|
||||
#define CADAR(x) CAR (CDR (CAR (x)))
|
||||
#define CADDR(x) CAR (CDR (CDR (x)))
|
||||
#define CDADAR(x) CAR (CDR (CAR (CDR (x))))
|
||||
|
||||
#endif //__MES_MACROS_H
|
|
@ -0,0 +1,106 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2016,2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
* GNU Mes is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or (at
|
||||
* your option) any later version.
|
||||
*
|
||||
* GNU Mes is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __MES_MES_H
|
||||
#define __MES_MES_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
typedef long SCM;
|
||||
|
||||
struct scm
|
||||
{
|
||||
long type;
|
||||
SCM car;
|
||||
SCM cdr;
|
||||
};
|
||||
|
||||
// mes
|
||||
extern int g_debug;
|
||||
extern char *g_buf;
|
||||
extern SCM g_continuations;
|
||||
extern SCM g_symbols;
|
||||
extern SCM g_symbol_max;
|
||||
|
||||
// a/env
|
||||
extern SCM r0;
|
||||
// param 1
|
||||
extern SCM r1;
|
||||
// save 2
|
||||
extern SCM r2;
|
||||
// continuation
|
||||
extern SCM r3;
|
||||
// current-module
|
||||
extern SCM m0;
|
||||
// macro
|
||||
extern SCM g_macros;
|
||||
extern SCM g_ports;
|
||||
|
||||
// gc
|
||||
extern long ARENA_SIZE;
|
||||
extern long MAX_ARENA_SIZE;
|
||||
extern long STACK_SIZE;
|
||||
extern long JAM_SIZE;
|
||||
extern long GC_SAFETY;
|
||||
extern long MAX_STRING;
|
||||
extern char *g_arena;
|
||||
extern long g_free;
|
||||
extern SCM g_stack;
|
||||
extern SCM *g_stack_array;
|
||||
extern struct scm *g_cells;
|
||||
extern struct scm *g_news;
|
||||
|
||||
SCM alloc (long n);
|
||||
SCM apply (SCM f, SCM x, SCM a);
|
||||
SCM apply_builtin (SCM fn, SCM x);
|
||||
SCM cstring_to_list (char const *s);
|
||||
SCM cstring_to_symbol (char const *s);
|
||||
SCM display_ (SCM x);
|
||||
SCM fdisplay_ (SCM, int, int);
|
||||
SCM gc_init ();
|
||||
SCM gc_peek_frame ();
|
||||
SCM gc_pop_frame ();
|
||||
SCM gc_push_frame ();
|
||||
SCM init_time (SCM a);
|
||||
SCM make_bytes (char const *s, size_t length);
|
||||
SCM make_cell__ (long type, SCM car, SCM cdr);
|
||||
SCM make_hash_table_ (long size);
|
||||
SCM make_hashq_type ();
|
||||
SCM make_initial_module (SCM a);
|
||||
SCM make_string (char const *s, size_t length);
|
||||
SCM make_vector__ (long k);
|
||||
SCM read_input_file_env (SCM);
|
||||
SCM string_equal_p (SCM a, SCM b);
|
||||
SCM struct_ref_ (SCM x, long i);
|
||||
SCM struct_set_x_ (SCM x, long i, SCM e);
|
||||
SCM vector_ref_ (SCM x, long i);
|
||||
SCM vector_set_x_ (SCM x, long i, SCM e);
|
||||
int peekchar ();
|
||||
int readchar ();
|
||||
int unreadchar ();
|
||||
long length__ (SCM x);
|
||||
size_t bytes_cells (size_t length);
|
||||
void assert_max_string (size_t i, char const *msg, char *string);
|
||||
|
||||
#include "mes/builtins.h"
|
||||
#include "mes/constants.h"
|
||||
#include "mes/macros.h"
|
||||
|
||||
#endif //__MES_MES_H
|
|
@ -20,10 +20,12 @@
|
|||
#ifndef __MES_PWD_H
|
||||
#define __MES_PWD_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_PWD_H
|
||||
#include_next <pwd.h>
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
struct passwd
|
||||
{
|
||||
|
@ -36,9 +38,9 @@ struct passwd
|
|||
char *pw_shell;
|
||||
};
|
||||
|
||||
struct passwd * getpwuid ();
|
||||
struct passwd *getpwuid ();
|
||||
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_PWD_H
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
#ifndef __MES_SETJMP_H
|
||||
#define __MES_SETJMP_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_SETJMP_H
|
||||
#include_next <setjmp.h>
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -42,6 +42,6 @@ jmp_buf buf;
|
|||
void longjmp (jmp_buf env, int val);
|
||||
int setjmp (jmp_buf env);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_SETJMP_H
|
||||
|
|
|
@ -20,17 +20,23 @@
|
|||
#ifndef __MES_SIGNAL_H
|
||||
#define __MES_SIGNAL_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_SIGNAL_H
|
||||
#include_next <signal.h>
|
||||
#else //! WITH_GLIBC
|
||||
#else //! SYSTEM_LIBC
|
||||
|
||||
#define _NSIG 64
|
||||
|
||||
typedef long sigset_t;
|
||||
#define _SIGSET_NITEMS (_NSIG / (8 * sizeof(unsigned long)))
|
||||
|
||||
typedef struct {
|
||||
unsigned long items[_SIGSET_NITEMS];
|
||||
} sigset_t;
|
||||
typedef long stack_t;
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
// *INDENT-OFF*
|
||||
#define NSIG 30
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
|
@ -85,40 +91,39 @@ typedef long stack_t;
|
|||
#define SA_NOMASK SA_NODEFER
|
||||
#define SA_ONESHOT SA_RESETHAND
|
||||
|
||||
|
||||
typedef struct siginfo_t
|
||||
{
|
||||
int si_signo;
|
||||
int si_errno;
|
||||
int si_code;
|
||||
int si_trapno;
|
||||
pid_t si_pid;
|
||||
uid_t si_uid;
|
||||
int si_status;
|
||||
clock_t si_utime;
|
||||
clock_t si_stime;
|
||||
sigval_t si_value;
|
||||
int si_int;
|
||||
void *si_ptr;
|
||||
int si_overrun;
|
||||
int si_timerid;
|
||||
void *si_addr;
|
||||
long si_band;
|
||||
int si_fd;
|
||||
short si_addr_lsb;
|
||||
void *si_lower;
|
||||
void *si_upper;
|
||||
int si_pkey;
|
||||
void *si_call_addr;
|
||||
int si_syscall;
|
||||
int si_signo;
|
||||
int si_errno;
|
||||
int si_code;
|
||||
int si_trapno;
|
||||
pid_t si_pid;
|
||||
uid_t si_uid;
|
||||
int si_status;
|
||||
clock_t si_utime;
|
||||
clock_t si_stime;
|
||||
sigval_t si_value;
|
||||
int si_int;
|
||||
void *si_ptr;
|
||||
int si_overrun;
|
||||
int si_timerid;
|
||||
void *si_addr;
|
||||
long si_band;
|
||||
int si_fd;
|
||||
short si_addr_lsb;
|
||||
void *si_lower;
|
||||
void *si_upper;
|
||||
int si_pkey;
|
||||
void *si_call_addr;
|
||||
int si_syscall;
|
||||
unsigned int si_arch;
|
||||
} siginfo_t;
|
||||
|
||||
// *INDENT-ON*
|
||||
|
||||
#if __MESC__
|
||||
typedef long sighandler_t;
|
||||
#else
|
||||
typedef void (*sighandler_t)(int);
|
||||
typedef void (*sighandler_t) (int);
|
||||
#endif
|
||||
|
||||
struct sigaction
|
||||
|
@ -199,14 +204,14 @@ struct _libc_fpstate
|
|||
typedef struct _libc_fpstate *fpregset_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gregset_t gregs;
|
||||
/* Due to Linux's history we have to use a pointer here. The SysV/i386
|
||||
ABI requires a struct with the values. */
|
||||
fpregset_t fpregs;
|
||||
unsigned long int oldmask;
|
||||
unsigned long int cr2;
|
||||
} mcontext_t;
|
||||
{
|
||||
gregset_t gregs;
|
||||
/* Due to Linux's history we have to use a pointer here. The SysV/i386
|
||||
ABI requires a struct with the values. */
|
||||
fpregset_t fpregs;
|
||||
unsigned long int oldmask;
|
||||
unsigned long int cr2;
|
||||
} mcontext_t;
|
||||
|
||||
/* Userlevel context. */
|
||||
typedef struct ucontext
|
||||
|
@ -222,20 +227,20 @@ typedef struct ucontext
|
|||
|
||||
int kill (pid_t pid, int signum);
|
||||
int sigaction (int signum, struct sigaction const *act, struct sigaction *oldact);
|
||||
int sigaddset (sigset_t *set, int signum);
|
||||
int sigaddset (sigset_t * set, int signum);
|
||||
#if __MESC__
|
||||
void* signal (int signum, void * action);
|
||||
void *signal (int signum, void *action);
|
||||
#else
|
||||
sighandler_t signal (int signum, sighandler_t action);
|
||||
#endif
|
||||
int sigemptyset (sigset_t *set);
|
||||
int sigemptyset (sigset_t * set);
|
||||
#ifndef SIG_BLOCK
|
||||
#define SIG_BLOCK 0
|
||||
#define SIG_UNBLOCK 1
|
||||
#define SIG_SETMASK 2
|
||||
#endif
|
||||
int sigprocmask (int how, sigset_t const *set, sigset_t *oldset);
|
||||
int sigprocmask (int how, sigset_t const *set, sigset_t * oldset);
|
||||
|
||||
#endif //! WITH_GLIBC
|
||||
#endif //! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_SIGNAL_H
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,10 +20,10 @@
|
|||
#ifndef __MES_STDARG_H
|
||||
#define __MES_STDARG_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_STDARG_H
|
||||
#include_next <stdarg.h>
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
|
@ -31,18 +31,19 @@
|
|||
#define __FOO_VARARGS 1
|
||||
#endif
|
||||
|
||||
typedef long va_list;
|
||||
typedef char *va_list;
|
||||
#define va_start(ap, last) (void)((ap) = (char*)(&(last) + 1))
|
||||
#define va_arg(ap, type) (type)(((long*)((ap) = ((ap) + sizeof (void*))))[-1])
|
||||
#define va_end(ap) (void)((ap) = 0)
|
||||
#define va_copy(dest, src) dest = src
|
||||
|
||||
int vfprintf (FILE *stream, char const *template, va_list ap);
|
||||
int vprintf (char const* format, va_list ap);
|
||||
int vexec (char const *file_name, va_list ap);
|
||||
int vfprintf (FILE * stream, char const *template, va_list ap);
|
||||
int vprintf (char const *format, va_list ap);
|
||||
int vsprintf (char *str, char const *format, va_list ap);
|
||||
int vsnprintf (char *str, size_t size, char const *format, va_list ap);
|
||||
int vsscanf (char const *s, char const *template, va_list ap);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_STDARG_H
|
||||
|
|
|
@ -20,17 +20,17 @@
|
|||
#ifndef __MES_STDBOOL_H
|
||||
#define __MES_STDBOOL_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_STDBOOL_H
|
||||
#include_next <stdbool.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
typedef int bool;
|
||||
#define false 0
|
||||
#define true 1
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_STDBOOL_H
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
#ifndef __MES_STDDEF_H
|
||||
#define __MES_STDDEF_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_STDDEF_H
|
||||
#include_next <stddef.h>
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
|
@ -37,6 +37,6 @@
|
|||
#endif // !__MESC__
|
||||
#endif // offsetof
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_STDDEF_H
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
#ifndef __MES_STDINT_H
|
||||
#define __MES_STDINT_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_STDINT_H
|
||||
#include_next <stdint.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#undef unsigned
|
||||
#undef uint8_t
|
||||
|
@ -58,28 +58,10 @@ typedef int int32_t;
|
|||
typedef unsigned long long uint64_t;
|
||||
typedef long long int64_t;
|
||||
|
||||
#ifndef __MES_SIZE_T
|
||||
#define __MES_SIZE_T
|
||||
#undef size_t
|
||||
typedef unsigned long size_t;
|
||||
#endif
|
||||
|
||||
#ifndef __MES_INTPTR_T
|
||||
#define __MES_INTPTR_T
|
||||
#undef intptr_t
|
||||
typedef long intptr_t;
|
||||
#endif
|
||||
|
||||
// FIXME
|
||||
typedef int intmax_t;
|
||||
typedef unsigned uintmax_t;
|
||||
typedef unsigned* uintptr_t;
|
||||
|
||||
#ifndef __MES_PTRDIFF_T
|
||||
#define __MES_PTRDIFF_T
|
||||
#undef ptrdiff_t
|
||||
typedef long ptrdiff_t;
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#define CHAR_BIT 8
|
||||
#define CHAR_MAX 255
|
||||
|
@ -121,6 +103,6 @@ typedef long ptrdiff_t;
|
|||
#define SIZE_MAX UINT64_MAX
|
||||
#endif
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_STDINT_H
|
||||
|
|
|
@ -20,21 +20,21 @@
|
|||
#ifndef __MES_STDIO_H
|
||||
#define __MES_STDIO_H 1
|
||||
|
||||
#include <libmes.h>
|
||||
#include <mes/lib.h>
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_STDIO_H
|
||||
#include_next <stdio.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#ifndef _IOFBF
|
||||
#define _IOFBF 0 /* Fully buffered. */
|
||||
#define _IOLBF 1 /* Line buffered. */
|
||||
#define _IONBF 2 /* No buffering. */
|
||||
#define _IOFBF 0 /* Fully buffered. */
|
||||
#define _IOLBF 1 /* Line buffered. */
|
||||
#define _IONBF 2 /* No buffering. */
|
||||
#endif
|
||||
|
||||
#ifndef BUFSIZ
|
||||
|
@ -58,36 +58,36 @@
|
|||
FILE *fdopen (int fd, char const *mode);
|
||||
FILE *fopen (char const *file_name, char const *mode);
|
||||
int eputc (int c);
|
||||
int eputs (char const* s);
|
||||
int fclose (FILE *stream);
|
||||
int feof (FILE *stream);
|
||||
int ferror (FILE *stream);
|
||||
int fflush (FILE *stream);
|
||||
int fgetc (FILE* stream);
|
||||
char *fgets (char *s, int size, FILE *stream);
|
||||
int fprintf (FILE *stream, char const *format, ...);
|
||||
int fpurge (FILE *stream);
|
||||
int fputc (int c, FILE *stream);
|
||||
int fputs (char const* s, FILE *stream);
|
||||
int fseek (FILE *stream, long offset, int whence);
|
||||
int getc (FILE *stream);
|
||||
int eputs (char const *s);
|
||||
int fclose (FILE * stream);
|
||||
int feof (FILE * stream);
|
||||
int ferror (FILE * stream);
|
||||
int fflush (FILE * stream);
|
||||
int fgetc (FILE * stream);
|
||||
char *fgets (char *s, int size, FILE * stream);
|
||||
int fprintf (FILE * stream, char const *format, ...);
|
||||
int fpurge (FILE * stream);
|
||||
int fputc (int c, FILE * stream);
|
||||
int fputs (char const *s, FILE * stream);
|
||||
int fseek (FILE * stream, long offset, int whence);
|
||||
int getc (FILE * stream);
|
||||
int getchar (void);
|
||||
char *getlogin (void);
|
||||
int printf (char const* format, ...);
|
||||
int putc (int c, FILE* stream);
|
||||
int printf (char const *format, ...);
|
||||
int putc (int c, FILE * stream);
|
||||
int putchar (int c);
|
||||
int puts (char const* s);
|
||||
int puts (char const *s);
|
||||
int remove (char const *file_name);
|
||||
int setvbuf (FILE *stream, char *buf, int mode, size_t size);
|
||||
int snprintf(char *str, size_t size, char const *format, ...);
|
||||
int sprintf (char *str, char const* format, ...);
|
||||
int setvbuf (FILE * stream, char *buf, int mode, size_t size);
|
||||
int snprintf (char *str, size_t size, char const *format, ...);
|
||||
int sprintf (char *str, char const *format, ...);
|
||||
int sscanf (char const *str, const char *format, ...);
|
||||
int ungetc (int c, FILE* stream);
|
||||
long ftell (FILE *stream);
|
||||
size_t fread (void *ptr, size_t size, size_t count, FILE *stream);
|
||||
size_t freadahead (FILE *fp);
|
||||
size_t fwrite (void const *ptr, size_t size, size_t count, FILE *stream);
|
||||
int ungetc (int c, FILE * stream);
|
||||
long ftell (FILE * stream);
|
||||
size_t fread (void *ptr, size_t size, size_t count, FILE * stream);
|
||||
size_t freadahead (FILE * fp);
|
||||
size_t fwrite (void const *ptr, size_t size, size_t count, FILE * stream);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_STDIO_H
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*-comment-start: "//";comment-end:""-*-
|
||||
* GNU Mes --- Maxwell Equations of Software
|
||||
* Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
* Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
*
|
||||
* This file is part of GNU Mes.
|
||||
*
|
||||
|
@ -20,28 +20,34 @@
|
|||
#ifndef __MES_STDLIB_H
|
||||
#define __MES_STDLIB_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#ifndef __MES_COMPARISON_FN_T
|
||||
#define __MES_COMPARISON_FN_T
|
||||
typedef int (*comparison_fn_t) (void const *, void const *);
|
||||
#endif
|
||||
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_STDLIB_H
|
||||
#include_next <stdlib.h>
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <alloca.h>
|
||||
|
||||
double atof (char const *s);
|
||||
int atoi (char const *s);
|
||||
int atexit (void (*function) (void));
|
||||
void * calloc (size_t nmemb, size_t size);
|
||||
void *calloc (size_t nmemb, size_t size);
|
||||
void _exit (int status);
|
||||
void exit (int status);
|
||||
void free (void *ptr);
|
||||
char* getenv (char const* s);
|
||||
int setenv (char const* s, char const* v, int overwrite_p);
|
||||
char *getenv (char const *s);
|
||||
int setenv (char const *s, char const *v, int overwrite_p);
|
||||
void unsetenv (char const *name);
|
||||
void *malloc (size_t);
|
||||
void qsort (void *base, size_t nmemb, size_t size, int (*compar)(void const *, void const *));
|
||||
void qsort (void *base, size_t nmemb, size_t size, int (*compar) (void const *, void const *));
|
||||
int rand (void);
|
||||
void *realloc (void *p, size_t size);
|
||||
double strtod (char const *string, char **tailptr);
|
||||
|
@ -55,13 +61,8 @@ unsigned long long strtoull (char const *string, char **tailptr, int base);
|
|||
#define EXIT_FAILURE 1
|
||||
#define EXIT_SUCCESS 0
|
||||
|
||||
#ifndef __MES_COMPARISON_FN_T
|
||||
#define __MES_COMPARISON_FN_T
|
||||
typedef int (*comparison_fn_t) (void const *, void const *);
|
||||
#endif
|
||||
void *bsearch (void const *key, void const *array, size_t count, size_t size, comparison_fn_t compare);
|
||||
|
||||
void * bsearch (void const *key, void const *array, size_t count, size_t size, comparison_fn_t compare);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_STDLIB_H
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
#ifndef __MES_STDNORETURN_H
|
||||
#define __MES_STDNORETURN_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_STDNORETURN_H
|
||||
#include_next <stdnoreturn.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
// whut?
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_STDNORETURN_H
|
||||
|
|
|
@ -20,55 +20,41 @@
|
|||
#ifndef __MES_STRING_H
|
||||
#define __MES_STRING_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#undef __MES_STRING_H
|
||||
#include_next <string.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef __MES_SIZE_T
|
||||
#define __MES_SIZE_T
|
||||
#undef size_t
|
||||
typedef unsigned long size_t;
|
||||
#endif
|
||||
|
||||
#ifndef __MES_SSIZE_T
|
||||
#define __MES_SSIZE_T
|
||||
#undef ssize_t
|
||||
typedef long ssize_t;
|
||||
#endif
|
||||
|
||||
void * memchr (void const *block, int c, size_t size);
|
||||
void *memchr (void const *block, int c, size_t size);
|
||||
void *memcpy (void *dest, void const *src, size_t n);
|
||||
void *memmove (void *dest, void const *src, size_t n);
|
||||
void *memset (void *s, int c, size_t n);
|
||||
void * memchr (void const *block, int c, size_t size);
|
||||
void *memchr (void const *block, int c, size_t size);
|
||||
int memcmp (void const *s1, void const *s2, size_t n);
|
||||
|
||||
void *memmem (void const *haystack, int haystack_len, void const *needle, int needle_len);
|
||||
char *strcat (char *dest, char const *src);
|
||||
char *strchr (char const *s, int c);
|
||||
int strcasecmp (char const *s1, char const *s2);
|
||||
int strcmp (char const*, char const*);
|
||||
int strcmp (char const *, char const *);
|
||||
char *strcpy (char *dest, char const *src);
|
||||
size_t strlen (char const*);
|
||||
size_t strlen (char const *);
|
||||
char *strncpy (char *to, char const *from, size_t size);
|
||||
int strncmp (char const*, char const*, size_t);
|
||||
int strncmp (char const *, char const *, size_t);
|
||||
char *strrchr (char const *s, int c);
|
||||
char *strstr (char const *haystack, char const *needle);
|
||||
char * strlwr (char *string);
|
||||
char * strupr (char *string);
|
||||
char *strlwr (char *string);
|
||||
char *strupr (char *string);
|
||||
|
||||
|
||||
char *strerror (int errnum);
|
||||
void perror (char const *message);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_STRING_H
|
||||
|
|
|
@ -20,10 +20,9 @@
|
|||
#ifndef __MES_STRINGS_H
|
||||
#define __MES_STRINGS_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_STRINGS_H
|
||||
#include_next <strings.h>
|
||||
#endif // (WITH_GLIBC)
|
||||
#endif // (SYSTEM_LIBC)
|
||||
|
||||
#endif // __MES_STRINGS_H
|
||||
|
||||
|
|
|
@ -20,10 +20,9 @@
|
|||
#ifndef __MES_SYS_CDEFS_H
|
||||
#define __MES_SYS_CDEFS_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_SYS_CDEFS_H
|
||||
#include_next <sys/cdefs.h>
|
||||
#endif // (WITH_GLIBC)
|
||||
#endif // (SYSTEM_LIBC)
|
||||
|
||||
#endif // __MES_SYS_CDEFS_H
|
||||
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
#ifndef __MES_SYS_DIR_H
|
||||
#define __MES_SYS_DIR_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_SYS_DIR_H
|
||||
#include_next <sys/dir.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_SYS_DIR_H
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
#ifndef __MES_SYS_FILE_H
|
||||
#define __MES_SYS_FILE_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_SYS_FILE_H
|
||||
#include_next <sys/file.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_SYS_FILE_H
|
||||
|
|
|
@ -20,17 +20,16 @@
|
|||
#ifndef __MES_SYS_IOCTL_H
|
||||
#define __MES_SYS_IOCTL_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_SYS_IOCTL_H
|
||||
#include_next <sys/ioctl.h>
|
||||
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#define TCGETS 0x5401
|
||||
#define TCGETA 0x5405
|
||||
int ioctl (int fd, unsigned long request, ...);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_SYS_IOCTL_H
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
#ifndef __MES_SYS_MMAN_H
|
||||
#define __MES_SYS_MMAN_H 1
|
||||
|
||||
#if WITH_GLIBC
|
||||
#if SYSTEM_LIBC
|
||||
#undef __MES_SYS_MMAN_H
|
||||
#include_next <sys/mman.h>
|
||||
#else // ! WITH_GLIBC
|
||||
#else // ! SYSTEM_LIBC
|
||||
|
||||
#ifndef __MES_SIZE_T
|
||||
#define __MES_SIZE_T
|
||||
|
@ -37,7 +37,7 @@ typedef unsigned long size_t;
|
|||
|
||||
int mprotect (void *addr, size_t len, int prot);
|
||||
|
||||
#endif // ! WITH_GLIBC
|
||||
#endif // ! SYSTEM_LIBC
|
||||
|
||||
#endif // __MES_SYS_MMAN_H
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue