]> git.proxmox.com Git - wasi-libc.git/commitdiff
build: enable stack protection
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 8 Sep 2023 07:38:49 +0000 (09:38 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Fri, 8 Sep 2023 08:05:40 +0000 (10:05 +0200)
supported now, at least without the control flow part.

Signed-off-by: Fabian Grünbichler <debian@fabian.gruenbichler.email>
debian/patches/debian-flags.patch
debian/rules

index 3f7689d47548cbf60db217691cc84f923590374f..50578fe44c4d62649dfb2c6e62137cd27e832bee 100644 (file)
@@ -10,7 +10,15 @@ Index: wasi-libc/expected/wasm32-wasi-threads/predefined-macros.txt
  #define ND_NA_FLAG_OVERRIDE 0x00000020
  #define ND_NA_FLAG_ROUTER 0x00000080
  #define ND_NA_FLAG_SOLICITED 0x00000040
-@@ -3112,7 +3111,7 @@
+@@ -2728,6 +2727,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
+@@ -3112,7 +3112,7 @@
  #define and_eq &=
  #define asin(x) __tg_real_complex(asin, (x))
  #define asinh(x) __tg_real_complex(asinh, (x))
@@ -31,7 +39,15 @@ Index: wasi-libc/expected/wasm32-wasi/predefined-macros.txt
  #define ND_NA_FLAG_OVERRIDE 0x00000020
  #define ND_NA_FLAG_ROUTER 0x00000080
  #define ND_NA_FLAG_SOLICITED 0x00000040
-@@ -3073,7 +3072,7 @@
+@@ -2691,6 +2690,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
+@@ -3073,7 +3073,7 @@
  #define and_eq &=
  #define asin(x) __tg_real_complex(asin, (x))
  #define asinh(x) __tg_real_complex(asinh, (x))
index dca64233b580bd5f534f34611031c92269a075a8..66b53d104df8954cac24369589cc023e575f9c3f 100755 (executable)
@@ -9,9 +9,7 @@ export NM = llvm-nm-14
 export AR = llvm-ar-14
 export CC = clang-14
 
-# stack protector not yet supported, see
-# https://github.com/CraneStation/wasi-libc/issues/157
-export EXTRA_CFLAGS = $(CFLAGS) $(LDFLAGS) -fno-stack-protector -fcf-protection=none
+export EXTRA_CFLAGS = $(CFLAGS) $(LDFLAGS) -fcf-protection=none
 
 %:
        dh $@