]> git.proxmox.com Git - wasi-libc.git/commitdiff
Fix -std=gnu17 when generating predefined_macros.txt (#187)
authorSam Clegg <sbc@chromium.org>
Wed, 18 Mar 2020 11:26:57 +0000 (07:26 -0400)
committerGitHub <noreply@github.com>
Wed, 18 Mar 2020 11:26:57 +0000 (04:26 -0700)
* 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

Makefile
expected/wasm32-wasi/predefined-macros.txt

index 4fa5fcb96b55c18165632b924c9b71d0c2631caf..f723e55b8c7e2360df5a8a74d0ec139fb5538352 100644 (file)
--- 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__ \
index 9510bf2d3e8f3a82e4d0d038dfbf2f5aa7329545..48f886f1c7aaf574b2ffbe7400c8930c78dcd888 100644 (file)
 #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