Skip to content

Commit fd679f5

Browse files
committed
cppflags, fix libc override usage (release vs. dev)
1 parent a1b20ca commit fd679f5

File tree

1 file changed

+32
-17
lines changed

1 file changed

+32
-17
lines changed

tests/sanity_check.sh

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,46 @@ popd
1010

1111
pushd "$cache_dir"
1212

13-
cflags=$"
14-
-Os
15-
-g
16-
-free
17-
-fipa-pta
18-
-Werror=return-type
19-
-Wpointer-arith
20-
-fno-inline-functions
21-
-mtext-section-literals
22-
-mlongcalls
23-
-falign-functions=4
24-
-ffunction-sections
25-
-fdata-sections"
26-
gcc=$"$root/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc
27-
$cflags
13+
cppflags=$"\
14+
-DARDUINO \
15+
-DARDUINO_ESP8266_GENERIC \
16+
-DF_CPU=80000000L \
17+
-DNONOSDK305=1 \
18+
-DLWIP_OPEN_SRC \
19+
-DTCP_MSS=1460 \
20+
-DLWIP_IPV4=1 \
21+
-DLWIP_IPV6=1 \
22+
-DLWIP_FEATURES=1 \
2823
-I$root/cores/esp8266 \
24+
-I$root/tools/sdk/lwip2/include \
2925
-I$root/tools/sdk/include \
3026
-I$root/variants/generic \
3127
-I$root/tools/sdk/libc/xtensa-lx106-elf"
28+
cflags=$"\
29+
-Os \
30+
-g \
31+
-free \
32+
-fipa-pta \
33+
-Werror=return-type \
34+
-Wpointer-arith \
35+
-fno-inline-functions \
36+
-mtext-section-literals \
37+
-mlongcalls \
38+
-falign-functions=4 \
39+
-ffunction-sections \
40+
-fdata-sections"
41+
gcc=$"$root/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc
42+
$cppflags
43+
$cflags"
3244

3345
$gcc --verbose
3446

3547
set -v -x
3648

49+
cp $root/cores/esp8266/libc_replacements.cpp ./
50+
51+
$gcc -c libc_replacements.cpp
52+
3753
cat << EOF > arduino.c
3854
#include <Arduino.h>
3955
EOF
@@ -99,15 +115,14 @@ step_summary \
99115
$preprocess \
100116
"local.eagle.flash.ld.h" \
101117
-o "local.eagle.flash.ld"
102-
cat local.eagle.flash.ld
103118
step_summary \
104119
"Default local.eagle.flash.ld" \
105120
local.eagle.flash.ld
106121

107122
libs=$"-lhal -lphy -lpp -lnet80211 -llwip6-1460-feat -lwpa \
108123
-lcrypto -lmain -lwps -lbearssl -lespnow -lsmartconfig \
109124
-lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc"
110-
objects="arduino.o coredecls.o features.o sdk.o iostream.o"
125+
objects="libc_replacements.o arduino.o coredecls.o features.o sdk.o iostream.o"
111126

112127
link=$"$root/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc
113128
-nostdlib

0 commit comments

Comments
 (0)