diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-06-19 08:42:19 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-06-19 08:49:02 -0400 |
commit | 9beca004b9a6712343269a0d87fc3c3e905d7020 (patch) | |
tree | db79d8f16640156d146638c22b73afc9d33b152f | |
parent | b3e6b122662a696494a2c325c69d33b3856167ad (diff) | |
download | rockbox-9beca004b9a6712343269a0d87fc3c3e905d7020.tar.gz rockbox-9beca004b9a6712343269a0d87fc3c3e905d7020.zip |
simulator: Hopefully fix red introduced in 5b61c79cf
This problem only happened with GCC7 (and older?) simulator builds, and
was introduced by an incorrect test that always stripped our default
optimization (-Os) in simulator builds.
The fix is to correct the test to only strip -Os if the user explicitly
enables a debug build.
Also, use -Og instead of (implicit) -O0, as per GCC recommendations.
Change-Id: I61091b3cdf5323504961c0bb2d80aa65049eb8fb
-rwxr-xr-x | tools/configure | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/configure b/tools/configure index 2016dd4dfb..7e9a6e4222 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -262,8 +262,8 @@ simcc () { | |||
262 | winbuild="" | 262 | winbuild="" |
263 | GCCOPTS=`echo $CCOPTS | sed -e s/\ -ffreestanding// -e s/\ -nostdlib// -e s/\ -Wundef//` | 263 | GCCOPTS=`echo $CCOPTS | sed -e s/\ -ffreestanding// -e s/\ -nostdlib// -e s/\ -Wundef//` |
264 | 264 | ||
265 | if [ "$debug" ]; then | 265 | if [ "yes" = "$use_debug" ]; then |
266 | GCCOPTS=`echo $GCCOPTS | sed -e s/\ -Os//` | 266 | GCCOPTS=`echo $GCCOPTS | sed -e s/\ -Os/-Og/` |
267 | fi | 267 | fi |
268 | 268 | ||
269 | GCCOPTS="$GCCOPTS -fno-builtin -g" | 269 | GCCOPTS="$GCCOPTS -fno-builtin -g" |