-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use musllibc wasm32 headers instead of those of my machine.
- Loading branch information
diekmann
committed
Mar 6, 2021
1 parent
7da9678
commit d37ac2d
Showing
7 changed files
with
117 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
*.a | ||
*.so | ||
*.so.1 | ||
config.mak | ||
lib/musl-gcc.specs | ||
/obj/ | ||
/built_inc/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,6 +224,7 @@ endif | |
|
||
clean: | ||
rm -rf obj lib | ||
rm -rf built_inc | ||
|
||
distclean: clean | ||
rm -f config.mak | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# This version of config.mak was generated by: | ||
# AR=llvm-ar-10 CC=clang CFLAGS="-m32 --target=wasm32" ./configure --target=wasm32 | ||
# Any changes made here will be lost if configure is re-run | ||
AR = llvm-ar-10 | ||
RANLIB = llvm-ranlib-10 #$(CROSS_COMPILE)ranlib | ||
ARCH = wasm32 | ||
SUBARCH = | ||
ASMSUBARCH = | ||
srcdir = . | ||
prefix = ./built_inc | ||
exec_prefix = $(prefix) | ||
bindir = $(exec_prefix)/bin | ||
libdir = $(prefix)/lib | ||
includedir = $(prefix)/include | ||
syslibdir = /lib | ||
CC = clang | ||
CFLAGS = -m32 --target=wasm32 | ||
CFLAGS_AUTO = -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections -w -Wno-pointer-to-int-cast -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -Werror=int-conversion -Werror=incompatible-pointer-types -Qunused-arguments -Waddress -Warray-bounds -Wchar-subscripts -Wduplicate-decl-specifier -Winit-self -Wreturn-type -Wsequence-point -Wstrict-aliasing -Wunused-function -Wunused-label -Wunused-variable | ||
CFLAGS_C99FSE = -std=c99 -nostdinc -ffreestanding -frounding-math -Wa,--noexecstack | ||
CFLAGS_MEMOPS = | ||
CFLAGS_NOSSP = -fno-stack-protector | ||
CPPFLAGS = | ||
LDFLAGS = | ||
LDFLAGS_AUTO = -Wl,--sort-section,alignment -Wl,--sort-common -Wl,--gc-sections -Wl,--hash-style=both -Wl,--no-undefined -Wl,--exclude-libs=ALL -Wl,--dynamic-list=./dynamic.list | ||
CROSS_COMPILE = wasm32- | ||
LIBCC = -lgcc -lgcc_eh | ||
OPTIMIZE_GLOBS = internal/*.c malloc/*.c string/*.c | ||
ALL_TOOLS = obj/musl-clang obj/ld.musl-clang | ||
TOOL_LIBS = | ||
ADD_CFI = no | ||
MALLOC_DIR = mallocng | ||
WRAPCC_CLANG = $(CC) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/sh | ||
# | ||
# This is an actually-safe install command which installs the new | ||
# file atomically in the new location, rather than overwriting | ||
# existing files. | ||
# | ||
|
||
usage() { | ||
printf "usage: %s [-D] [-l] [-m mode] src dest\n" "$0" 1>&2 | ||
exit 1 | ||
} | ||
|
||
mkdirp= | ||
symlink= | ||
mode=755 | ||
|
||
while getopts Dlm: name ; do | ||
case "$name" in | ||
D) mkdirp=yes ;; | ||
l) symlink=yes ;; | ||
m) mode=$OPTARG ;; | ||
?) usage ;; | ||
esac | ||
done | ||
shift $(($OPTIND - 1)) | ||
|
||
test "$#" -eq 2 || usage | ||
src=$1 | ||
dst=$2 | ||
tmp="$dst.tmp.$$" | ||
|
||
case "$dst" in | ||
*/) printf "%s: %s ends in /\n", "$0" "$dst" 1>&2 ; exit 1 ;; | ||
esac | ||
|
||
set -C | ||
set -e | ||
|
||
if test "$mkdirp" ; then | ||
umask 022 | ||
case "$2" in | ||
*/*) mkdir -p "${dst%/*}" ;; | ||
esac | ||
fi | ||
|
||
trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP | ||
|
||
umask 077 | ||
|
||
if test "$symlink" ; then | ||
ln -s "$1" "$tmp" | ||
else | ||
cat < "$1" > "$tmp" | ||
chmod "$mode" "$tmp" | ||
fi | ||
|
||
mv -f "$tmp" "$2" | ||
test -d "$2" && { | ||
rm -f "$2/$tmp" | ||
printf "%s: %s is a directory\n" "$0" "$dst" 1>&2 | ||
exit 1 | ||
} | ||
|
||
exit 0 |