@ecmaos-apps/make-src 0.0.0-stage → 4.4.1-ecmaos.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/build/build.sh +45 -0
- package/package.json +35 -4
- package/share/licenses/make/COPYING +674 -0
- package/share/licenses/make/SOURCE +24 -0
- package/sources/make-4.4.1.tar.gz +0 -0
- package/toolchain/emscripten-version +1 -0
- package/toolchain/rust-wali-version +3 -0
- package/toolchain/wali/asyncify-reach.mjs +107 -0
- package/toolchain/wali/asyncify.sh +57 -0
- package/toolchain/wali/build-sysroot.sh +158 -0
- package/toolchain/wali/patches/compiler-rt/0001-wasm-compare-result.patch +18 -0
- package/toolchain/wali/patches/musl/0001-environment-through-imports.patch +143 -0
- package/toolchain/wali/patches/musl/0002-setjmp-with-wasm-exceptions.patch +133 -0
- package/toolchain/wali/patches/musl/0003-unknown-syscall-is-enosys.patch +31 -0
- package/toolchain/wali/patches/musl/0004-return-from-main-is-exit.patch +53 -0
- package/toolchain/wali/patches/musl/0005-posix-spawn-through-the-host.patch +278 -0
- package/toolchain/wali/patches/musl/0006-detached-thread-frees-its-stack.patch +34 -0
- package/toolchain/wali/patches/musl/0007-wordexp-without-fork.patch +62 -0
- package/toolchain/wali/patches/musl/0008-progname-from-argv.patch +34 -0
- package/toolchain/wali/patches/musl/0009-no-basename-in-string-h.patch +15 -0
- package/toolchain/wali/patches/musl/0010-ssize-max-is-pointer-sized.patch +15 -0
- package/toolchain/wali/patches/musl/0011-startup-without-malloc.patch +85 -0
- package/toolchain/wali/patches/musl/0012-floatscan-fixes-from-musl.patch +39 -0
- package/toolchain/wali/patches/musl/0013-strptime-from-musl-with-glibc-s-and-z.patch +169 -0
- package/toolchain/wali/patches/musl/0014-wordexp-fixes-from-musl.patch +43 -0
- package/toolchain/wali/patches/musl/0015-long-double-is-ieee-quad.patch +202 -0
- package/toolchain/wali/patches/musl/0016-wordexp-nocmd-and-undef.patch +285 -0
- package/toolchain/wali/rust.sh +116 -0
- package/toolchain/wali/signal-checks.mjs +373 -0
- package/toolchain/wali-version +13 -0
package/README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @ecmaos-apps/make-src
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Corresponding Source of `@ecmaos-apps/make` 4.4.1-ecmaos.1 (GPL-3.0-or-later): everything needed to build the `make.wasm` it ships.
|
|
4
|
+
|
|
5
|
+
- `sources/` - the upstream archives, each checked against the sha256 in `package.json` (`ecmaos.archives`)
|
|
6
|
+
- `build/` - the scripts that turn them into the program (our changes to the source are in them)
|
|
7
|
+
- `toolchain/` - the pins of the compiler and libc the program is built with, and the patches to WALI's musl and compiler-rt (`wali/`)
|
|
8
|
+
|
|
9
|
+
Installed with `apt source make` or `install @ecmaos-apps/make-src`.
|
package/build/build.sh
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
3
|
+
# Rebuilds programs/make.wasm: GNU make 4.4.1 for ecmaOS, on WALI's musl (`utils/check-wali.sh`), run by /bin/wali.
|
|
4
|
+
#
|
|
5
|
+
# The result is committed, so only run this to change it. Built from the source unmodified. There is no fork: make
|
|
6
|
+
# starts its jobs with posix_spawn, and waits for them with waitpid and SIGCHLD, so `-j` runs jobs side by side. Its
|
|
7
|
+
# main, which takes the environment as well, is called from one that passes it (see below).
|
|
8
|
+
# configure cannot run its test of posix_spawn here (the program it builds does not run on this machine), so it is told
|
|
9
|
+
# the answer: a program that does not exist fails in the call, with ENOENT. Without pselect (`ac_cv_func_pselect=no`)
|
|
10
|
+
# make waits for a jobserver token with a read that its SIGCHLD handler interrupts. There are no fifos, so the
|
|
11
|
+
# jobserver is a pipe (`JOBSERVER_USE_FIFO=0`), as before make 4.4.
|
|
12
|
+
set -euo pipefail
|
|
13
|
+
source "$(dirname "$0")/../../../../utils/check-wali.sh"
|
|
14
|
+
|
|
15
|
+
HERE=$(cd "$(dirname "$0")" && pwd)
|
|
16
|
+
SOURCES="$HERE/../../scripts/sources.mjs"
|
|
17
|
+
VERSION=$(node "$SOURCES" version make)
|
|
18
|
+
ARCHIVE=$(node "$SOURCES" fetch make)
|
|
19
|
+
OUT=$HERE/../../programs/make.wasm
|
|
20
|
+
WORK=$(mktemp -d)
|
|
21
|
+
trap 'rm -rf "$WORK"' EXIT
|
|
22
|
+
|
|
23
|
+
cd "$WORK"
|
|
24
|
+
tar xzf "$ARCHIVE"
|
|
25
|
+
cd "make-$VERSION"
|
|
26
|
+
|
|
27
|
+
CC="$WALI_CC" AR="$WALI_AR" RANLIB="$WALI_RANLIB" CFLAGS="-O2 -DJOBSERVER_USE_FIFO=0" \
|
|
28
|
+
ac_cv_func_pselect=no make_cv_synchronous_posix_spawn=yes ./configure --host=wasm32-unknown-linux-musl --without-guile \
|
|
29
|
+
--disable-nls --disable-load --disable-dependency-tracking > configure.log 2>&1 || { tail -30 configure.log >&2; exit 1; }
|
|
30
|
+
grep -q '^#define USE_POSIX_SPAWN 1' src/config.h || { echo "make: configure did not find posix_spawn" >&2; exit 1; }
|
|
31
|
+
# make's main takes the environment as a third argument, which WALI's start does not pass: it calls a main of argc and
|
|
32
|
+
# argv (which clang names __main_argc_argv on wasm). So main.c is compiled with its main renamed, and a main that
|
|
33
|
+
# passes environ calls it.
|
|
34
|
+
grep -q '^main (int argc, char \*\*argv, char \*\*envp)$' src/main.c || { echo "make's main changed: it no longer takes envp" >&2; exit 1; }
|
|
35
|
+
make src/main.o CFLAGS="-O2 -DJOBSERVER_USE_FIFO=0 -Dmain=make_main" > make.log 2>&1 || { tail -30 make.log >&2; exit 1; }
|
|
36
|
+
cat > src/wali-main.c <<'C'
|
|
37
|
+
extern char **environ;
|
|
38
|
+
int make_main(int argc, char **argv, char **envp);
|
|
39
|
+
int main(int argc, char **argv) { return make_main(argc, argv, environ); }
|
|
40
|
+
C
|
|
41
|
+
"$WALI_CC" -O2 -c src/wali-main.c -o src/wali-main.o
|
|
42
|
+
make -j"$(nproc)" LIBS="src/wali-main.o $(sed -n 's/^LIBS = //p' Makefile)" >> make.log 2>&1 || { tail -30 make.log >&2; exit 1; }
|
|
43
|
+
cp make "$OUT"
|
|
44
|
+
ls -l "$OUT"
|
|
45
|
+
echo "built with $WALI_TOOLCHAIN"
|
package/package.json
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecmaos-apps/make-src",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "4.4.1-ecmaos.1",
|
|
4
|
+
"description": "The source of @ecmaos-apps/make: GNU make, with parallel jobs (-j)",
|
|
5
|
+
"license": "GPL-3.0-or-later",
|
|
6
|
+
"homepage": "https://www.gnu.org/software/make/",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/ecmaos/ecmaos",
|
|
10
|
+
"directory": "core/utils-copyleft"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ecmaos",
|
|
14
|
+
"source",
|
|
15
|
+
"make"
|
|
16
|
+
],
|
|
17
|
+
"files": [
|
|
18
|
+
"sources",
|
|
19
|
+
"build",
|
|
20
|
+
"toolchain",
|
|
21
|
+
"share",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"ecmaos": {
|
|
28
|
+
"sourceOf": "@ecmaos-apps/make@4.4.1-ecmaos.1",
|
|
29
|
+
"archives": {
|
|
30
|
+
"make-4.4.1.tar.gz": {
|
|
31
|
+
"sha256": "dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3",
|
|
32
|
+
"url": "https://ftpmirror.gnu.org/make/make-4.4.1.tar.gz",
|
|
33
|
+
"license": "GPL-3.0-or-later"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|