From e289af684f202e7a90a651305fb417ba0d46d21c Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Wed, 7 Dec 2011 13:56:04 -0600 Subject: [PATCH] configure/linux: Move -g option to OPT_CFLAGS_YES We were adding it to OP_SYS_CFLAGS but if HOST_OPT=NO you then get two -g options on the gcc command line. --- configure/os/CONFIG_SITE.Common.linux-x86 | 6 +++++- configure/os/CONFIG_SITE.Common.linux-x86_64 | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/configure/os/CONFIG_SITE.Common.linux-x86 b/configure/os/CONFIG_SITE.Common.linux-x86 index 19a5794c9..1be38cb78 100644 --- a/configure/os/CONFIG_SITE.Common.linux-x86 +++ b/configure/os/CONFIG_SITE.Common.linux-x86 @@ -33,4 +33,8 @@ COMMANDLINE_LIBRARY = READLINE #COMMANDLINE_LIBRARY = READLINE_CURSES -OP_SYS_CFLAGS += -g +# 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 diff --git a/configure/os/CONFIG_SITE.Common.linux-x86_64 b/configure/os/CONFIG_SITE.Common.linux-x86_64 index 9d3bbd132..e48241ab0 100644 --- a/configure/os/CONFIG_SITE.Common.linux-x86_64 +++ b/configure/os/CONFIG_SITE.Common.linux-x86_64 @@ -33,4 +33,8 @@ COMMANDLINE_LIBRARY = READLINE #COMMANDLINE_LIBRARY = READLINE_CURSES -OP_SYS_CFLAGS += -g +# 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