From: Sam Clegg Date: Wed, 18 Mar 2020 11:26:57 +0000 (-0400) Subject: Fix -std=gnu17 when generating predefined_macros.txt (#187) X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=38b930a26b60558522bc34adc7621fff17925b4a;p=wasi-libc.git Fix -std=gnu17 when generating predefined_macros.txt (#187) * Fix -std=gnu11 when generating predefined_macros.txt The default recently changed in upstream clang: https://reviews.llvm.org/D75383 We want to be immune to such things when generating this list so that we can build wasi-libc with any recent clang version. * 17 --- diff --git a/Makefile b/Makefile index 4fa5fcb..f723e55 100644 --- a/Makefile +++ b/Makefile @@ -480,6 +480,7 @@ finish: startup_files libc # TODO: Filter out __FLT16_* for now, as not all versions of clang have these. "$(WASM_CC)" $(WASM_CFLAGS) "$(SYSROOT_SHARE)/include-all.c" \ -isystem $(SYSROOT_INC) \ + -std=gnu17 \ -E -dM -Wno-\#warnings \ -D_ALL_SOURCE \ -U__llvm__ \ diff --git a/expected/wasm32-wasi/predefined-macros.txt b/expected/wasm32-wasi/predefined-macros.txt index 9510bf2..48f886f 100644 --- a/expected/wasm32-wasi/predefined-macros.txt +++ b/expected/wasm32-wasi/predefined-macros.txt @@ -2774,7 +2774,7 @@ #define __STDC_ISO_10646__ 201206L #define __STDC_UTF_16__ 1 #define __STDC_UTF_32__ 1 -#define __STDC_VERSION__ 201112L +#define __STDC_VERSION__ 201710L #define __STDC__ 1 #define __STDDEF_H #define __UAPI_DEF_IN6_ADDR 0