From 5b61c79cf859bec08b75d6dd733610924d2f8d1e Mon Sep 17 00:00:00 2001 From: Roman Artiukhin Date: Sun, 9 Jun 2024 11:26:04 +0300 Subject: simulator: debugging: Disable -Os compiler optimizations when DEBUG is defined Otherwise, breakpoints may not correspond with the source code Change-Id: I0f8d4f578bde52c0219923d8be28e01c66c8dfbc --- tools/configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/configure b/tools/configure index bf96bf0058..2016dd4dfb 100755 --- a/tools/configure +++ b/tools/configure @@ -260,7 +260,11 @@ simcc () { app_type=$1 winbuild="" - GCCOPTS=`echo $CCOPTS | sed -e s/-ffreestanding// -e s/-nostdlib// -e s/-Wundef//` + GCCOPTS=`echo $CCOPTS | sed -e s/\ -ffreestanding// -e s/\ -nostdlib// -e s/\ -Wundef//` + + if [ "$debug" ]; then + GCCOPTS=`echo $GCCOPTS | sed -e s/\ -Os//` + fi GCCOPTS="$GCCOPTS -fno-builtin -g" -- cgit v1.2.3