Skip to content

Commit 9567cdb

Browse files
authored
Update flag extraction in copy-libs.sh
1 parent 73adaad commit 9567cdb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tools/copy-libs.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,12 @@ done
322322

323323
mkdir -p "$AR_SDK"
324324

325-
# Extract flags with "-m"
325+
# Keep only -march, -mabi and -mlongcalls flags for Assembler
326326
PIO_AS_FLAGS=$(
327-
{
328-
echo "$PIO_CXX_FLAGS" | grep -o '\-m[^[:space:]]*'
329-
echo "$PIO_CC_FLAGS" | grep -o '\-m[^[:space:]]*'
330-
} | awk '!seen[$0]++' | tr '\n' ' '
327+
{Öl
328+
echo "$PIO_CXX_FLAGS" | grep -oE '\-march=[^[:space:]]*|\-mabi=[^[:space:]]*|\-mlongcalls'
329+
echo "$PIO_C_FLAGS" | grep -oE '\-march=[^[:space:]]*|\-mabi=[^[:space:]]*|\-mlongcalls'
330+
} | awk '!seen[$0]++' | paste -sd ' '
331331
)
332332

333333
# start generation of pioarduino-build.py

0 commit comments

Comments
 (0)