From 565ccae0b5ec434e282aceb41830cb3c5f5b989b Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Tue, 15 Nov 2022 14:32:30 +0100 Subject: [PATCH] fix -g flag usage -- modifying OPT_CFLAGS_YES in CONFIG_SITE.* does not work --- configure/CONFIG.gnuCommon | 8 ++++++-- configure/os/CONFIG_SITE.linux-x86.linux-x86 | 7 ------- configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 | 7 ------- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/configure/CONFIG.gnuCommon b/configure/CONFIG.gnuCommon index d3a9a41cf..0a7820a1c 100644 --- a/configure/CONFIG.gnuCommon +++ b/configure/CONFIG.gnuCommon @@ -33,7 +33,11 @@ CODE_CFLAGS = $(PROF_CFLAGS_$(PROFILE)) $(GPROF_CFLAGS_$(GPROF)) CODE_CFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN)) WARN_CFLAGS_YES = -Wall -Werror-implicit-function-declaration WARN_CFLAGS_NO = -w -OPT_CFLAGS_YES = -O3 +# It makes sense to include debugging symbols even in optimized builds +# in case you want to attach gdb to the process or examine a core-dump. +# This does cost disk space, but not memory as debug symbols are not +# loaded into RAM when the binary is loaded. +OPT_CFLAGS_YES = -O3 -g OPT_CFLAGS_NO = -g PROF_CXXFLAGS_YES = -p @@ -42,7 +46,7 @@ CODE_CXXFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF)) CODE_CXXFLAGS += $(ASAN_FLAGS_$(ENABLE_ASAN)) WARN_CXXFLAGS_YES = -Wall WARN_CXXFLAGS_NO = -w -OPT_CXXFLAGS_YES = -O3 +OPT_CXXFLAGS_YES = -O3 -g OPT_CXXFLAGS_NO = -g CODE_LDFLAGS = $(PROF_CXXFLAGS_$(PROFILE)) $(GPROF_CXXFLAGS_$(GPROF)) diff --git a/configure/os/CONFIG_SITE.linux-x86.linux-x86 b/configure/os/CONFIG_SITE.linux-x86.linux-x86 index 5b2fa7c65..64810a835 100644 --- a/configure/os/CONFIG_SITE.linux-x86.linux-x86 +++ b/configure/os/CONFIG_SITE.linux-x86.linux-x86 @@ -3,13 +3,6 @@ # Site specific definitions for linux-x86 host - linux-x86 target builds #------------------------------------------------------- -# It makes sense to include debugging symbols even in optimized builds -# in case you want to attach gdb to the process or examine a core-dump. -# This does cost disk space, but not memory as debug symbols are not -# loaded into RAM when the binary is loaded. -OPT_CFLAGS_YES += -g -OPT_CXXFLAGS_YES += -g - # Uncomment the followings lines to build with CLANG instead of GCC. # #GNU = NO diff --git a/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 b/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 index 9178afd43..2f538151a 100644 --- a/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 +++ b/configure/os/CONFIG_SITE.linux-x86_64.linux-x86_64 @@ -3,13 +3,6 @@ # Site specific definitions for linux-x86_64 host - linux-x86_64 target builds #------------------------------------------------------- -# It makes sense to include debugging symbols even in optimized builds -# in case you want to attach gdb to the process or examine a core-dump. -# This does cost disk space, but not memory as debug symbols are not -# loaded into RAM when the binary is loaded. -OPT_CFLAGS_YES += -g -OPT_CXXFLAGS_YES += -g - # Uncomment the followings lines to build with CLANG instead of GCC. # #GNU = NO