]> git.proxmox.com Git - wasi-libc.git/commitdiff
Disable stack protector, wasi-libc doesn't support it yet
authorXimin Luo <infinity0@debian.org>
Tue, 7 Jan 2020 15:45:14 +0000 (15:45 +0000)
committerXimin Luo <infinity0@debian.org>
Tue, 7 Jan 2020 15:45:14 +0000 (15:45 +0000)
debian/changelog
debian/patches/debian-flags.patch
debian/patches/dont-rebuild-install.patch
debian/rules

index 1db12222fa6687b9c74648fa9d8d49345330536c..f70d880f2329b70ea3b8ce2a969274dc5cb1dd7a 100644 (file)
@@ -1,6 +1,6 @@
 wasi-libc (0.0~git20191220.a280fea-2) UNRELEASED; urgency=medium
 
-  * Include __stack_chk_fail and __stack_chk_guard.
+  * Disable stack protector, wasi-libc doesn't support it yet.
 
  -- Ximin Luo <infinity0@debian.org>  Tue, 07 Jan 2020 14:34:45 +0000
 
index 3334275fcf2b45c28ab45bd634234413266e5d05..41d2b15cd3f58aa1d1573d5fc6391724e1b23b65 100644 (file)
@@ -8,15 +8,7 @@
  #define ND_NA_FLAG_OVERRIDE 0x00000020
  #define ND_NA_FLAG_ROUTER 0x00000080
  #define ND_NA_FLAG_SOLICITED 0x00000040
-@@ -2765,6 +2764,7 @@
- #define __SIZE_MAX__ 4294967295UL
- #define __SIZE_TYPE__ long unsigned int
- #define __SIZE_WIDTH__ 32
-+#define __SSP_STRONG__ 2
- #define __STDARG_H 
- #define __STDC_HOSTED__ 1
- #define __STDC_IEC_559__ 1
-@@ -3173,7 +3173,7 @@
+@@ -3173,7 +3172,7 @@
  #define and_eq &=
  #define asin(x) __tg_real_complex(asin, (x))
  #define asinh(x) __tg_real_complex(asinh, (x))
  #define atan(x) __tg_real_complex(atan, (x))
  #define atan2(x,y) __tg_real_2(atan2, (x), (y))
  #define atanh(x) __tg_real_complex(atanh, (x))
---- a/Makefile
-+++ b/Makefile
-@@ -125,6 +125,7 @@
-     $(LIBC_TOP_HALF_MUSL_SRC_DIR)/env/putenv.c \
-     $(LIBC_TOP_HALF_MUSL_SRC_DIR)/env/setenv.c \
-     $(LIBC_TOP_HALF_MUSL_SRC_DIR)/env/unsetenv.c \
-+    $(LIBC_TOP_HALF_MUSL_SRC_DIR)/env/__stack_chk_fail.c \
-     $(LIBC_TOP_HALF_MUSL_SRC_DIR)/unistd/posix_close.c \
-     $(filter-out %/procfdname.c %/syscall.c %/syscall_ret.c %/vdso.c %/version.c, \
-                  $(wildcard $(LIBC_TOP_HALF_MUSL_SRC_DIR)/internal/*.c)) \
index 859b3b135ce0d1b92ef822a2e58bb28c7fd3e1c7..40be564c2db555466665d6c9909629f5b26d9324 100644 (file)
@@ -41,6 +41,6 @@
 -.PHONY: default startup_files libc finish check install include_dirs
 +clean:
 +      rm -f include_dirs startup_files libc finish
-+      rm -rf build
++      rm -rf build sysroot
 +
 +.PHONY: default check install
index acb5379a52e24ae693fc821feabcc39ad6f92306..0083492dfd4ea33a9b0008dd178278e4c1112c33 100755 (executable)
@@ -8,7 +8,10 @@ include /usr/share/dpkg/buildflags.mk
 export WASM_NM = llvm-nm-9
 export WASM_AR = llvm-ar-9
 export WASM_CC = clang-9
-export WASM_CFLAGS = $(CFLAGS) $(LDFLAGS)
+
+# stack protector not yet supported, see
+# https://github.com/CraneStation/wasi-libc/issues/157
+export WASM_CFLAGS = $(CFLAGS) $(LDFLAGS) -fno-stack-protector
 
 %:
        dh $@