Commit graph

1979 commits

Author SHA1 Message Date
Jan Nieuwenhuizen b4b20d6ac4
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.
2019-12-06 19:53:50 +01:00
Jan Nieuwenhuizen 1d03aeebbe
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.
2019-12-08 15:32:51 +01:00
Jan Nieuwenhuizen a820a98139
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.
2019-12-05 10:02:14 +01:00
Jan Nieuwenhuizen 066143d820
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.
2019-12-05 08:30:30 +01:00
Jan Nieuwenhuizen 6b0ff3f322
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".
2019-12-05 08:51:27 +01:00
Jan Nieuwenhuizen 0db1e888f9
build! Fixup clean without git: Clean cleaner.
* build-aux/GNUmakefile.in (clean): Clean cleaner.
2019-12-08 16:36:05 +01:00
Vagrant Cascadian 2d7a4aa74e
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.
2019-12-07 20:10:05 +01:00
Jan Nieuwenhuizen abd909d791
build: Fix configure host detection for Arch. Thanks, Jelle!
* configure (main): Grok `CPU-pc-linux-gnu'.
2019-12-04 21:29:42 +01:00
Jan Nieuwenhuizen 5cf5a15b76
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.
2019-12-04 21:18:45 +01:00
Jan Nieuwenhuizen d6a3af7625
build: Remove git dependency.
* configure: Remove git dependency.
* build-aux/GNUmakefile.in (clean,distclean, maintainer-clean):
Implement without git.
* INSTALL: Update dependencies.
2019-12-04 18:49:39 +01:00
Jan Nieuwenhuizen 0549ebd0f7
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.
2019-12-03 21:23:24 +01:00
Jan Nieuwenhuizen 2659caeffa
mescc: Ignore -fno-stack-protector.
* module/mescc.scm (parse-opts): Ignore it.
2019-12-02 18:27:32 +01:00
Jan Nieuwenhuizen 9c7d0ece4d
build: Use debug build (-g) by default.
* build-aux/build.sh.in (debug): Enable.
2019-12-02 18:26:55 +01:00
Jan Nieuwenhuizen 5c16b1ecc1
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.
2019-12-02 18:26:08 +01:00
Jan Nieuwenhuizen 3de6450117
test: 90-abtod: Remove printf dependency. Fixes gcc.
* lib/tests/mes/90-abtod.stdout: Remove.
* lib/tests/mes/90-abtod.c (main): Remove printf.
2019-12-02 10:00:03 +01:00
Jan Nieuwenhuizen 35c97baaef
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.
2019-12-01 23:58:48 +01:00
Jan Nieuwenhuizen 46b73f494b
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.
2019-11-24 23:12:29 +01:00
Vagrant Cascadian 204dcaa452
boot-0: Fix spelling of "evaluate" 2019-06-10 23:56:04 -07:00
Jan Nieuwenhuizen 2c2f03c9e4
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 :
2019-11-24 11:14:14 +01:00
Jan Nieuwenhuizen fee620cf5b
doc: Post-release update.
* NEWS: Typo.
* doc/announce/ANNOUNCE-0.21: Add checksums.
2019-11-24 10:30:40 +01:00
Jan Nieuwenhuizen fbe178810f
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.
2019-11-10 08:31:38 +01:00
Jan Nieuwenhuizen ac9c18f8b8
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.
2019-11-04 19:59:13 +01:00
Jan Nieuwenhuizen 594b2859b1
mescc: Mes C Library: vfprintf: Support --with-system-libc.
* include/stdarg.h (va_arg8)[SYSTEM_LIBC]: Define.
2019-11-23 21:37:57 +01:00
Jan Nieuwenhuizen 2673d28e50
mescc: Mes C Library: Support gcc-4.6.4: Fix ctime stub.
* lib/stub/ctime.c (ctime): Fix stub to avoid segfault upon use.
2019-11-23 21:35:05 +01:00
Jan Nieuwenhuizen 5480c133ae
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.
2019-11-23 21:29:36 +01:00
Jan Nieuwenhuizen 11798d4272
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.
2019-11-09 10:59:01 +01:00
Jan Nieuwenhuizen c6cceb47f3
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.
2019-11-04 23:56:15 +01:00
Jan Nieuwenhuizen 6a5619de9a
build: Use unversioned doc directory. Thanks, Vagrant!
* configure (docdir): Drop version.  Fixes Debian lint error.
* configure.sh (docdir): Likewise.
2019-11-04 23:54:30 +01:00
Jan Nieuwenhuizen 45427bc641
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.
2019-11-04 23:43:38 +01:00
Jan Nieuwenhuizen d663c3ded6
Revert "build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-gcc."
This reverts commit dc0b41f83efa973b7a92c0c7a0ad1eb21a7c4c7a.
2019-11-09 11:10:31 +01:00
Jan Nieuwenhuizen b458314b4f
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.
2019-10-30 09:33:54 +01:00
Jan Nieuwenhuizen 5bb1dc47da
Revert "build: Mark lib/tests/dirent/90-readdir.c as XFAIL on x86_64-mescc."
This reverts commit 17986224095ed72649fb2383f72c21f525977310.
2019-11-09 11:10:25 +01:00
Jan Nieuwenhuizen 70693696ce
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.
2019-10-30 09:32:46 +01:00
Jan Nieuwenhuizen 66296abdc8
build: Better and friendlier tarball.
* build-aux/GNUmakefile.in (dist): Be friendly to Debian; avoid using
EPOCH.  Cater for file permission differences.
2019-10-24 13:19:28 +02:00
Jan Nieuwenhuizen 36ae666f05
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.
2019-10-15 20:18:31 +02:00
Jan Nieuwenhuizen 092626243a
mes: Fix -c, --command.
* mes/module/mes/boot-0.scm: Prepend 'begin to expr list.
2019-10-10 13:22:12 +02:00
Jan Nieuwenhuizen 8d49b40b13
check: Remove duplicate test.
* build-aux/check-boot.sh (TESTS): Remove duplicate test.
2019-10-03 22:17:50 +02:00
Jan Nieuwenhuizen 0e55071bc7
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.
2019-09-20 14:44:31 +02:00
Jan Nieuwenhuizen 98b9ac8e98
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.
2019-09-13 15:11:38 +02:00
Jan Nieuwenhuizen 6bb225b403
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.
2019-09-06 19:04:50 +02:00
Jan Nieuwenhuizen d643f923a3
mescc: Mes C Libray: Fix off_t.
* include/sys/types.h (off_t): Drop unsigned.
2019-09-04 17:35:33 +02:00
Jan Nieuwenhuizen a56918eaa2
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.
2019-09-06 23:24:23 +02:00
Danny Milosavljevic 73715dab4a
Add missing #include.
* lib/stdlib/mbstowcs.c: Add missing #include.
2019-08-27 01:46:57 +02:00
Danny Milosavljevic 01ae1994ed
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.
2019-08-27 00:43:37 +02:00
Danny Milosavljevic 3d5557c34a
va_align: Fix compiler warning.
Follow-up to 49b0cd7d2e6952044d7436260d6ba950e40ee05f.

* include/stdarg.h: Fix compiler warning.
2019-08-27 05:49:22 +02:00
Danny Milosavljevic abc0809bfa
Add missing #include.
* lib/tests/mes/90-abtod.c (main): Add missing #include.
2019-08-27 04:32:02 +02:00
Danny Milosavljevic 4c77c2c9ca
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.
2019-08-27 04:04:56 +02:00
Jan Nieuwenhuizen 58fb0cf764
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.
2019-08-24 19:05:58 +02:00
Jan Nieuwenhuizen fd1109a25f
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.
2019-09-01 22:18:00 +02:00
Jan Nieuwenhuizen f097a9d270
mescc: Mes C Library: vsscanf: Increase count for scanned float.
* lib/stdio/vsscanf.c (vsscanf): Increase count for scanned float.
2019-08-01 11:01:47 +02:00