Skip to content

Commit 7788282

Browse files
authored
Use -std=gnu++2a instead of -std=gnu++2b
1 parent 9f40c98 commit 7788282

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/copy-libs.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ LD_SCRIPT_DIRS=""
7474

7575
PIO_CC_FLAGS="-flto=auto "
7676
PIO_C_FLAGS="-flto=auto "
77-
PIO_CXX_FLAGS="-flto=auto "
77+
PIO_CXX_FLAGS="-flto=auto -std=gnu++2a "
7878
PIO_AS_FLAGS=""
7979
PIO_LD_FLAGS="-flto "
8080
PIO_LD_FUNCS=""
@@ -126,7 +126,9 @@ for item in "${@:2:${#@}-5}"; do
126126
DEFINES+="$item "
127127
fi
128128
elif [ "$prefix" = "-O" ]; then
129-
PIO_CC_FLAGS+="$item "
129+
if [[ "$item" != "-std=gnu++2b" ]]; then
130+
PIO_CC_FLAGS+="$item "
131+
fi
130132
elif [[ "$item" != "-Wall" && "$item" != "-Werror=all" && "$item" != "-Wextra" ]]; then
131133
if [[ "${item:0:23}" != "-mfix-esp32-psram-cache" && "${item:0:18}" != "-fmacro-prefix-map" && "${item:0:20}" != "-fdiagnostics-color=" && "${item:0:19}" != "-fdebug-prefix-map=" && "${item:0:8}" != "-fno-lto" ]]; then
132134
C_FLAGS+="$item "

0 commit comments

Comments
 (0)