1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-25 20:02:37 +03:00
esp8266/tests/sanity_check.sh
Max Prokhorov 840ef78237
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)
2023-01-11 03:48:30 +03:00

45 lines
657 B
Bash
Executable File

#!/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