]> git.proxmox.com Git - wasi-libc.git/log
wasi-libc.git
18 months agoupdate lintian overrides
Fabian Grünbichler [Tue, 15 Nov 2022 19:05:41 +0000 (20:05 +0100)]
update lintian overrides

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
18 months agorefresh patches
Fabian Grünbichler [Thu, 29 Sep 2022 10:18:21 +0000 (12:18 +0200)]
refresh patches

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
18 months agoswitch to LLVM 14
Fabian Grünbichler [Thu, 29 Sep 2022 10:10:19 +0000 (12:10 +0200)]
switch to LLVM 14

and adapt to Makefile variable renaming.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
18 months agoUpdate upstream source from tag 'upstream/0.0_git20220510.9886d3d'
Fabian Grünbichler [Tue, 15 Nov 2022 19:02:11 +0000 (20:02 +0100)]
Update upstream source from tag 'upstream/0.0_git20220510.9886d3d'

Update to upstream version '0.0~git20220510.9886d3d'
with Debian dir 69fdbbf66fd80dc64364e3141d9f83f1d7bde08e

18 months agoNew upstream version 0.0~git20220510.9886d3d
Fabian Grünbichler [Tue, 15 Nov 2022 19:02:10 +0000 (20:02 +0100)]
New upstream version 0.0~git20220510.9886d3d

2 years agoFix `find_relpath` to handle large buffers correctly.
Dan Gohman [Tue, 10 May 2022 01:16:05 +0000 (18:16 -0700)]
Fix `find_relpath` to handle large buffers correctly.

As a follow-up to #247, fix `find_relpath` to handle large buffers
correctly.

Co-Authored-by: Yuta Saito <kateinoigakukun@gmail.com>
2 years agoExclude C++ headers from the generated include-all.c program.
Dan Gohman [Fri, 6 May 2022 01:04:14 +0000 (18:04 -0700)]
Exclude C++ headers from the generated include-all.c program.

The order that things happen in appears to have changed, and the
include-all.c script is now generated at a time when there can be
C++ headers in the sysroot, so adjust the script to exclude C++
headers.

2 years agoOverride Make's default for CC and AR.
Mike Hommey [Thu, 5 May 2022 05:06:22 +0000 (14:06 +0900)]
Override Make's default for CC and AR.

2 years agofeat: add support for accept and accept4
Harald Hoyer [Mon, 2 May 2022 10:21:42 +0000 (12:21 +0200)]
feat: add support for accept and accept4

Since the socket address of the accepted socket is unknown,
all bytes are set to zero and the length is truncated to the size
of the generic `struct sockaddr`.

Signed-off-by: Harald Hoyer <harald@profian.com>
2 years agoAdjust the Makefile for LLVM 15 as of 2022-04-20
Mike Hommey [Thu, 21 Apr 2022 02:52:43 +0000 (11:52 +0900)]
Adjust the Makefile for LLVM 15 as of 2022-04-20

2 years agobuild: update WASI and partially regenerate `api.h`
Roman Volosatovs [Mon, 4 Apr 2022 15:39:21 +0000 (17:39 +0200)]
build: update WASI and partially regenerate `api.h`

2 years agoAdd implementation file.
Dan Gohman [Mon, 28 Mar 2022 21:55:08 +0000 (14:55 -0700)]
Add implementation file.

2 years agoDefine DTTOIF and IFTODT.
Dan Gohman [Thu, 24 Mar 2022 00:17:34 +0000 (17:17 -0700)]
Define DTTOIF and IFTODT.

Fixes #268.

2 years agoAdjust the Makefile for LLVM 14
Mike Hommey [Fri, 8 Apr 2022 01:38:53 +0000 (10:38 +0900)]
Adjust the Makefile for LLVM 14

2 years ago`WASM_NM` -> `NM` to use standardized env var
John Ericson [Wed, 16 Mar 2022 18:20:29 +0000 (18:20 +0000)]
`WASM_NM` -> `NM` to use standardized env var

Progress towards #269

2 years ago`WASM_AR` -> `AR` to use standardized env var
John Ericson [Wed, 16 Mar 2022 18:20:29 +0000 (18:20 +0000)]
`WASM_AR` -> `AR` to use standardized env var

Progress towards #269

2 years ago`WASM_CFLAGS` -> `EXTRA_CFLAGS`
John Ericson [Wed, 16 Mar 2022 18:20:29 +0000 (18:20 +0000)]
`WASM_CFLAGS` -> `EXTRA_CFLAGS`

Progress towards #269

2 years ago`WASM_CC` -> `CC` to use standardized env var
John Ericson [Tue, 22 Mar 2022 22:33:41 +0000 (22:33 +0000)]
`WASM_CC` -> `CC` to use standardized env var

Progress towards #269

2 years agoPull out `{UN,}DEFINED_SYMBOLS` as make vars
John Ericson [Wed, 30 Mar 2022 02:07:02 +0000 (02:07 +0000)]
Pull out `{UN,}DEFINED_SYMBOLS` as make vars

If the Apple bug is in make and not bash, maybe this will help.

2 years agoDo more explicit env vars for CI
John Ericson [Mon, 21 Mar 2022 23:43:55 +0000 (23:43 +0000)]
Do more explicit env vars for CI

This gets ready for switching to the standard vars, which sadly were
already mis-initialized in this environment so we have to be extra
careful to override them.

2 years agoFix futimens error handling.
Dan Gohman [Mon, 28 Mar 2022 21:44:48 +0000 (14:44 -0700)]
Fix futimens error handling.

Fix a bug introduced in #242 noticed [here]: if `tv_usec` is out of
range, then properly return an error code.

[here]: https://github.com/WebAssembly/wasi-libc/commit/079adff840032c3455eb1cb34dc9ceaa0b2bfc0c#r69631767

2 years agoUpdate the comment at the top of wasi/api.h.
Dan Gohman [Thu, 24 Mar 2022 00:22:32 +0000 (17:22 -0700)]
Update the comment at the top of wasi/api.h.

2 years agoDisable the headerstest test.
Dan Gohman [Wed, 23 Mar 2022 22:52:44 +0000 (15:52 -0700)]
Disable the headerstest test.

2 years agoRemove the signal constants and proc_raise function.
Dan Gohman [Wed, 23 Mar 2022 22:07:36 +0000 (15:07 -0700)]
Remove the signal constants and proc_raise function.

The WASI signal constants and proc_raise function were removed in the
latest [ephemeral], which had been scheduled to be in the next snapshot,
however WASI itself is now transitioning away from the snapshot system.

WASI libc will also be transitioning to updated wit specs once they're
ready, however until that time, we can make the simple change of
removing these signal constants to avoid confusion.

Fixes #271.
Fixes #272.

[ephemeral]: https://github.com/WebAssembly/WASI/tree/main/phases/ephemeral/witx

2 years agoSimplify a header check by using the `SYSROOT_*` variables
John Ericson [Tue, 22 Mar 2022 03:55:01 +0000 (03:55 +0000)]
Simplify a header check by using the `SYSROOT_*` variables

2 years agoAdd `make clean` rule, don't have `include_dirs` nuke other things (#277)
John Ericson [Wed, 23 Mar 2022 00:25:54 +0000 (20:25 -0400)]
Add `make clean` rule, don't have `include_dirs` nuke other things (#277)

I think this separation of concerns is good, though I don't need it for
Nixpkgs.

2 years agoUse `-isystem` instead of `--sysroot` for the installed headers
John Ericson [Mon, 21 Mar 2022 23:16:23 +0000 (23:16 +0000)]
Use `-isystem` instead of `--sysroot` for the installed headers

This is less of a sledgehammer, and prepares the way for #270.

2 years agoEnable support for `utimes` and `futimesat`.
Dan Gohman [Fri, 2 Apr 2021 19:18:20 +0000 (12:18 -0700)]
Enable support for `utimes` and `futimesat`.

These can both be implemented in terms of `utimensat`.

2 years agomore graphical code
Gerd Stolpmann [Wed, 16 Jun 2021 08:55:12 +0000 (10:55 +0200)]
more graphical code

2 years agochdir: fixing a malloc'ed buffer that was not large enough
Gerd Stolpmann [Tue, 15 Jun 2021 19:03:22 +0000 (21:03 +0200)]
chdir: fixing a malloc'ed buffer that was not large enough
(mem corruption)

2 years agoRelease 0.0~git20210922.ad51334-1 to Debian unstable.
Ximin Luo [Tue, 8 Mar 2022 10:50:02 +0000 (10:50 +0000)]
Release 0.0~git20210922.ad51334-1 to Debian unstable.

2 years agoRelease 0.0~git20210922.ad51334-1~exp1 to Debian experimental.
Ximin Luo [Sun, 6 Mar 2022 21:29:20 +0000 (21:29 +0000)]
Release 0.0~git20210922.ad51334-1~exp1 to Debian experimental.

2 years agoclose bug
Ximin Luo [Sun, 6 Mar 2022 21:28:55 +0000 (21:28 +0000)]
close bug

2 years agoUpdate to LLVM 13, same as rust
Ximin Luo [Sun, 6 Mar 2022 21:26:15 +0000 (21:26 +0000)]
Update to LLVM 13, same as rust

2 years agobump version
Fabian Grünbichler [Thu, 3 Feb 2022 18:22:17 +0000 (19:22 +0100)]
bump version

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoprevent linker warning from failing the build
Fabian Grünbichler [Thu, 3 Feb 2022 18:38:53 +0000 (19:38 +0100)]
prevent linker warning from failing the build

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agorefresh patches
Fabian Grünbichler [Thu, 3 Feb 2022 18:27:01 +0000 (19:27 +0100)]
refresh patches

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoUpdate upstream source from tag 'upstream/0.0_git20210922.ad51334'
Ximin Luo [Sun, 6 Mar 2022 21:16:56 +0000 (21:16 +0000)]
Update upstream source from tag 'upstream/0.0_git20210922.ad51334'

Update to upstream version '0.0~git20210922.ad51334'
with Debian dir 15412c0bc288564835f6fafef15529ed339a05a5

2 years agoNew upstream version 0.0~git20210922.ad51334
Ximin Luo [Sun, 6 Mar 2022 21:16:47 +0000 (21:16 +0000)]
New upstream version 0.0~git20210922.ad51334

2 years agoRelease 0.0~git20201130.5879558-1 to Debian unstable.
Ximin Luo [Wed, 29 Sep 2021 18:55:32 +0000 (19:55 +0100)]
Release 0.0~git20201130.5879558-1 to Debian unstable.

2 years agoAdjust the Makefile for LLVM 13
Mike Hommey [Wed, 22 Sep 2021 06:35:10 +0000 (15:35 +0900)]
Adjust the Makefile for LLVM 13

2 years agoAllow user to provide CC wrapper (#255)
Vitali Lovich [Wed, 22 Sep 2021 04:52:40 +0000 (21:52 -0700)]
Allow user to provide CC wrapper (#255)

If using a custom toolchain not on the path, explicitly invoking
ccache/sccache is required (also easier to debug that the right compiler
is being invoked). Fixes #253.

2 years agoBuild with -Wno-unknown-warning-option too.
Dan Gohman [Mon, 9 Aug 2021 23:52:35 +0000 (16:52 -0700)]
Build with -Wno-unknown-warning-option too.

To suppress the warning about older compilers warning about the flag to
suppress the warning that newer compilers are emitting.

2 years agoIgnore -Wunused-but-set-variable warnings.
Dan Gohman [Mon, 9 Aug 2021 23:43:57 +0000 (16:43 -0700)]
Ignore -Wunused-but-set-variable warnings.

This come up when compiling musl with newer clang releases and
appear to be harmless.

2 years agoAdd build flag to select malloc implementation
Ayke van Laethem [Tue, 13 Jul 2021 21:10:58 +0000 (23:10 +0200)]
Add build flag to select malloc implementation

Add a build flag MALLOC_IMPL that can be set to dlmalloc or none
(defaulting to dlmalloc) which controls the malloc implementation to
use. The dlmalloc option is the same as before, but selecting none
removes dlmalloc from the libc build.

This flag replaces the BUILD_DLMALLOC flag, which never worked and thus
can be removed without breaking any builds. By switching to MALLOC_IMPL,
there is a clear path towards a different heap implementation, such as
mimalloc.

3 years agoAlso add a way to read `environ` without triggering eager init.
Dan Gohman [Thu, 18 Mar 2021 16:48:01 +0000 (09:48 -0700)]
Also add a way to read `environ` without triggering eager init.

Add a `__wasilibc_get_environ` function which returns the value of
`environ` but without performing eager init.

3 years agoAdd a function to de-initialize the environment-variable state.
Dan Gohman [Thu, 11 Mar 2021 15:26:31 +0000 (07:26 -0800)]
Add a function to de-initialize the environment-variable state.

Add a `__wasilibc_deinit_environ` function which clears the current
environment variable state to the state where next time the environment
variable functions are called, they'll reinitialize the environment.

And add a `__wasilibc_maybe_reinitialize_environ_eagerly` function to
reinitialize the environment variable state if `environ` or `_environ`
are needed.

These functions are needed by wizer to be able to suspend and resume
a program and have it read new environment variables from the host
environment; see bytecodealliance/wizer#8 for background.

3 years agoRelease 0.0~git20201130.5879558-1~exp1 to Debian experimental.
Ximin Luo [Wed, 7 Apr 2021 00:43:36 +0000 (01:43 +0100)]
Release 0.0~git20201130.5879558-1~exp1 to Debian experimental.

3 years agoUpdate d/changelog
Ximin Luo [Wed, 7 Apr 2021 00:42:29 +0000 (01:42 +0100)]
Update d/changelog

3 years agoUpdate upstream source from tag 'upstream/0.0_git20201130.5879558'
Ximin Luo [Wed, 7 Apr 2021 00:38:26 +0000 (01:38 +0100)]
Update upstream source from tag 'upstream/0.0_git20201130.5879558'

Update to upstream version '0.0~git20201130.5879558'
with Debian dir 55183e956df1e429c65c3903e50f6f00ec477006

3 years agoNew upstream version 0.0~git20201130.5879558
Ximin Luo [Wed, 7 Apr 2021 00:38:19 +0000 (01:38 +0100)]
New upstream version 0.0~git20201130.5879558

3 years agoImplement emulated support for `getpid`.
Dan Gohman [Fri, 2 Apr 2021 19:39:00 +0000 (12:39 -0700)]
Implement emulated support for `getpid`.

Add a simple `getpid` emulation function which just returns a fixed
value, for applications that just use it for logging.

3 years agoAdd some more comments.
Dan Gohman [Mon, 22 Mar 2021 20:30:18 +0000 (13:30 -0700)]
Add some more comments.

3 years agoInclude libwasi-emulated-*.a symbols in defined-symbols.txt.
Dan Gohman [Mon, 22 Mar 2021 20:17:38 +0000 (13:17 -0700)]
Include libwasi-emulated-*.a symbols in defined-symbols.txt.

3 years agoEmulate `clock`, `times`, and `getrusage` using the monotonic clock.
Dan Gohman [Mon, 22 Mar 2021 16:33:30 +0000 (09:33 -0700)]
Emulate `clock`, `times`, and `getrusage` using the monotonic clock.

Upcoming WASI snapshots omit the `PROCESS_CPUTIME` clock, since WASI has
no inherent concept of processes, and since implementations which don't
use a process for each instance don't have a way to implement it
efficiently.

However, `clock`, `times`, and `getrusage` are useful functions, so
provide optional emulated version of them, using the `MONOTONIC` clock.
This means these implementations will measure not just the program's
own CPU time, but also time spent suspended while other programs are
running.

Due to this difference in behavior, put these implementations behind
a flag. Users must pass `-D_WASI_EMULATED_PROCESS_CLOCK` and link with
`-lwasi-emulated-process-clocks` to enable them.

3 years agoUpdate to musl 1.2.2.
Dan Gohman [Thu, 18 Mar 2021 16:47:06 +0000 (09:47 -0700)]
Update to musl 1.2.2.

See the WHATSNEW file for details.

3 years agoUpdate README.md to include Arch Linux in section title
Zheng Luo [Sun, 28 Feb 2021 19:16:48 +0000 (19:16 +0000)]
Update README.md to include Arch Linux in section title

3 years agoUpdate README to include AUR repo
Zheng Luo [Sun, 28 Feb 2021 05:27:15 +0000 (00:27 -0500)]
Update README to include AUR repo

Just created an AUR repo at https://aur.archlinux.org/packages/wasi-libc-git/ . Add its link to README to help fellow Archlinux users

3 years agoUpdate to the next version of the `witx` crate (#234)
Alex Crichton [Tue, 23 Feb 2021 18:18:56 +0000 (12:18 -0600)]
Update to the next version of the `witx` crate (#234)

* Update to the next version of the `witx` crate

* Generate adapter functions instead of simply a header file to have a
  place where adapter code can go.
* Implement adapters in terms of the instructions that the `witx` crate
  tells us about.
* Update the interface of functions to what `witx` expects, notably
  string arguments are now only taken as `char*` and `strlen` happens in
  the adapter function.
* Update defined/predefined/undefined symbol lists for types that have
  been updated.

Some precise generated code has changed but the actual APIs should all
be the same except for the change to not take the length of the string
in the raw WASI call, since idiomatically C doesn't pass the length of
strings around.

Eventually it's expected that the shim functions, while sometimes not
necessary today, will implement more checks and more conversions as
necessary for new APIs.

* Actually update witx submodule

* Comment how to regenerate files

* Tweak name of actual function imports

Make it a bit clearer that they're the ones that we're importing and
calling.

* Update submodule to point to WebAssembly

3 years agoAT_FDCWD support.
Dan Gohman [Thu, 4 Feb 2021 17:29:21 +0000 (09:29 -0800)]
AT_FDCWD support.

AT_FDCWD is a special constant in POSIX that can be passed to *at
functions to indicate the current working directory. Since the
current working directory is emulated in wasi libc, add emulated
AT_FDCWD support as well.

Fixes #42.

3 years agoImplement the cimag/creal functions for all types consistently.
Dan Gohman [Fri, 5 Feb 2021 04:15:04 +0000 (20:15 -0800)]
Implement the cimag/creal functions for all types consistently.

3 years agoAdd -Wno-ignored-pragmas.
Dan Gohman [Fri, 5 Feb 2021 04:14:52 +0000 (20:14 -0800)]
Add -Wno-ignored-pragmas.

3 years agoDefine creal/cimag/etc. in a libc-friendly way.
Dan Gohman [Fri, 5 Feb 2021 04:06:13 +0000 (20:06 -0800)]
Define creal/cimag/etc. in a libc-friendly way.

3 years agoAdd -Wno-missing-braces.
Dan Gohman [Fri, 5 Feb 2021 03:38:59 +0000 (19:38 -0800)]
Add -Wno-missing-braces.

3 years agoAdd -Wno-ignored-attributes.
Dan Gohman [Fri, 5 Feb 2021 03:35:56 +0000 (19:35 -0800)]
Add -Wno-ignored-attributes.

3 years agoAdd -Wno-unused-function.
Dan Gohman [Fri, 5 Feb 2021 03:32:30 +0000 (19:32 -0800)]
Add -Wno-unused-function.

3 years agoAdd -Wno-unused-variable.
Dan Gohman [Fri, 5 Feb 2021 02:55:57 +0000 (18:55 -0800)]
Add -Wno-unused-variable.

3 years agoFix a warning.
Dan Gohman [Fri, 5 Feb 2021 02:16:12 +0000 (18:16 -0800)]
Fix a warning.

3 years agoAdd -Wno-sign-compare too.
Dan Gohman [Fri, 5 Feb 2021 02:08:41 +0000 (18:08 -0800)]
Add -Wno-sign-compare too.

3 years agoIgnore a few warnings which occur in third-party code.
Dan Gohman [Fri, 5 Feb 2021 01:59:31 +0000 (17:59 -0800)]
Ignore a few warnings which occur in third-party code.

3 years agoAdd -Wall -Wextra -Werror to the build.
Dan Gohman [Fri, 5 Feb 2021 00:27:52 +0000 (16:27 -0800)]
Add -Wall -Wextra -Werror to the build.

3 years agoRemove __wasilibc_unmodified_upstream markers from libc-bottom-half.
Dan Gohman [Fri, 5 Feb 2021 00:36:38 +0000 (16:36 -0800)]
Remove __wasilibc_unmodified_upstream markers from libc-bottom-half.

We've already started removing this; this just removes all remaining
ones under the libc-bottom-half directory.

These markers were originally intended to help track upstream changes,
however in practice they created a lot of clutter and weren't that
helpful. And now, upstream cloudlibc is no longer active.

3 years agoUse separate makefile var for CFLAGS (#226)
Albert Cervin [Thu, 10 Dec 2020 16:31:21 +0000 (17:31 +0100)]
Use separate makefile var for CFLAGS (#226)

CFLAGS now get initialized with the provided value for WASM_CFLAGS, or
its default.

This seems to be the intended use case of having `WASM_CFLAGS ?=` at the
top of the Makefile. Otherwise, if WASM_CFLAGS is set on the command
line, it overrides all CFLAGS and for example `--sysroot` is not added,
rendering the build invalid unless it is supplied on the make command
line.

3 years agoRelease 0.0~git20200731.215adc8-2 to Debian unstable.
Ximin Luo [Tue, 1 Dec 2020 20:03:44 +0000 (20:03 +0000)]
Release 0.0~git20200731.215adc8-2 to Debian unstable.

3 years agowindows ci: try moving rustup stuff to non-bash shell (#225)
Pat Hickey [Mon, 30 Nov 2020 23:42:32 +0000 (15:42 -0800)]
windows ci: try moving rustup stuff to non-bash shell (#225)

3 years agoFix sinh's sign handling
Dan Gohman [Mon, 30 Nov 2020 21:25:28 +0000 (13:25 -0800)]
Fix sinh's sign handling

In the musl 1.2.1 update, I made a change to disable the new code in
sinh for handling directed rounding modes, but I only incompletely
disabled it. This led to `sinh(-inf)` computing `inf` instead of `-inf`,
detected in [wasi-libc-test]. This patch fixes it.

[wasi-libc-test]: https://github.com/CraneStation/wasi-libc-test/tree/master/libc-test

3 years agoUpdate to musl 1.2.1. (#222)
Dan Gohman [Mon, 30 Nov 2020 20:47:45 +0000 (12:47 -0800)]
Update to musl 1.2.1. (#222)

See the WHATSNEW file for details. WASI libc currently uses a separate
malloc, so the new mallocng is not currently used.

This includes a few new custom changes to disable code for handling
directed rounding modes. Wasm doesn't have directed rounding modes,
so disabling this code size saves code size, something the WASI libc
project cares about!

3 years agoAdd basic emulation of getcwd/chdir (#214)
Alex Crichton [Mon, 30 Nov 2020 20:40:41 +0000 (14:40 -0600)]
Add basic emulation of getcwd/chdir (#214)

* Add basic emulation of getcwd/chdir

This commit adds basic emulation of a current working directory to
wasi-libc. The `getcwd` and `chdir` symbols are now implemented and
available for use. The `getcwd` implementation is pretty simple in that
it just copies out of a new global, `__wasilibc_cwd`, which defaults to
`"/"`. The `chdir` implementation is much more involved and has more
ramification, however.

A new function, `make_absolute`, was added to the preopens object. Paths
stored in the preopen table are now always stored as absolute paths
instead of relative paths, and initial relative paths are interpreted as
being relative to `/`. Looking up a path to preopen now always turns it
into an absolute path, relative to the current working directory, and an
appropriate path is then returned.

The signature of `__wasilibc_find_relpath` has changed as well. It now
returns two path components, one for the absolute part and one for the
relative part. Additionally the relative part is always dynamically
allocated since it may no longer be a substring of the original input
path.

This has been tested lightly against the Rust standard library so far,
but I'm not a regular C developer so there's likely a few things to
improve!

* Amortize mallocs made in syscalls

* Avoid size bloat on programs that don't use `chdir`

* Add threading compat

* Collect `link`/`renameat` second path lookup

* Update comments about chdir.c in makefile

* Move definition of `__wasilibc_find_relpath_alloc` to header

* Expand comments

* Document the format of strings a bit more

* Fixup a few issues in path logic

* Fix GitHub Actions

3 years agoUpdate to LLVM 11
Ximin Luo [Sun, 15 Nov 2020 16:32:01 +0000 (16:32 +0000)]
Update to LLVM 11

3 years agoRelease 0.0~git20200731.215adc8-1 to Debian unstable.
Ximin Luo [Sat, 7 Nov 2020 20:58:52 +0000 (20:58 +0000)]
Release 0.0~git20200731.215adc8-1 to Debian unstable.

3 years agoCI: use $GITHUB_PATH,ENV rather than add-path, set-env
Pat Hickey [Mon, 5 Oct 2020 20:33:32 +0000 (13:33 -0700)]
CI: use $GITHUB_PATH,ENV rather than add-path, set-env

In accordance with this advisory it's recommended we move to a
different scheme of setting env vars and updating PATH:

https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/

3 years agoNew-style command support. (#203)
Dan Gohman [Sat, 3 Oct 2020 21:18:39 +0000 (14:18 -0700)]
New-style command support. (#203)

This adds a new crt1-command.c startup file, which uses
[new-style command support]. Instead of calling `__wasm_call_ctors`
and `__wasm_call_dtors` directly, this lets wasm-ld automatically call
them.

This preserves the existing crt1.c, so that the same wasi-libc build
can support old-style and new-style commands, for compatibility during
the transition.

[new-style command support]: https://reviews.llvm.org/D81689

Co-authored-by: Dan Gohman <sunfish@mozilla.com>
3 years agoactivate the use of __heap_base (#215)
vms [Thu, 24 Sep 2020 01:14:32 +0000 (04:14 +0300)]
activate the use of __heap_base (#215)

3 years agoRelease 0.0~git20200731.215adc8-1~exp1 to Debian experimental.
Ximin Luo [Fri, 4 Sep 2020 16:29:10 +0000 (17:29 +0100)]
Release 0.0~git20200731.215adc8-1~exp1 to Debian experimental.

3 years agoUpdate d/changelog, patches
Ximin Luo [Fri, 4 Sep 2020 16:28:51 +0000 (17:28 +0100)]
Update d/changelog, patches

3 years agoUpdate upstream source from tag 'upstream/0.0_git20200731.215adc8'
Ximin Luo [Fri, 4 Sep 2020 16:27:59 +0000 (17:27 +0100)]
Update upstream source from tag 'upstream/0.0_git20200731.215adc8'

Update to upstream version '0.0~git20200731.215adc8'
with Debian dir 2eea1c752dc11a3545e5ad6acf4f1b64084d1c84

3 years agoNew upstream version 0.0~git20200731.215adc8
Ximin Luo [Fri, 4 Sep 2020 16:27:57 +0000 (17:27 +0100)]
New upstream version 0.0~git20200731.215adc8

3 years agoupdate upstream git url
Ximin Luo [Fri, 4 Sep 2020 16:27:26 +0000 (17:27 +0100)]
update upstream git url

3 years agoRelease 0.0~git20200319.9efc2f4-2 to Debian unstable.
Ximin Luo [Wed, 5 Aug 2020 20:52:27 +0000 (21:52 +0100)]
Release 0.0~git20200319.9efc2f4-2 to Debian unstable.

3 years agoUpdate to LLVM 10
Ximin Luo [Wed, 5 Aug 2020 20:51:24 +0000 (21:51 +0100)]
Update to LLVM 10

3 years agoRedefine the `access` bits to be compatible with other systems (#210)
Dan Gohman [Fri, 31 Jul 2020 20:44:58 +0000 (13:44 -0700)]
Redefine the `access` bits to be compatible with other systems (#210)

Normally bits like this would be considered implementation details, but
in this case, `X_OK`, `W_OK`, and `R_OK` line up with `S_IXOTH`,
`S_IWOTH`, and `S_IROTH` on other systems, and those bits do have
well-known values.

3 years agoRelease 0.0~git20200319.9efc2f4-1 to Debian unstable.
Ximin Luo [Sat, 4 Jul 2020 16:25:33 +0000 (17:25 +0100)]
Release 0.0~git20200319.9efc2f4-1 to Debian unstable.

3 years agoUpdate changelog
Ximin Luo [Sat, 4 Jul 2020 16:25:28 +0000 (17:25 +0100)]
Update changelog

3 years agoUpdate upstream source from tag 'upstream/0.0_git20200319.9efc2f4'
Ximin Luo [Sat, 4 Jul 2020 16:24:11 +0000 (17:24 +0100)]
Update upstream source from tag 'upstream/0.0_git20200319.9efc2f4'

Update to upstream version '0.0~git20200319.9efc2f4'
with Debian dir c20be67b076a95932c4c8bdd6f0d3aca7928edac

3 years agoNew upstream version 0.0~git20200319.9efc2f4
Ximin Luo [Sat, 4 Jul 2020 16:24:08 +0000 (17:24 +0100)]
New upstream version 0.0~git20200319.9efc2f4

3 years agoadd more precise instructions on updating the source package
Ximin Luo [Sat, 4 Jul 2020 16:22:22 +0000 (17:22 +0100)]
add more precise instructions on updating the source package

3 years agoComment a use of `__attribute__((visibility("protected")))`. (#204)
Dan Gohman [Sat, 13 Jun 2020 03:21:12 +0000 (20:21 -0700)]
Comment a use of `__attribute__((visibility("protected")))`. (#204)

This comments out a use of "protected" visibility, since
[WebAssembly doesn't support it].

[WebAssembly doesn't support it]: https://reviews.llvm.org/D81688

3 years agoRename `__prepare_for_exit` to `__wasm_call_dtors`. (#201)
Dan Gohman [Mon, 8 Jun 2020 22:21:18 +0000 (15:21 -0700)]
Rename `__prepare_for_exit` to `__wasm_call_dtors`. (#201)

This emphasizes the relationship with `__wasm_call_ctors`. Note however
that while `__wasm_call_ctors` is synthesized by the linker,
`__wasm_call_dtors` is still defined by libc.

Static constructors are registered statically, but static destructors
need to be registered dynamically so that they only run if their
corresponding static constructors have run, and so that they're
ordered with respect to interleaved `atexit` calls.

3 years agoAvoid calling `poll_oneoff` with zero subscriptions. (#162)
Dan Gohman [Tue, 2 Jun 2020 02:00:30 +0000 (19:00 -0700)]
Avoid calling `poll_oneoff` with zero subscriptions. (#162)

* Avoid calling `poll_oneoff` with zero subscriptions.

With https://github.com/WebAssembly/WASI/pull/193 merged, WASI is moving
to make `poll_oneoff` with no arguments an error. Even though that's in
ephemeral and not yet in a snapshot, we can start to anticipate it in
libc:
 - Remove the `pause` function, since WASI has no signals and thus no
   way to ever wake it up short of having the host terminate it.
 - Make `poll` and `pselect` return `ENOTSUP` in the case of having no
   events to wait for.

* Remove `pause` from the defined-symbols.txt list.

* Fix __wasilibc_unmodified_upstream markers.

* Check for zero subscriptions, rather than zero events.

Make `poll` and `pselect` return `ENOTSUP` when asked to poll on zero
subscriptions, rather than when the systerm returns zero events.

While here, drop the `__wasilibc_unmodified_upstream` markers, which
were already pretty noisy here, and would be significantly worse with
this change.

* Add comments about the subtle relationship between nfds and nsubscriptions.

* Rewrite the comment.

* Fix code quotes.

3 years agoMerge the basics component into libc-bottom-half. (#199)
Dan Gohman [Mon, 1 Jun 2020 23:44:05 +0000 (16:44 -0700)]
Merge the basics component into libc-bottom-half. (#199)

We no longer have a need to maintain basics as a separate component.
Folding it into libc-bottom-half eliminates a fair amount of redundancy.