mes.git
4 months agobuild: Have configure respect GUILE_LOAD_PATH for mes to find Nyacc.
Jan Nieuwenhuizen [Sun, 15 Dec 2019 09:10:23 +0000 (10:10 +0100)]
build: Have configure respect GUILE_LOAD_PATH for mes to find Nyacc.

* configure: Substitute GUILE_LOAD_PATH from %load-path.
* configure.sh: Likewise.
* build-aux/config.make.in: Add GUILE_LOAD_PATH as subtitution variable.
* build-aux/config.sh.in: Likewise.
* mes/module/mes/guile.mes (%load-path): New variable.

4 months agobuild: Have configure prefer $CC over gcc; tcc over gcc, gcc over cc.
Jan Nieuwenhuizen [Fri, 13 Dec 2019 16:21:53 +0000 (17:21 +0100)]
build: Have configure prefer $CC over gcc; tcc over gcc, gcc over cc.

Reported by Vagrant Cascadian.

* configure (string->version): Prefer for most-dotted string.  Fixes
makeinfo version.
(check-program-version): Prefer displaying of command, if single word.
(main): Check for $CC --version, $CC -v.  Prefer $CC over gcc; tcc over
gcc, gcc over cc.

4 months agomescc: Opt for reproducible builds with Guile and Mes.
Jan Nieuwenhuizen [Thu, 12 Dec 2019 11:04:15 +0000 (12:04 +0100)]
mescc: Opt for reproducible builds with Guile and Mes.

* module/mescc/compile.scm (mes-or-reproducible?): New variable.
(ast->comment): Use it.
* module/mescc/preprocess.scm (mes-or-reproducible?): New variable.
(c99-input->full-ast): Use it.

4 months agobuild: Resurrect compiling with TinyCC.
Jan Nieuwenhuizen [Thu, 12 Dec 2019 05:55:43 +0000 (06:55 +0100)]
build: Resurrect compiling with TinyCC.

   ./configure CC=tcc --host=i686-unknown-linux-gnu --with-courage

* configure: Cater for tcc.

5 months agobuild: Cater for FreeBSD.
Jan Nieuwenhuizen [Wed, 11 Dec 2019 13:04:27 +0000 (13:04 +0000)]
build: Cater for FreeBSD.

* build-aux/bootstrap.sh.in: Add test ! -e -o to satisfy FreeBSD test.
Fixes skipping over all compilations.
* build-aux/cc.sh (compile): Likewise.

5 months agofreebsd: Initial x86 scaffold.
Jan Nieuwenhuizen [Wed, 11 Dec 2019 08:21:51 +0000 (08:21 +0000)]
freebsd: Initial x86 scaffold.

* lib/freebsd/x86-mes-gcc/crt1.c: New file.
* lib/freebsd/x86-mes-gcc/exit-42.S: New file.
* lib/freebsd/x86-mes-gcc/hello-mes.S: New file.
* lib/freebsd/x86-mes-gcc/mini.c: New file.
* lib/freebsd/x86-mes-mescc/crt1.c: New file.
* lib/freebsd/x86-mes-mescc/mini.c: New file.
* lib/freebsd/x86-mes/elf32-0exit-42.hex2: New file.
* lib/freebsd/x86-mes/elf32-0header.hex2: New file.
* lib/freebsd/x86-mes/elf32-0hello-mes.hex2: New file.
* lib/freebsd/x86-mes/elf32-body-exit-42.hex2: New file.
* lib/freebsd/x86-mes/elf32-body-hello-mes.hex2: New file.
* lib/freebsd/x86-mes/elf32-footer-single-main.hex2: New file.
* lib/freebsd/x86-mes/elf32-header.hex2: New file.

5 months agofreebsd: Initial configure support.
Jan Nieuwenhuizen [Wed, 11 Dec 2019 00:10:22 +0000 (00:10 +0000)]
freebsd: Initial configure support.

* configure: Initial FreeBSD configure support.
* configure.sh: Likewise.  Run without bash.

5 months agobuild: Prepare for kernel variants.
Jan Nieuwenhuizen [Wed, 11 Dec 2019 07:16:46 +0000 (07:16 +0000)]
build: Prepare for kernel variants.

* configure: Fix detection of Arch, FreeBSD.
* lib/linux/x86-mes-gcc/exit-42.S: Move from ...
* lib/x86-mes-gcc/exit-42.S: ... here.
* lib/linux/x86-mes-gcc/hello-mes.S: Move from ...
* lib/x86-mes-gcc/hello-mes.S: ... here.
* lib/linux/x86-mes-mescc/exit-42.S: Move from ...
* lib/x86-mes-mescc/exit-42.S: ... here.
* lib/linux/x86-mes-mescc/hello-mes.S: Move from ...
* lib/x86-mes-mescc/hello-mes.S: ... here.
* lib/linux/x86-mes/elf32-0exit-42.hex2: Move from ...
* lib/x86-mes/elf32-0exit-42.hex2: ... here.
* lib/linux/x86-mes/elf32-0header.hex2: Move from ...
* lib/x86-mes/elf32-0header.hex2: ... here.
* lib/linux/x86-mes/elf32-0hello-mes.hex2: Move from ...
* lib/x86-mes/elf32-0hello-mes.hex2: ... here.
* lib/linux/x86-mes/elf32-body-exit-42.hex2: Move from ...
* lib/x86-mes/elf32-body-exit-42.hex2: ... here.
* lib/linux/x86-mes/elf32-body-hello-mes.hex2: Move from ...
* lib/x86-mes/elf32-body-hello-mes.hex2: ... here.
* lib/linux/x86-mes/elf32-footer-single-main.hex2: Move from ...
* lib/x86-mes/elf32-footer-single-main.hex2: ... here.
* lib/linux/x86-mes/elf32-header.hex2: Move from ...
* lib/x86-mes/elf32-header.hex2: ... here.
* lib/linux/x86_64-mes-gcc/exit-42.S: Move from ...
* lib/x86_64-mes-gcc/exit-42.S: ... here.
* lib/linux/x86_64-mes-gcc/hello-mes.S: Move from ...
* lib/x86_64-mes-gcc/hello-mes.S: ... here.
* lib/linux/x86_64-mes-mescc/exit-42.S: Move from ...
* lib/x86_64-mes-mescc/exit-42.S: ... here.
* lib/linux/x86_64-mes-mescc/hello-mes.S: Move from ...
* lib/x86_64-mes-mescc/hello-mes.S: ... here.
* lib/linux/x86_64-mes/elf64-0exit-42.hex2: Move from ...
* lib/x86_64-mes/elf64-0exit-42.hex2: ... here.
* lib/linux/x86_64-mes/elf64-0header.hex2: Move from ...
* lib/x86_64-mes/elf64-0header.hex2: ... here.
* lib/linux/x86_64-mes/elf64-0hello-mes.hex2: Move from ...
* lib/x86_64-mes/elf64-0hello-mes.hex2: ... here.
* lib/linux/x86_64-mes/elf64-body-exit-42.hex2: Move from ...
* lib/x86_64-mes/elf64-body-exit-42.hex2: ... here.
* lib/linux/x86_64-mes/elf64-body-hello-mes.hex2: Move from ...
* lib/x86_64-mes/elf64-body-hello-mes.hex2: ... here.
* lib/linux/x86_64-mes/elf64-footer-single-main.hex2: Move from ...
* lib/x86_64-mes/elf64-footer-single-main.hex2: ... here.
* lib/linux/x86_64-mes/elf64-header.hex2: Move from ...
* lib/x86_64-mes/elf64-header.hex2: ... here.
* module/mescc.scm (parse-opts): Support --kernel.
* module/mescc/mescc.scm (kernel-find): New function.
* module/mescc/mescc.scm (hex2->elf): Use it to find kernel-specific ELF
snippets.
* build-aux/install.sh.in: Install it.

5 months agomescc: Mes C Library: Add ioctl3 stub.
Jan Nieuwenhuizen [Wed, 11 Dec 2019 15:41:41 +0000 (10:41 -0500)]
mescc: Mes C Library: Add ioctl3 stub.

5 months agomescc: Mes C Library: Fix access stub.
Jan Nieuwenhuizen [Sat, 16 Mar 2019 15:36:00 +0000 (16:36 +0100)]
mescc: Mes C Library: Fix access stub.

* lib/stub/access.c (access): Use _open3 to give more meaningful
behaviour.  Fixes hanging of mes.

5 months agohurd: Fixes for upgrade to debian-hurd-20190220.img.
Jan Nieuwenhuizen [Fri, 15 Mar 2019 23:14:05 +0000 (19:14 -0400)]
hurd: Fixes for upgrade to debian-hurd-20190220.img.

* include/mach/mach-init.h (__mach_host_self, __mach_task_self):
Remove macro magic.
(mach_host_self, mach_task_self): Remove macro magic; declare as function.
* lib/mach/mach-init.c (mach_host_self, mach_task_self): New function.
(mach_init): Use them.
* lib/gnu/hurd-start.c (_hurd_start): Use mach_task_self ().
* lib/gnu/_exit.c (_exit): Likewise.

5 months agohurd: Add malloc.
Jan Nieuwenhuizen [Tue, 12 Mar 2019 22:58:52 +0000 (23:58 +0100)]
hurd: Add malloc.

* include/gnu/syscall.h (__vm_allocate): New value.
(__vm_allocate): Declare.
* lib/gnu/malloc.c: New file.
* lib/stdlib/malloc.c[__GNU__]: Disable.  See FIXME.
* lib/gnu/vm-allocate.c: New file.
* build-aux/configure-lib.sh (libc_SOURCES): Add it.

5 months agohurd: Add open.
Jan Nieuwenhuizen [Wed, 13 Mar 2019 23:08:35 +0000 (00:08 +0100)]
hurd: Add open.

* include/fcntl.h (O_RDONLY, O_WRONLY, O_RDWR, O_CREAT, O_APPEND,
O_TRUNC)[__GNU__]: Specialize for GNU.
* lib/gnu/dir-lookup.c: New file.
* lib/stdio/fopen.c (fopen): Use O_RDONLY.
* lib/tests/posix/50-open-read.c (main): Likewise.
* lib/tests/stdio/90-fseek.c (main): Likewise.
* include/gnu/syscall.h (SYS__dir_lookup): New value.
* lib/gnu/_open3.c: New file.
* build-aux/configure-lib.sh (libc_SOURCES): Build them.

5 months agohurd: Add argv and environ.
Jan Nieuwenhuizen [Wed, 13 Mar 2019 07:51:44 +0000 (03:51 -0400)]
hurd: Add argv and environ.

* include/gnu/hurd.h (struct hurd_startup_data): Add argp, envp.
* lib/gnu/hurd-start.c (__argv, __env): Define them.
* lib/gnu/exec-startup-get-data.c (mach_startup_info2hurd_startup_data):
Set them.
* lib/gnu/x86-mes-gcc/crt1.c (_start): Use them.
* build-aux/configure-lib.sh (libc_mini_SOURCES): Add argz-extract.c.
* include/argz.h: Build fix.
* lib/string/argz-count.c: Likewise.
* lib/string/argz-extract.c: Likewise.

5 months agohurd: Add stubs for missing libc+tcc functions.
Jan Nieuwenhuizen [Sat, 27 Apr 2019 10:21:10 +0000 (06:21 -0400)]
hurd: Add stubs for missing libc+tcc functions.

* lib/stub/close.c: New file.
* lib/stub/rmdir.c: New file.
* lib/stub/stat.c: New file.
* build-aux/configure-lib.sh (libc_tcc_SOURCES)[gnu]: Add them.

5 months agohurd: Add stubs for missing libc functions.
Jan Nieuwenhuizen [Tue, 12 Mar 2019 21:14:25 +0000 (22:14 +0100)]
hurd: Add stubs for missing libc functions.

* lib/stub/_getcwd.c: New file.
* lib/stub/_getcwd.c: New file.
* lib/stub/_open3.c: New file.
* lib/stub/access.c: New file.
* lib/stub/brk.c: New file.
* lib/stub/chmod.c: New file.
* lib/stub/clock_gettime.c: New file.
* lib/stub/dup.c: New file.
* lib/stub/dup2.c: New file.
* lib/stub/execve.c: New file.
* lib/stub/fork.c: New file.
* lib/stub/gettimeofday.c: New file.
* lib/stub/ioctl.c: New file.
* lib/stub/time.c: New file.
* lib/stub/unlink.c: New file.
* lib/stub/waitpid.c: New file.
* build-aux/configure-lib.sh (libc_SOURCES)[gnu]: Add them.

5 months agohurd: Add stubs for missing libmes functions.
Jan Nieuwenhuizen [Sat, 27 Apr 2019 10:59:43 +0000 (12:59 +0200)]
hurd: Add stubs for missing libmes functions.

* lib/stub/lseek.c: New file.
* build-aux/configure-lib.sh (libmes_SOURCES)[gnu]: Add it.

5 months agohurd: Add _read.
Jan Nieuwenhuizen [Tue, 12 Mar 2019 20:15:30 +0000 (21:15 +0100)]
hurd: Add _read.

* include/gnu/hurd.h (fd_read): Declare.
* include/gnu/syscall.h (SYS__io_read): New value.
* lib/gnu/_read.c: New file.
* lib/gnu/fd-read.c: New file.
* lib/gnu/io-read.c: New file.
* build-aux/configure-lib.sh (libc_SOURCES): Add _read sources.

5 months agohurd: Add _write.
Jan Nieuwenhuizen [Mon, 11 Mar 2019 21:45:56 +0000 (17:45 -0400)]
hurd: Add _write.

* include/gnu/syscall.h (SYS__io_write): Add enum field.
(_hurd_dtable, _hurd_dtable_size): Declare variable.
(fd_get, fd_write, __io_write, __syscall_put): Declare.
* lib/gnu/hurd-start.c (_hurd_dtable, _hurd_dtable_size): Define
variable.
* lib/gnu/_write.c: New file.
* lib/gnu/fd-get.c (fd_get): New file.
* lib/gnu/fd-write.c (fd_write): New file.
* lib/gnu/io-write.c: New file.
* lib/gnu/syscall.c (__syscall_put): New function.
* build-aux/cofnigure-lib.sh (libc_mini_SOURCES): Add write sources.
* lib/tests/mes/30-oputs.c (main): Update.
* lib/tests/mes/30-oputs.stdout: New file.
* lib/tests/mes/30-eputs.c: New test.
* lib/tests/mes/30-eputs.stderr: New file.
* build-aux/check-mescc.sh (TESTS): Add it.

5 months agohurd: Initial support.
Jan Nieuwenhuizen [Sun, 10 Mar 2019 20:52:05 +0000 (16:52 -0400)]
hurd: Initial support.

This adds minimal Hurd support by implementing the _exit function.

* AUTHORS: Update.
* .gitignore: Ignore a.out, core, .config.
* include/sys/wait.h (W_EXITCODE): New define.
* lib/gnu/x86-mes-gcc/crt1.c: New file.
* lib/gnu/x86-mes-gcc/mini.c: New file.
* lib/gnu/hurd-start.c: New file.
* lib/gnu/_exit.c: New file.
* include/gnu/syscall.h: New file.
* include/gnu/hurd.h: New file.
* lib/gnu/_exit.c: New file.
* lib/gnu/exec-startup-get-data.c: New file.
* lib/gnu/hurd-start.c: New file.
* lib/gnu/proc-mark-exit.c: New file.
* lib/gnu/syscall.c: New file.
* lib/gnu/task-get-special-port.c: New file.
* lib/gnu/task-terminate.c: New file.
* lib/gnu/vm-statistics.c: New file.
* build-aux/configure-lib.sh (libc_mini_SOURCES): Add Hurd sources.
* build-aux/build.sh.in (CPPFLAGS): Add lib to includes, to find linux
crt1.c.
* build-aux/test-c.sh: Always use at least -l c+mini for GNU.
* lib/tests/scaffold/30-exit-42.exit: New file.
* lib/tests/scaffold/30-exit-42.c: New test.
* build-aux/check-mescc.sh (TESTS): Add it.
* lib/tests/scaffold/30-exit-0.c (main): Move from 00-exit-0.c; Rewrite,
use _exit.
* include/gnu/hurd-types.h: Import from GNU C Library.
* include/mach/mach-init.h: Likewise.
* lib/mach/mach-init.c: Likewise.
* lib/mach/mach_host_self.S: Likewise.
* lib/mach/mach_msg_trap.S: Likewise.
* lib/mach/mach_reply_port.S: Likewise.
* lib/mach/mach_task_self.S: Likewise.
* lib/mach/mach_thread_self.S: Likewise.
* lib/mach/msg.c: Likewise.

5 months agobuild: Generate ChangeLog reproducibly. Thanks, Timothy!
Jan Nieuwenhuizen [Sun, 8 Dec 2019 20:13:48 +0000 (21:13 +0100)]
build: Generate ChangeLog reproducibly.  Thanks, Timothy!

* build-aux/gitlog-to-changelog (git_dir_option): Avoid non-reproducible
localtime.

5 months agobuild: Make guild optional for bootstrap builds.
Jan Nieuwenhuizen [Sun, 8 Dec 2019 15:39:53 +0000 (16:39 +0100)]
build: Make guild optional for bootstrap builds.

* configure: Use `true' for guild when it is not available.

5 months agobuild: Clean-out .gitignore.
Jan Nieuwenhuizen [Sun, 8 Dec 2019 21:05:14 +0000 (22:05 +0100)]
build: Clean-out .gitignore.

.gitignore: Remove obsolete cross build patterns.

5 months agobuild: Cater for bootstrap build.
Jan Nieuwenhuizen [Sun, 3 Nov 2019 21:15:11 +0000 (22:15 +0100)]
build: Cater for bootstrap build.

* build-aux/build.sh.in: Build bin/mes.  Update scripts and users.
* build-aux/bootstrap.sh.in: Update.
* build-aux/install.sh.in: Install all built bin/mes-* flavours.
* configure: Drop SEED, support --bootstrap.
* configure.sh: Likewise.

5 months agobuild: Oops, have configure honor --host.
Jan Nieuwenhuizen [Sun, 8 Dec 2019 14:48:27 +0000 (15:48 +0100)]
build: Oops, have configure honor --host.

This allows

    ./configure --host=i686-unknown-linux-gnu

instead of

    CC=i686-unknown-linux-gnu-gcc ./configure

* configure (main): Honor --host.

5 months agobootstrap: Default to mesar for mescc build.
Jan Nieuwenhuizen [Sun, 8 Dec 2019 14:15:07 +0000 (15:15 +0100)]
bootstrap: Default to mesar for mescc build.

* configure.sh: Default to mesar for mescc build.

5 months agobootstrap: Fix configure.sh's host detection.
Jan Nieuwenhuizen [Sun, 8 Dec 2019 14:13:37 +0000 (15:13 +0100)]
bootstrap: Fix configure.sh's host detection.

* configure.sh: Avoid setting host="" and not running $CC.

5 months agomescc: Add mes 0.19 compatibility.
Jan Nieuwenhuizen [Sun, 8 Dec 2019 09:10:02 +0000 (10:10 +0100)]
mescc: Add mes 0.19 compatibility.

* mes/module/mes/boot-0.scm (%datadir): Cater for %datadir not being
set.

5 months agobootstrap: Build files only once.
Jan Nieuwenhuizen [Sat, 7 Dec 2019 22:29:34 +0000 (23:29 +0100)]
bootstrap: Build files only once.

* build-aux/bootstrap.sh.in: Build files only once.

5 months agobuild: Support mescc-tools 0.5.2.
Jan Nieuwenhuizen [Sat, 7 Dec 2019 13:39:19 +0000 (14:39 +0100)]
build: Support mescc-tools 0.5.2.

* configure: Remove version check for mescc-tools.
Check for stage0 architecture flag type.
* configure.sh: Likewise.
* build-aux/build-scaffold.sh: Add stage0 flag type indirection.
* module/mescc/mescc.scm (arch-get-architecture): Likewise.

5 months agomescc: Fix for compiling handwritten .S assembly.
Jan Nieuwenhuizen [Fri, 6 Dec 2019 20:17:13 +0000 (21:17 +0100)]
mescc: Fix for compiling handwritten .S assembly.

* module/mescc/mescc.scm (mescc:compile): Handle .S.
(mescc:link): Likewise.

5 months agobuild: Add mescc scaffold for regular build.
Jan Nieuwenhuizen [Fri, 6 Dec 2019 18:53:50 +0000 (19:53 +0100)]
build: Add mescc scaffold for regular build.

* lib/x86-mes-mescc/exit-42.S: New file.
* lib/x86-mes-mescc/hello-mes.S: New file.
* lib/x86_64-mes-mescc/exit-42.S: New file.
* lib/x86_64-mes-mescc/hello-mes.S: New file.

5 months agobuild: Add --with-bootstrap option.
Jan Nieuwenhuizen [Sun, 8 Dec 2019 14:32:51 +0000 (15:32 +0100)]
build: Add --with-bootstrap option.

* configure (main): Add --with-bootstrap option.
* build-aux/build.sh.in [--with-bootstrap]: After building mes with CC,
build mes with MesCC.

5 months agobuild: Support toplevel lib and mes builds.
Jan Nieuwenhuizen [Thu, 5 Dec 2019 09:02:14 +0000 (10:02 +0100)]
build: Support toplevel lib and mes builds.

* build-aux/build.sh.in: Add missing libdir for gcc build.
* build-aux/config.sh.in: ...here.
* build-aux/build-mes.sh: Do not overwrite srcdest, V.

5 months agobootstrap: Support srcdir builds.
Jan Nieuwenhuizen [Thu, 5 Dec 2019 07:30:30 +0000 (08:30 +0100)]
bootstrap: Support srcdir builds.

* build-aux/bootstrap.sh.in (srcdest): Initialize.
* build-aux/build-lib.sh: Source config.sh.
* configure.sh: Support srcdir builds.
* build-aux/build.sh.in: Move setting of cflags to ...
* build-aux/cflags.sh: ... New file.

5 months agoconfigure: Honor CFLAGS, LDFLAGS.
Jan Nieuwenhuizen [Thu, 5 Dec 2019 07:51:27 +0000 (08:51 +0100)]
configure: Honor CFLAGS, LDFLAGS.

* configure (cflags-list, ldflags-list): New function.
check-preprocess-header-c, check-compile-string-c,
check-link-string-c): Use them.  Be verbose when %verbose?.
(CFLAGS, LDFLAGS): Initialize to "-static -g".

5 months agobuild! Fixup clean without git: Clean cleaner.
Jan Nieuwenhuizen [Sun, 8 Dec 2019 15:36:05 +0000 (16:36 +0100)]
build! Fixup clean without git: Clean cleaner.

* build-aux/GNUmakefile.in (clean): Clean cleaner.

5 months agoFix build without git on "wip" branch.
Vagrant Cascadian [Sat, 7 Dec 2019 19:10:05 +0000 (20:10 +0100)]
Fix build without git on "wip" branch.

--=-=-=
Content-Type: text/plain

In the "wip" branch, the attempt to build without git was a bit overly
aggressive in the purging of GIT.

live well,
  vagrant

From 73bb68e86318a6bc0fe191db663be97f94556956 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@debian.org>
Date: Sat, 7 Dec 2019 19:59:00 +0100
Subject: [PATCH] Fix build without git

Commit "1863c0d843a5fe4e94e8cb923cc0896f30fceeeb" removed the
substitution of @GIT@ when, resulting in the GIT variable being set to
"@GIT@" rather than "" when git is not installed.

5 months agobuild: Fix configure host detection for Arch. Thanks, Jelle!
Jan Nieuwenhuizen [Wed, 4 Dec 2019 20:29:42 +0000 (21:29 +0100)]
build: Fix configure host detection for Arch.  Thanks, Jelle!

* configure (main): Grok `CPU-pc-linux-gnu'.

5 months agobuild: Successfully check for Nyacc 0.99.0.
Jan Nieuwenhuizen [Wed, 4 Dec 2019 20:18:45 +0000 (21:18 +0100)]
build: Successfully check for Nyacc 0.99.0.

* configure (gulp-pipe): New function.
(check-program-version): Use it to correctly detect Nyacc.
(gulp-pipe*): Rewrite to use it.

5 months agobuild: Remove git dependency.
Jan Nieuwenhuizen [Wed, 4 Dec 2019 17:49:39 +0000 (18:49 +0100)]
build: Remove git dependency.

* configure: Remove git dependency.
* build-aux/GNUmakefile.in (clean,distclean, maintainer-clean):
Implement without git.
* INSTALL: Update dependencies.

5 months agocore: Remove MES_PKGDATADIR.
Jan Nieuwenhuizen [Tue, 3 Dec 2019 20:23:24 +0000 (21:23 +0100)]
core: Remove MES_PKGDATADIR.

* configure: Do not add MES_PKGDATADIR to config.h.
* configure.sh: Likewise.
* simple.sh: Likewise.
* src/mes.c (open_boot): Do not use MES_PKGDATADIR; rely on
MES_PREFIX or cwd.

5 months agomescc: Ignore -fno-stack-protector.
Jan Nieuwenhuizen [Mon, 2 Dec 2019 17:27:32 +0000 (18:27 +0100)]
mescc: Ignore -fno-stack-protector.

* module/mescc.scm (parse-opts): Ignore it.

5 months agobuild: Use debug build (-g) by default.
Jan Nieuwenhuizen [Mon, 2 Dec 2019 17:26:55 +0000 (18:26 +0100)]
build: Use debug build (-g) by default.

* build-aux/build.sh.in (debug): Enable.

5 months agobuild: Honor user's CFLAGS, CPPFLAGS, LDFLAGS.
Jan Nieuwenhuizen [Mon, 2 Dec 2019 17:26:08 +0000 (18:26 +0100)]
build: Honor user's CFLAGS, CPPFLAGS, LDFLAGS.

* build-aux/build.sh.in (AM_CFLAGS, AM_CPPFLAGS, AM_LDFLAGS): Rename
from CFLAGS, CPPFLAGS, LDFLAGS.  Export them.
* configure: Substitute them.
* configure.sh: Likewise.
* build-aux/cc.sh (compile, link): Use them.
* build-aux/config.make.in (CFLAGS, CPPFLAGS, LDFLAGS): Add
substitutable variables.
* build-aux/config.sh.in: Likewise.
* build-aux/export.make: Export them.

5 months agotest: 90-abtod: Remove printf dependency. Fixes gcc.
Jan Nieuwenhuizen [Mon, 2 Dec 2019 09:00:03 +0000 (10:00 +0100)]
test: 90-abtod: Remove printf dependency.  Fixes gcc.

* lib/tests/mes/90-abtod.stdout: Remove.
* lib/tests/mes/90-abtod.c (main): Remove printf.

5 months agotest: 90-readdir: Remove qsort dependency. Fixes tmpfs failures.
Jan Nieuwenhuizen [Sun, 1 Dec 2019 22:58:48 +0000 (23:58 +0100)]
test: 90-readdir: Remove qsort dependency.  Fixes tmpfs failures.

* lib/tests/dirent/90-readdir.c (check_seen): New function.
(main): Use it instead of qsort.
(qsort_strcmp): Remove.

6 months agocore: Throw instead of segfault on non-existing input file.
Jan Nieuwenhuizen [Sun, 24 Nov 2019 22:12:29 +0000 (23:12 +0100)]
core: Throw instead of segfault on non-existing input file.

Reported by theruran.

* src/posix.c (open_input_file): Call error instead of failing silently.

11 months agoboot-0: Fix spelling of "evaluate"
Vagrant Cascadian [Tue, 11 Jun 2019 06:56:04 +0000 (23:56 -0700)]
boot-0: Fix spelling of "evaluate"

6 months agomescc: Honor --includedir, --libdir.
Jan Nieuwenhuizen [Sun, 24 Nov 2019 10:14:14 +0000 (11:14 +0100)]
mescc: Honor --includedir, --libdir.

* guix/git/mes.scm (mes):
* module/mescc.scm (%includedir, %libdir): New variable.
(mescc:main): Add them to options.
* module/mescc/mescc.scm (mescc:preprocess, c->info): Add %includedir.
(arch-find): Use %libdir instead of
prefix-file.
(prefix-file): Remove.
* scripts/mescc.scm.in (%includedir, %libdir): Initialize from and set
in environment.

xx

* module/mescc/mescc.scm :

6 months agodoc: Post-release update.
Jan Nieuwenhuizen [Sun, 24 Nov 2019 09:30:40 +0000 (10:30 +0100)]
doc: Post-release update.

* NEWS: Typo.
* doc/announce/ANNOUNCE-0.21: Add checksums.

6 months agoRelease 0.21. v0.21
Jan Nieuwenhuizen [Sun, 10 Nov 2019 07:31:38 +0000 (08:31 +0100)]
Release 0.21.

* configure (VERSION): Update to 0.21.
(main): Likewise.
* build-aux/GNUmakefile.in: Likewise.
* configure.sh (VERSION): Likewise.
* guix/git/mes.scm (mes, mes.git): Likewise.

6 months agodoc: Release update.
Jan Nieuwenhuizen [Mon, 4 Nov 2019 18:59:13 +0000 (19:59 +0100)]
doc: Release update.

* BLURB: Release update.
* HACKING: Remove roadmap.
* INSTALL: Release update.
* NEWS: Add 0.21 section.
* README: Release update.
* ROADMAP: New file.
* configure.sh: Release update.
* doc/announce/ANNOUNCE-0.21: New file.
* doc/mes.texi: Release update.

6 months agomescc: Mes C Library: vfprintf: Support --with-system-libc.
Jan Nieuwenhuizen [Sat, 23 Nov 2019 20:37:57 +0000 (21:37 +0100)]
mescc: Mes C Library: vfprintf: Support --with-system-libc.

* include/stdarg.h (va_arg8)[SYSTEM_LIBC]: Define.

6 months agomescc: Mes C Library: Support gcc-4.6.4: Fix ctime stub.
Jan Nieuwenhuizen [Sat, 23 Nov 2019 20:35:05 +0000 (21:35 +0100)]
mescc: Mes C Library: Support gcc-4.6.4: Fix ctime stub.

* lib/stub/ctime.c (ctime): Fix stub to avoid segfault upon use.

6 months agomescc: Mes C Library: Fix isatty for x86_64.
Jan Nieuwenhuizen [Sat, 23 Nov 2019 20:29:36 +0000 (21:29 +0100)]
mescc: Mes C Library: Fix isatty for x86_64.

* lib/linux/ioctl.c (ioctl3): New function.
* include/sys/ioctl.h: Declare it.
* lib/posix/isatty.c (__tcgetattr): Use it.

6 months agobuild: Prefer /bin/bash if available. Thanks, Vagrant!
Jan Nieuwenhuizen [Sat, 9 Nov 2019 09:59:01 +0000 (10:59 +0100)]
build: Prefer /bin/bash if available. Thanks, Vagrant!

Ensure the configure script uses /bin/bash, otherwise on systems with
/bin -> /usr/bin it results in /bin/bash being embedded in various
scripts.

Inspired by

    https://salsa.debian.org/debian/mes/blob/debian/master/debian/patches/force-use-of-bin-bash

* configure: Prefer /bin/bash, /bin/sh if available.  Helps
reproducibility on Debian.

6 months agobuild: Update script help and usage.
Jan Nieuwenhuizen [Mon, 4 Nov 2019 22:56:15 +0000 (23:56 +0100)]
build: Update script help and usage.

* doc/mes.texi (Invoking mesar): New section.
* mes/module/mes/boot-0.scm: Add one line help description.
* module/mescc.scm (parse-opts): Likewise.
* scripts/diff.scm (main): Add -h,--help, -v,--version.
* scripts/mesar.in: Likewise.

6 months agobuild: Use unversioned doc directory. Thanks, Vagrant!
Jan Nieuwenhuizen [Mon, 4 Nov 2019 22:54:30 +0000 (23:54 +0100)]
build: Use unversioned doc directory. Thanks, Vagrant!

* configure (docdir): Drop version.  Fixes Debian lint error.
* configure.sh (docdir): Likewise.

6 months agobuild: Add sensible NAME section for man pages. Thanks, Vagrant!
Jan Nieuwenhuizen [Mon, 4 Nov 2019 22:43:38 +0000 (23:43 +0100)]
build: Add sensible NAME section for man pages. Thanks, Vagrant!

* build-aux/GNUmakefile.in (mes.1, mescc.1, mesar.1): Add sensible
--name section.  Fixes Debian lint error.  Reported by Vagrant
Cascadian.

6 months agoRevert "build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-gcc."
Jan Nieuwenhuizen [Sat, 9 Nov 2019 10:10:31 +0000 (11:10 +0100)]
Revert "build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-gcc."

This reverts commit dc0b41f83efa973b7a92c0c7a0ad1eb21a7c4c7a.

7 months agobuild: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-gcc.
Jan Nieuwenhuizen [Wed, 30 Oct 2019 08:33:54 +0000 (09:33 +0100)]
build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-gcc.

* build-aux/check-mescc.sh (XFAIL_TESTS)[x86_64-gcc]: Add
lib/tests/dirent/90-readdir.c.

6 months agoRevert "build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-mescc."
Jan Nieuwenhuizen [Sat, 9 Nov 2019 10:10:25 +0000 (11:10 +0100)]
Revert "build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-mescc."

This reverts commit 17986224095ed72649fb2383f72c21f525977310.

7 months agobuild: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-mescc.
Jan Nieuwenhuizen [Wed, 30 Oct 2019 08:32:46 +0000 (09:32 +0100)]
build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-mescc.

* build-aux/check-mescc.sh (XFAIL_TESTS)[x86_64-mescc]: Add
lib/tests/dirent/90-readdir.c.

7 months agobuild: Better and friendlier tarball.
Jan Nieuwenhuizen [Thu, 24 Oct 2019 11:19:28 +0000 (13:19 +0200)]
build: Better and friendlier tarball.

* build-aux/GNUmakefile.in (dist): Be friendly to Debian; avoid using
EPOCH.  Cater for file permission differences.

7 months agobuild: bootstrap fixes.
Jan Nieuwenhuizen [Tue, 15 Oct 2019 18:18:31 +0000 (20:18 +0200)]
build: bootstrap fixes.

* build-aux/config.sh.in (bootstrap): Set up for substitution.
* configure.sh (bootstrap): Substitute.
* build-aux/install.sh.in (_v): Robustify check for V.
(__exclude_go, __exclude_scm): Initialize.

7 months agomes: Fix -c, --command.
Jan Nieuwenhuizen [Thu, 10 Oct 2019 11:22:12 +0000 (13:22 +0200)]
mes: Fix -c, --command.

* mes/module/mes/boot-0.scm: Prepend 'begin to expr list.

7 months agocheck: Remove duplicate test.
Jan Nieuwenhuizen [Thu, 3 Oct 2019 20:17:50 +0000 (22:17 +0200)]
check: Remove duplicate test.

* build-aux/check-boot.sh (TESTS): Remove duplicate test.

8 months agomescc: Mes C Library: Support gcc-4.6.4: vfprintf, vsnprintf: pad with space.
Jan Nieuwenhuizen [Fri, 20 Sep 2019 12:44:31 +0000 (14:44 +0200)]
mescc: Mes C Library: Support gcc-4.6.4: vfprintf, vsnprintf: pad with space.

* lib/stdio/vfprintf.c (vfprintf): pad with space.
* lib/stdio/vsnprintf.c (vsnprintf): pad with space.

8 months agomescc: Mes C Library: Support gcc-4.6.4: Add math stubs.
Jan Nieuwenhuizen [Fri, 13 Sep 2019 13:11:38 +0000 (15:11 +0200)]
mescc: Mes C Library: Support gcc-4.6.4: Add math stubs.

* lib/math/ceil.c: New file.
* lib/math/floor.c: New file.
* lib/stub/atan2.c: New file.
* lib/stub/cos.c: New file.
* lib/stub/exp.c: New file.
* lib/stub/log.c: New file.
* lib/stub/modf.c: New file.
* lib/stub/pow.c: New file.
* lib/stub/sin.c: New file.
* lib/stub/sqrt.c: New file.
* lib/libc+gnu.c: Include them.
* include/math.h (atan2, ceil, cos, exp, fabs, floor, log, modf, pow,
sin, sqrt): Declare.
* lib/math/fabs.c: Update.
* lib/stub/ldexp.c: Update.

8 months agomescc: Mes C Library: Support gcc-4.6.4: Add fscanf, vfscanf.
Jan Nieuwenhuizen [Fri, 6 Sep 2019 17:04:50 +0000 (19:04 +0200)]
mescc: Mes C Library: Support gcc-4.6.4: Add fscanf, vfscanf.

* lib/stdio/vfscanf.c: New file.
* lib/stdio/fscanf.c: New file.
* build-aux/configure-lib.sh (libc_gnu_SOURCES): Add them.
* include/stdio.h (fscanf): Declare.
* include/stdarg.h (vfscanf): Declare.
* lib/stub/fscanf.c: Remove.

8 months agomescc: Mes C Libray: Fix off_t.
Jan Nieuwenhuizen [Wed, 4 Sep 2019 15:35:33 +0000 (17:35 +0200)]
mescc: Mes C Libray: Fix off_t.

* include/sys/types.h (off_t): Drop unsigned.

8 months agomescc: Environment setup.
Jan Nieuwenhuizen [Fri, 6 Sep 2019 21:24:23 +0000 (23:24 +0200)]
mescc: Environment setup.

* scripts/mescc.in (MES_ARENA, MES_MAX_ARENA, MES_STACK): Reduce defaults.
* build-aux/check.sh.in (MES_ARENA): Likewise.  Export them.
* build-aux/bootstrap.sh.in (MES_STACK): Likewise.
(MES_PREFIX): Set default.

9 months agoAdd missing #include.
Danny Milosavljevic [Mon, 26 Aug 2019 23:46:57 +0000 (01:46 +0200)]
Add missing #include.

* lib/stdlib/mbstowcs.c: Add missing #include.

9 months agoFix dtoab.
Danny Milosavljevic [Mon, 26 Aug 2019 22:43:37 +0000 (00:43 +0200)]
Fix dtoab.

* lib/mes/dtoab.c (dtoab): Fix it.
* lib/tests/mes/90-dtoab.c (main): Fix test.
* build-aux/check-mescc.sh (XFAIL_TESTS: Remove it.

9 months agova_align: Fix compiler warning.
Danny Milosavljevic [Tue, 27 Aug 2019 03:49:22 +0000 (05:49 +0200)]
va_align: Fix compiler warning.

Follow-up to 49b0cd7d2e6952044d7436260d6ba950e40ee05f.

* include/stdarg.h: Fix compiler warning.

9 months agoAdd missing #include.
Danny Milosavljevic [Tue, 27 Aug 2019 02:32:02 +0000 (04:32 +0200)]
Add missing #include.

* lib/tests/mes/90-abtod.c (main): Add missing #include.

9 months agoFix variable argument list traversal for doubles.
Danny Milosavljevic [Tue, 27 Aug 2019 02:04:56 +0000 (04:04 +0200)]
Fix variable argument list traversal for doubles.

* include/stdarg.h (va_align): New macro.
(va_arg8): New macro.
* lib/stdio/vfprintf.c (vfprintf): Use it.
* lib/stdio/vsnprintf.c (vsnprintf): Use it.

9 months agobuild: Improve --with-system-libc support.
Jan Nieuwenhuizen [Sat, 24 Aug 2019 17:05:58 +0000 (19:05 +0200)]
build: Improve --with-system-libc support.

* build-aux/build-lib.sh: Avoid building libc for --with-system-libc.
Make libmes richer.
build-aux/check-mescc.sh: Enable 50-malloc test.
* include/dirstream.h: Use HAVE_DIRSTREAM_H to cater for non-existing
dirstream.h.
* include/grp.h[SYSTEM_LIBC]: Typo.
* include/mes/lib.h (__brk, __call_at_exit)[SYSTEM_LIBC]: Declare.
* include/stdlib.h (comparison_fn_t)[SYSTEM_LIBC]: Declare.
* include/time.h (mktime): Return time_t.
* lib/posix/isatty.c [SYSTEM_LIBC]: Do not (re)declare termios.
* lib/stub/mktime.c (mktime): Return time_t.
* lib/tests/scaffold/41-ternary.c (main): Remove assumption that
locals are initialized.
* lib/tests/scaffold/70-stdarg.c: Cater for SYSTEM_LIBC.
* lib/tests/setjmp/80-setjmp.c: Declare jmp buf.
* lib/*/*.c: Add missing mes/lib.h, errno.h includes.

8 months agomescc: Mes C Library: vfprintf, vsnprintf: Pad floats with space.
Jan Nieuwenhuizen [Sun, 1 Sep 2019 20:18:00 +0000 (22:18 +0200)]
mescc: Mes C Library: vfprintf, vsnprintf: Pad floats with space.

* lib/stdio/vfprintf.c (vfprintf): Pad floats with space.
* lib/stdio/vsnprintf.c (vsnprintf): Pad floats with space.
* lib/tests/stdio/90-sprintf.c: Test it.

10 months agomescc: Mes C Library: vsscanf: Increase count for scanned float.
Jan Nieuwenhuizen [Thu, 1 Aug 2019 09:01:47 +0000 (11:01 +0200)]
mescc: Mes C Library: vsscanf: Increase count for scanned float.

* lib/stdio/vsscanf.c (vsscanf): Increase count for scanned float.

10 months agomescc: Mes C Library: Support GNU Tar: Fix getpwnam, getpwuid stubs.
Jan Nieuwenhuizen [Wed, 31 Jul 2019 10:25:43 +0000 (12:25 +0200)]
mescc: Mes C Library: Support GNU Tar: Fix getpwnam, getpwuid stubs.

* lib/stub/getpwnam.c (getpwnam): Return pointer to static struct
passwd.
* lib/stub/getpwuid.c (getpwuid): Likewise.

10 months agomescc: Mes C Library: Support GNU Tar: Add getgrgid, getgrnam, setgrent stub.
Jan Nieuwenhuizen [Wed, 24 Jul 2019 10:23:54 +0000 (12:23 +0200)]
mescc: Mes C Library: Support GNU Tar: Add getgrgid, getgrnam, setgrent stub.

* include/grp.h: New file.
* lib/stub/getgrgid.c: New file.
* lib/stub/getgrnam.c: New file.
* lib/stub/setgrent.c: New file.
* lib/libc+gnu.c: Include them.

10 months agomescc: Mes C Library: Support GNU Awk: Add wchar_t.
Jan Nieuwenhuizen [Sun, 21 Jul 2019 11:23:49 +0000 (13:23 +0200)]
mescc: Mes C Library: Support GNU Awk: Add wchar_t.

* include/sys/types.h (wchar_t): New typedef.

10 months agomescc: Mes C Library: Support GNU Awk: Add getpgid, getpgrp stubs.
Jan Nieuwenhuizen [Thu, 18 Jul 2019 10:13:18 +0000 (12:13 +0200)]
mescc: Mes C Library: Support GNU Awk: Add getpgid, getpgrp stubs.

* include/unistd.h (getpgid, getpgrp): Declare.
* lib/stub/getpgid.c: New file.
* lib/stub/getpgrp.c: New file.
* lib/libc+gnu.c: Include them.

10 months agomescc: Mes C Library: Support GNU Tar: Add mktime stub, fix localtime stub.
Jan Nieuwenhuizen [Mon, 15 Jul 2019 09:58:21 +0000 (11:58 +0200)]
mescc: Mes C Library: Support GNU Tar: Add mktime stub, fix localtime stub.

* include/time.h (mktime): Declare.
* lib/stub/mktime.c: New stub.
* lib/libc+gnu.c: Include it.
* lib/stub/localtime.c (localtime): Return pointer to static struct
tm.  Avoids segfaults.

10 months agomescc: Mes C Library: Support GNU Tar: Add creat, mknod.
Jan Nieuwenhuizen [Fri, 12 Jul 2019 09:56:58 +0000 (11:56 +0200)]
mescc: Mes C Library: Support GNU Tar: Add creat, mknod.

* include/linux/x86_64/syscall.h (SYS_mknod): New macro.
* include/linux/x86/syscall.h (SYS_mknod): New macro.
* lib/linux/mknod.c: New file.
* build-aux/configure-lib.sh (libc_gnu_SOURCES): Add it.
* include/sys/stat.h (mknod): Declare it.
* include/fcntl.h (creat): New macro.

10 months agomescc: Mes C Library: Support GNU Tar: Add missing defines.
Jan Nieuwenhuizen [Tue, 9 Jul 2019 09:53:16 +0000 (11:53 +0200)]
mescc: Mes C Library: Support GNU Tar: Add missing defines.

* include/errno.h (ENXIO): New macro.
* include/sys/stat.h (S_IFIFO, S_ISFIFO): New macro.

10 months agomescc: Mes C Library: Support GNU Bash: Add struct winsize.
Jan Nieuwenhuizen [Sat, 6 Jul 2019 09:25:02 +0000 (11:25 +0200)]
mescc: Mes C Library: Support GNU Bash: Add struct winsize.

* include/termio.h (struct winsize): New type.

10 months agomescc: Mes C Library: Support GNU Awk: Implement atof.
Jan Nieuwenhuizen [Wed, 3 Jul 2019 09:22:57 +0000 (11:22 +0200)]
mescc: Mes C Library: Support GNU Awk: Implement atof.

* lib/stdlib/atoi.c: Update.
* lib/stdlib/atof.c: Rename from stub/atof.c; Implement.
* lib/libc+gnu.c: Update include.
* lib/libg.c: Update include.

4 months agomescc: Mes C Library: Support GNU Awk: Add dtoab, %f in vfprintf, vsnprintf.
Jan Nieuwenhuizen [Sun, 12 Jan 2020 17:42:25 +0000 (18:42 +0100)]
mescc: Mes C Library: Support GNU Awk: Add dtoab, %f in vfprintf, vsnprintf.

* include/libmes.h (dtoab): Declare.
* lib/mes/ntoab.c (ntoab): Update.
* lib/mes/dtoab.c: New file.
* build-aux/configure-lib.sh (libmes_SOURCES, libc_tcc_SOURCES): Add
it.
* lib/tests/mes/90-dtoab.c: Test it.
* lib/tests/stdio/90-sprintf.c: Test it.
* build-aux/check-mescc.sh (tests): Run it, against...
* lib/tests/mes/90-dtoab.stdout: ...baseline.
* lib/stdio/vfprintf.c (vfprintf): Support %f, even more naive support
for %e, %E, %g, %G.
* lib/stdio/vsnprintf.c (vsnprintf): Likewise.

11 months agomescc: Mes C Library: Support GNU Awk: Add abtod, implementing strtod.
Jan Nieuwenhuizen [Tue, 25 Jun 2019 10:51:44 +0000 (12:51 +0200)]
mescc: Mes C Library: Support GNU Awk: Add abtod, implementing strtod.

* include/libmes.h (abtod): Declare.
* lib/mes/abtod.c: New file.
* build-aux/configure-lib.sh (libmes_SOURCES, libc_tcc_SOURCES): Add
it.
* lib/mes/abtol.c: Update.
* lib/stdlib/strtod.c: Use it to implement; move from stub/strtod.
* lib/tests/mes/90-abtod.c: Test it.
* lib/tests/mes/90-abtod.stdout: Baseline.
* build-aux/check-mescc.sh (tests): Run it.

11 months agomescc: Mes C Library: Support GNU Awk: vsscanf: Support %f.
Jan Nieuwenhuizen [Sat, 22 Jun 2019 09:48:39 +0000 (11:48 +0200)]
mescc: Mes C Library: Support GNU Awk: vsscanf: Support %f.

* lib/stdio/vsscanf.c (vsscanf): Support %f.

11 months agomescc: Mes C Library: Support GNU Awk: Do not flush std files.
Jan Nieuwenhuizen [Wed, 19 Jun 2019 09:26:37 +0000 (11:26 +0200)]
mescc: Mes C Library: Support GNU Awk: Do not flush std files.

* lib/stdio/fflush.c (fflush): Do not flush std files.

11 months agomescc: Mes C Library: Support GNU Awk: Add isgraph.
Jan Nieuwenhuizen [Sun, 16 Jun 2019 09:25:37 +0000 (11:25 +0200)]
mescc: Mes C Library: Support GNU Awk: Add isgraph.

* lib/ctype/isgraph.c: New file.
* lib/libc+gnu.c: Include it.
* include/ctype.h: Add missing prototypes.

11 months agomescc: Mes C Library: Support GNU Tar: Add readlink, symlink.
Jan Nieuwenhuizen [Wed, 12 Jun 2019 23:07:19 +0000 (01:07 +0200)]
mescc: Mes C Library: Support GNU Tar: Add readlink, symlink.

* lib/linux/gnu.c (readlink, symlink): New function.
* include/unistd.h (readlink, symlink): Declare.
* include/linux/x86/syscall.h (SYS_readlink, SYS_symlink): New macro.
* include/linux/x86_64/syscall.h (SYS_symlink, SYS_readlink): New
macro.

11 months agomescc: Mes C Library: Support GNU Tar: Add execlp.
Jan Nieuwenhuizen [Sun, 9 Jun 2019 22:56:42 +0000 (00:56 +0200)]
mescc: Mes C Library: Support GNU Tar: Add execlp.

* lib/posix/execl.c (vexec): New function.
(execl): Use it.
* lib/posix/execlp.c: New file.
* build-aux/configure-lib.sh (libc_tcc_SOURCES): Add it.
* lib/libc+gnu.c: Include it.
* include/unistd.h (execlp): Declare.
* lib/tests/posix/90-execlp.c: New file.
* lib/tests/posix/90-execlp.stdout: New file.
* build-aux/check-mescc.sh: Test it.

11 months agomescc: Mes C Library: Fix compile warnings.
Jan Nieuwenhuizen [Wed, 12 Jun 2019 13:59:06 +0000 (15:59 +0200)]
mescc: Mes C Library: Fix compile warnings.

* include/stdlib.h (abort): Add prototype.

6 months agomescc: Mes C Library: Add missing stubs.
Jan Nieuwenhuizen [Sun, 10 Nov 2019 08:00:08 +0000 (09:00 +0100)]
mescc: Mes C Library: Add missing stubs.

* build-aux/configure-lib.sh (libc_gnu_SOURCES): Add fscanf, rewind stubs.
* lib/stdio/freeopen.c: Remove.

8 months agobuild: Avoid tar --exclude=.
Jan Nieuwenhuizen [Fri, 20 Sep 2019 17:33:29 +0000 (19:33 +0200)]
build: Avoid tar --exclude=.

* build-aux/install.sh.in: Only use `tar --exclude=' if we also have .go
files compiled by Guile.