1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

Fix C builds (#8795)

Missing stdbool.h for 'bool' in features .h, at least one user is arduinoWebSockets
Adds minimal headers sanity-check script to verify that C builds work as expected

Also noticed and removed default argument from crc32() in internal .h that may be used in .c
(not sure how extern C & default worked simultaniously, but at least in our .cpp Gcc somehow figured out it is a no overload solution)
This commit is contained in:
Max Prokhorov
2023-01-11 03:48:30 +03:00
committed by GitHub
parent 7e2da8b25b
commit 840ef78237
6 changed files with 71 additions and 9 deletions

44
tests/sanity_check.sh Executable file
View File

@ -0,0 +1,44 @@
#!/usr/bin/env bash
root=$(git rev-parse --show-toplevel)
source "$root/tests/common.sh"
pushd "$root"/tools
python3 get.py -q
popd
pushd "$cache_dir"
gcc="$root/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc"\
" -I$root/cores/esp8266"\
" -I$root/tools/sdk/include"\
" -I$root/variants/generic"\
" -I$root/tools/sdk/libc/xtensa-lx106-elf"
$gcc --verbose
set -v -x
cat << EOF > arduino.c
#include <Arduino.h>
EOF
$gcc -c arduino.c
cat << EOF > coredecls.c
#include <coredecls.h>
EOF
$gcc -c coredecls.c
cat << EOF > features.c
#include <core_esp8266_features.h>
EOF
$gcc -c features.c
cat << EOF > sdk.c
#include <version.h>
EOF
$gcc -c sdk.c