Commit Graph

314 Commits

Author SHA1 Message Date
Jan (janneke) Nieuwenhuizen 4e1de0de94
core: eval-apply: Prepare for M2-Planet.
* src/eval-apply.c (apply_builtin): Split M2-Planet specific and CC
specifi part off to ..
* src/cc.c: New file, and
* build-aux/configure-lib.sh (mes_SOURCES): Add it.
* src/m2.c: New file.
* simple.make (MES_SOURCES, M2_SOURCES): Likewise.
2020-12-29 18:11:10 +01:00
Jan (janneke) Nieuwenhuizen 1d0e07c394
boot: Add gc test.
* scaffold/boot/gc.test: New file.
* build-aux/check-boot.sh (TESTS): Add it.
* include/mes/symbols.h (cell_symbol_program): New symbol.
* src/symbol.c (init_symbols_): Initialize it.
* src/mes.c (main): Add it to environment.
2020-12-29 18:11:08 +01:00
Jan (janneke) Nieuwenhuizen 673cf8f114
test/gc: Add gc inspection test.
* src/test/gc.c (main): New unit test.
* simple.make (test-gcc, test-m2): New target to build it.
* build-aux/pointer.sh: Add it.
2020-12-29 18:11:08 +01:00
Jan (janneke) Nieuwenhuizen 7129959318
core: Split-out stack.c
* src/lib.c (exit_, frame_printer, make_frame_type, make_frame,
make_stack_type, make_stack, stack_length, stack_ref_): Move to ..
* src/posix.c (exit_): Here and to ..
* src/core.c: New file.
* build-aux/configure-lib.sh (mes_SOURCES): Add it.
* simple.make (LIBMES_SOURCES): Likewise.
* build-aux/snarf.sh: Likewise.
* include/mes/builtins.h: Update.
* src/builtins.c (mes_builtins): Update.
2020-12-29 18:11:04 +01:00
Jan (janneke) Nieuwenhuizen 74668e9138
core: Split-out core.c.
* src/mes.c (assoc_string, car, cdr, list, null_p, eq_p, values, acons,
length__, length, error, append2, append_reverse, reverse_x_, assq,
assoc): Move to ...
* src/core.c: New file.
* build-aux/configure-lib.sh (mes_SOURCES): Add it.
* simple.make (MES_SOURCES): Likewise.
* build-aux/snarf.sh: Likewise.
* include/mes/builtins.h: Update.
* src/builtins.c (mes_builtins): Update.
2020-12-29 18:11:04 +01:00
Jan (janneke) Nieuwenhuizen 0683302270
build: Add pointer.sh.
* build-aux/pointer.sh: New script.
2020-12-29 18:10:58 +01:00
Jan (janneke) Nieuwenhuizen 5abf71249c
core: Create symbols dynamically.
* include/mes/symbols.h: New file.
* include/mes/mes.hh: Include it.
* include/mes/constants.h: Remove symbol constants.
* src/symbols.c (init_symbols): Create symbols dynamically.
* build-aux/mes-snarf.scm (snarf-symbols): Update.
2020-12-29 18:10:58 +01:00
Jan (janneke) Nieuwenhuizen b5c0369a3b
core: Split-out symbol.c.
* src/mes.c (init_symbol, mes_symbols): Move to ..
* src/symbol.c: New file.
* build-aux/configure-lib.sh (mes_SOURCES): Add it.
* simple.make: Likewise.
* include/mes/mes.h: Declare init_symbols.
2020-12-29 18:10:56 +01:00
Jan (janneke) Nieuwenhuizen 460ff0ebf5
core: Split-out display.c.
* src/lib.c (display_helper, display_, display_error_, display_port_,
write_, write_error_, write_port_, fdisplay_): Move to ..
* src/display.c: New file.
* build-aux/configure-lib.sh (mes_SOURCES): Add it.
* simple.make: Likewise.
2020-12-29 18:10:56 +01:00
Jan (janneke) Nieuwenhuizen 4f39d09c25
core: Split-out eval-apply.c.
* src/mes.c (check_formals, check_apply, pairlis, set_car_x, set_cdr_x,
set_env_x, call_lambda, make_closure_, make_variable_, macro_get_handle,
get_macro, macro_set_x, push_cc, add_formals, formal_p,
expand_variable_, expand_variable, apply_builtin, eval_apply, apply):
Move to ..
* src/eval-apply.c: New file.
* build-aux/configure-lib.sh (mes_SOURCES): Add it.
* simple.make: Likewise.
* src/eval.c (assert_defined): Likewise.
2020-12-29 18:10:56 +01:00
Jan (janneke) Nieuwenhuizen 5209d82c1e
build: Update mes-snarf.
* build-aux/snarf.sh: Support C-style annotations.
2020-12-29 18:10:56 +01:00
Jan (janneke) Nieuwenhuizen 8e1a455074
mescc: Mes C Library: memcmp: bugfix.
* lib/string/memcmp.c (memcmp): Bugfix.
* lib/tests/string/50-memcmp.c: Test it.
* build-aux/check-mescc.sh (TESTS): Add it.
2020-12-29 18:10:54 +01:00
Jan (janneke) Nieuwenhuizen 7fbaf941e9
mescc: Mes C Library: Add assert_msg.
* lib/mes/assert_msg.c: New file.
2020-12-29 18:10:53 +01:00
Jan (janneke) Nieuwenhuizen 748a856b50
build: mes-snarf.scm: Resurrect.
* build-aux/mes-snarf.scm (snarf-functions): Strip whitespace from
parameter list.
(function->source): Use function-scm-name, add (function1_t).
* build-aux/snarf.sh: Resurrect, combined dump to s, h, c.
* include/mes/builtins.h:
2020-12-29 18:10:51 +01:00
Jan (janneke) Nieuwenhuizen e0ac5588ae
core: Split-out builtins.c.
* src/mes.c make_builtin_type, make_builtin, builtin_name,
builtin_arity, builtin_function, builtin_p, builtin_printer,
init_builtin, mes_builtins): Move to ..
* src/builtins.c: New file.
* build-aux/configure-lib.sh (mes_SOURCES): Add it.
* build-aux/snarf.sh: Likewise.
* build-aux/build-mes.sh (mes_sources): Remove.  Include
configure-lib.sh
* include/mes/builtins.h: Remove constants.
* include/mes/mes.h: Add prototypes.
* include/mes/constants.h (cell_symbol_test): Rename from cell_test.
* simple.make: New file.
2020-12-29 18:10:50 +01:00
Jan (janneke) Nieuwenhuizen 64635bd1e1
tests: Add gc.test.
* tests/gc.test: New file.
* build-aux/check-mes.sh (TESTS): Add it.
* scaffold/gc-test.scm: Remove.
2020-12-29 18:10:50 +01:00
Jan (janneke) Nieuwenhuizen 3bd3e5edfe
mescc: Mes C Library: div.c: Use only for ARM.
* build-aux/configure-lib.sh (libmescc_SOURCES): Remove div.c unless
ARM.
2020-12-29 17:09:35 +01:00
Jan (janneke) Nieuwenhuizen 57cd02ed0d
bootstrap: Resurrect.
* build-aux/bootstrap.sh.in (AM_CFLAGS): Use -L ${srcdest}lib.
Build libmescc.a and use it to link mes.
2020-12-29 14:24:28 +01:00
Jan (janneke) Nieuwenhuizen a8f1b63519
build: Make mescc more verbose on V=2, V=3.
* build-aux/cflags.sh (AM_CFLAGS): Add -v, -v -v for V=2, V=3
respectively.
2020-12-29 14:24:26 +01:00
Jan (janneke) Nieuwenhuizen 733b927c4c
tests: Add 70-or-argument.c.
* lib/tests/scaffold/70-or-argument.c: New file.
* build-aux/check-mescc.sh (tcc_tests): Add it.
2020-12-29 14:24:21 +01:00
Jan (janneke) Nieuwenhuizen 299a9ea369
tests: Add 70-function-modulo.c.
* lib/tests/scaffold/70-function-modulo.c: New file.
* build-aux/check-mescc.sh (tcc_tests): Add it.
2020-12-29 14:24:20 +01:00
Jan (janneke) Nieuwenhuizen 612714b26b
mescc: Mes C Library: Split _exit.c, _write.c from mini.c.
* lib/freebsd/x86-mes-gcc/mini.c: Split into...
* lib/freebsd/x86-mes-gcc/_exit.c: ...this, and...
* lib/freebsd/x86-mes-gcc/_write.c: ...this.
* lib/freebsd/x86-mes-mescc/mini.c: Slpit into...
* lib/freebsd/x86-mes-mescc/_exit.c: ...this, and...
* lib/freebsd/x86-mes-mescc/_write.c: ...this.
* lib/gnu/x86-mes-gcc/mini.c: Split into...
* lib/gnu/x86-mes-gcc/_exit.c: ...this, and...
* lib/gnu/x86-mes-gcc/_write.c: ...this.
* lib/linux/arm-mes-gcc/mini.c: Split into...
* lib/linux/arm-mes-gcc/_exit.c: ...this, and...
* lib/linux/arm-mes-gcc/_write.c: ...this.
* lib/linux/arm-mes-mescc/mini.c: Split into...
* lib/linux/arm-mes-mescc/_exit.c: ...this, and...
* lib/linux/arm-mes-mescc/_write.c: ...this.
* build-aux/configure-lib.sh (libc_mini_shared_SOURCES): Replace mini.c
with add _exit.c, _write.c.
* simple.sh: Update accordingly.
2020-12-29 14:24:18 +01:00
Jan (janneke) Nieuwenhuizen 74e0ed606c
ARM: libtcc1: Add div.c, __memcpy, __memmove, __memset.
* build-aux/configure-lib.sh (libtcc1_SOURCES)[arm]: Add div.c,
__memcpy, __memmove, __memset.
* build-aux/build-source-lib.sh: Generate libtcc1.
2020-12-29 14:24:14 +01:00
Jan (janneke) Nieuwenhuizen 8fb2ab4439
test: Split-off scaffold/60-math-itoa.c.
* lib/tests/scaffold/60-math.c (main): Move itoa tests to...
* lib/tests/scaffold/60-math-itoa.c: ...this new file.
* build-aux/check-mescc.sh (mes_tests): Add it.
2020-12-29 14:24:10 +01:00
Jan (janneke) Nieuwenhuizen a810bc50e0
test: Split-off 36-compare-arithmetic-negative.c.
* lib/tests/scaffold/36-compare-arithmetic.c (main): Move negative
divisions to...
* lib/tests/scaffold/36-compare-arithmetic-negative.c: ...new file here.
* build-aux/check-mescc.sh (mes_tests): Add it.
2020-12-29 14:24:10 +01:00
Jan (janneke) Nieuwenhuizen 6a8f67efa2
test: Split-off 50-strcmp-itoa.c
* lib/tests/string/50-strcmp.c (main): Move itoa tests to...
* lib/tests/string/50-strcmp-itoa.c: ...this new file.
* build-aux/check-mescc.sh (mes_tests): Add it.
2020-12-29 14:24:09 +01:00
Jan (janneke) Nieuwenhuizen 04c058fe5e
tests: Add 70-ternary-arithmetic-argument.c.
* lib/tests/scaffold/70-ternary-arithmetic-argument.c: New file.
* build-aux/check-mescc.sh (tcc_tests, xfail_tests): Add it.
2020-12-29 14:24:05 +01:00
Jan (janneke) Nieuwenhuizen a0560aff67
configure: Use GUILD_OPTIMIZE=-O1 for Guile-3.
* configure (main): Set guild_optimize to "-O1" for Guile-3.
* build-aux/config.make.in (GUILD_OPTIMIZE): New variable.
* build-aux/export.make (GUILD_OPTIMIZE): Export if set.
* build-aux/config.sh.in (GUILD_OPTIMIZE): New variable.
* build-aux/build-guile.sh: Use it.
2020-10-07 14:09:24 +02:00
Jan (janneke) Nieuwenhuizen 0db5bc48f5
build: Support make check TESTS=... XFAIL=... for mescc tests.
* build-aux/config.sh.in (TESTS, XFAIL_TESTS): Export.
* build-aux/export.make (TESTS, XFAIL_TESTS): Export if set.
* build-aux/check-mescc.sh (TESTS, XFAIL_TESTS): Allow user override.
2020-10-06 13:54:09 +02:00
Jan (janneke) Nieuwenhuizen 84ff05a839
mescc: Mes C Library: Support gcc-10.
See <https://lists.gnu.org/archive/html/bug-mes/2020-07/msg00000.html>.

Reported by Vagrant Cascadian <vagrant@reproducible-builds.org>.

* include/setjmp.h (jmp_buf): Remove.
* include/errno.h (errno): Mark extern.
* include/mes/lib-mini.h (environ, errno, __stdin, __stdout, __stderr):
Likewise.
* lib/mes/globals.c: New file; define them.
* build-aux/configure-lib.sh (libc_mini_shared_SOURCES,
libmescc_SOURCES): Add it.
* build-aux/test-c.sh: Always use -l c-mini as a minimum.
2020-10-06 13:13:44 +02:00
Jan (janneke) Nieuwenhuizen be87ada6b5
build: Resurrect running mescc from elsewhere.
After setting-up a buld environment, running something like

   ~/src/mes/wip/pre-inst-env mescc -v -v ~/src/mes/wip/scaffold/main.c

works again.

TODO: Make this less complex.

 * The mescc-lib (and gcc-lib) build directories do not help;
   these were introduced to support `wip-autotools'.
 * We used to opt for short *PATH variables: "." rather than
   /gnu/store/.... or /home/janneke/src/mes/master to avoid
   filling the MES arena. XXX Has this been solved?
 * In the Guix bootstrap, we run module/mescc.scm directly
       $MES -e '(mescc)' module/mescc.scm

   ...so that's why these overrides started to appear in multiple
   places.

* build-aux/pre-inst-env.in (MES_UNINSTALLED): New variable.
* scripts/mescc.in (includedir,libdir): Use it to override these.
* module/mescc/mescc.scm (arch-find): Use it to add <lib>-messc.
2020-10-06 10:44:50 +02:00
Danny Milosavljevic 237dd8a0f0
Distinguish between gcc and mescc; select LIBS accordingly.
* build-aux/check.sh.in: Distinguish between gcc and mescc;
add MES_CHECKING_BUILTIN_LIBS.
* build-aux/test-c.sh: Use it to select LIBS accordingly.
2020-10-06 10:04:41 +02:00
Danny Milosavljevic 56f859200e
Make "raise" available for gcc use.
* build-aux/configure-lib.sh (libc_tcc_SOURCES): Move lib/posix/raise.c,
lib/linux/getpid.c, lib/linux/kill.c to...
(libc_SOURCES): ...here.
2020-10-06 10:04:29 +02:00
Danny Milosavljevic 0b79ca74ea
build: Use libgcc.a instead of libmescc.a for gcc. 2020-10-06 10:04:29 +02:00
Danny Milosavljevic 931ae9280e
build: Make raise available in libc+tcc for libgcc.
* build-aux/configure-lib.sh (libc_gnu_SOURCES): Remove raise, getpid, kill.
(libc_tcc_SOURCES): Add raise, getpid, kill.
2020-10-06 10:04:28 +02:00
Danny Milosavljevic 047014e704
build: Fixup cleaning of armv4.
* build-aux/GNUmakefile.in (clean): Clean armv4 go files.
2020-08-22 14:09:54 +02:00
Danny Milosavljevic 073cfca2b4
build-aux: Increase test timeout to 20 s. 2020-06-16 14:00:10 +02:00
Danny Milosavljevic 040220acee
Add ARM backend.
* build-aux/build-guile.sh: Add ARM backend.
* lib/arm-mes/arm.M1: New file.
* module/mescc/armv4/as.scm: New file.
* module/mescc/armv4/info.scm: New file.
* module/mescc/mescc.scm: Use it.
* module/mescc/M1.scm (info->M1): Support ARM symbolic instructions,
including little endian instructions.  Align functions.
2020-06-10 13:11:07 +02:00
Danny Milosavljevic 55d38162be
Introduce libmescc.a; Put division by integer in there; split syscalls' errno off.
* build-aux/configure-lib.sh (libmescc_SOURCES): Add lib/mes/div.c,
lib/linux/*/syscall-internal.c.
* build-aux/build-lib.sh: Add libmescc.a.
* build-aux/build-mes.sh: On gcc, add "-lmescc".
* build-aux/test-c.sh: Add "-lmescc".
* build-aux/check.sh.in: Add mescc to LIBS.
* module/mescc/mescc.scm (mescc:link): Add "mescc".
* module/mescc.scm (mescc:main): Update documentation of "-nodefaultlibs"
and "-nostdlib".
* lib/mes/div.c (ldiv): Rename to...
(__mesabi_ldiv): ...this.  Avoid assert.
(__mesabi_div0): Avoid assert.
(__aeabi_idivmod): New procedure.
(__aeabi_idiv): New procedure.
(__aeabi_uidivmod): New procedure.
(__aeabi_uidiv): New procedure.
* lib/linux/x86-mes-gcc/syscall.c (__sys_call, __sys_call1, __sys_call2,
__sys_call3, __sys_call4): Move to...
* lib/linux/x86-mes-gcc/syscall-internal.c: ...here.
(__raise): New procedure.
* lib/linux/x86-mes-mescc/syscall.c (__sys_call, __sys_call1, __sys_call2,
__sys_call3, __sys_call4): Move to...
* lib/linux/x86-mes-mescc/syscall-internal.c: ...here.
(__raise): New procedure.
* lib/linux/arm-mes-gcc/syscall.c: New file.
* lib/linux/arm-mes-gcc/syscall-internal.c: New file.
* lib/linux/arm-mes-mescc/syscall.c: New file.
* lib/linux/arm-mes-mescc/syscall-internal.c: New file.
* lib/gnu/syscall.c (__syscall, __syscall2, __syscall_get, __syscall_put):
Move to...
* lib/gnu/syscall-internal.c: ...here.
2020-06-02 15:04:13 +02:00
Danny Milosavljevic 6183816f83
Support and pass "-marm".
* build-aux/cflags.sh,
build-aux/check.sh.in: Pass "-marm" for ARM.
* module/mescc/mescc.scm: Accept it.
2020-06-02 14:35:16 +02:00
Jan Nieuwenhuizen 52fb6cdbfc
Release 0.22.
* configure (VERSION): Update to 0.22.
(main): Likewise.
* build-aux/GNUmakefile.in: Likewise.
* configure.sh (VERSION): Likewise.
* guix/git/mes.scm (mes, mes.git): Likewise.
2020-01-20 22:47:53 +01:00
Jan Nieuwenhuizen c575069b62
build: Update release process.
* build-aux/GNUmakefile.in: Update documentation.
(sign-dist):  Rename from `sign'.
* configure: Remove version check for Guix; support GUIX=guix ./configure.
2020-01-20 22:47:52 +01:00
Jan Nieuwenhuizen 62193aa1db
build: Support bootstrapping using build.sh.
* build-aux/build.sh.in: Oops, use $compiler = bootstrap concept does
not exist yet.  Gash cp does not support -p; drop it.
* configure.sh: Oops, set bootstrap to `true' instead of yes.
2020-01-20 22:47:52 +01:00
Jan Nieuwenhuizen 2f72303e6c
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.
2020-01-20 22:47:52 +01:00
Jan Nieuwenhuizen e354d8b165
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.
2019-12-17 21:08:18 +01:00
Jan Nieuwenhuizen 34106fc420
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.
2019-12-17 21:07:35 +01:00
Jan Nieuwenhuizen 9b0009a888
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.
2019-12-13 21:52:31 +01:00
Jan Nieuwenhuizen 89945751d9
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.
2019-12-13 21:52:30 +01:00
Jan Nieuwenhuizen 67d82a6de5
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.
2019-12-13 21:52:30 +01:00
Jan Nieuwenhuizen 72c76d6b3a
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.
2019-12-13 21:52:30 +01:00