File 2531-erts-Let-debug-build-use-Og-instead-of-O0.patch of Package erlang

From f148afc852d249e2fc2ae79e629bc84784aadb95 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Wed, 16 Oct 2024 20:18:18 +0200
Subject: [PATCH 1/2] erts: Let debug build use -Og instead of -O0

to improve performance with hopefully unreduced debugability.
---
 erts/configure    | 2 +-
 erts/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/erts/configure b/erts/configure
index 94a71ac4d5..3f9ccacf33 100755
--- a/erts/configure
+++ b/erts/configure
@@ -27000,7 +27000,7 @@ if test "X $CFLAGS" = "X$no_opt_CFLAGS"; then
 fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 printf "%s\n" "yes" >&6; }
-DEBUG_CFLAGS="-g -O0 $no_opt_CFLAGS"
+DEBUG_CFLAGS="-g -Og $no_opt_CFLAGS"
 
 
 no_opt_CXXFLAGS=$(echo " $CXXFLAGS" | sed 's/ -O[^ ]*/ /g')
diff --git a/erts/configure.ac b/erts/configure.ac
index 8930d1a203..e5af7d580c 100644
--- a/erts/configure.ac
+++ b/erts/configure.ac
@@ -3670,7 +3670,7 @@ if test "X $CFLAGS" = "X$no_opt_CFLAGS"; then
 	If you want to build ERTS without any optimization, pass -O0 to CFLAGS.])
 fi
 AC_MSG_RESULT([yes])
-DEBUG_CFLAGS="-g -O0 $no_opt_CFLAGS"
+DEBUG_CFLAGS="-g -Og $no_opt_CFLAGS"
 AC_SUBST(DEBUG_CFLAGS)
 
 no_opt_CXXFLAGS=$(echo " $CXXFLAGS" | sed 's/ -O[[^ ]]*/ /g')
-- 
2.43.0

openSUSE Build Service is sponsored by