configure: Propagate debug build settings also to plain applications
PATCH 1/1 configure: Propagate debug build settings also to plain applications
From: Jan Kiszka <[email protected]>
Allows symbolic debugging also of those apps.
Signed-off-by Jan Kiszka <[email protected]>
--- configure.ac | 12 +++++++----- testsuite/xeno-test/Makefile.am | 3 ++- utils/chkkconf/Makefile.am | 1 + utils/net/Makefile.am | 4 +++- utils/slackspot/Makefile.am | 1 + 5 files changed, 14 insertions(+), 7 deletions(-)
configure.ac +7 -5
@@ -729,18 +729,19 @@ XENO_USER_APP_CFLAGS="$CFLAGS $XENO_USER_APP_CFLAGS" XENO_USER_APP_LDFLAGS="$LDFLAGS $XENO_USER_APP_LDFLAGS" if test x$debug_mode = xpartial; then - XENO_USER_CFLAGS="-g -O2 $XENO_USER_CFLAGS" + XENO_USER_CFLAGS_DEBUG="-g -O2" elif test x$debug_mode = xfull; then - XENO_USER_CFLAGS="-g -O0 $XENO_USER_CFLAGS" + XENO_USER_CFLAGS_DEBUG="-g -O0" elif test x$debug_symbols = xy; then - XENO_USER_CFLAGS="-g -O2 $XENO_USER_CFLAGS" + XENO_USER_CFLAGS_DEBUG="-g -O2" else - XENO_USER_CFLAGS="-O2 $XENO_USER_CFLAGS" + XENO_USER_CFLAGS_DEBUG="-O2" fi if test x$use_assert = x; then - XENO_USER_CFLAGS="-DNDEBUG $XENO_USER_CFLAGS" + XENO_USER_CFLAGS_DEBUG="-DNDEBUG $XENO_USER_CFLAGS_DEBUG" fi +XENU_USER_CFLAGS="$XENO_USER_CFLAGS_DEBUG $XENO_USER_CFLAGS" XENO_USER_CFLAGS_STDLIB="$XENO_USER_CFLAGS" XENO_USER_CFLAGS="$XENO_USER_CFLAGS -I$topdir/include/$rtcore_type"
@@ -1014,6 +1015,7 @@ AC_SUBST(XENO_COBALT_CFLAGS) AC_SUBST(XENO_LIB_LDFLAGS) AC_SUBST(XENO_USER_CFLAGS) AC_SUBST(XENO_USER_CFLAGS_STDLIB) +AC_SUBST(XENO_USER_CFLAGS_DEBUG) AC_SUBST(XENO_USER_LDADD) AC_SUBST(XENO_USER_APP_CFLAGS) AC_SUBST(XENO_USER_APP_LDFLAGS)
testsuite/xeno-test/Makefile.am +2 -1
@@ -5,7 +5,8 @@ test_SCRIPTS = xeno-test-run-wrapper dohell test_PROGRAMS = xeno-test-run bin_SCRIPTS = xeno-test -xeno_test_run_CPPFLAGS = -DTESTDIR=\"$(testdir)\" -D_GNU_SOURCE +xeno_test_run_CPPFLAGS = @XENO_USER_CFLAGS_DEBUG@ \ + -DTESTDIR=\"$(testdir)\" -D_GNU_SOURCE xeno_test_run_LDADD = -lpthread -lrt xeno-test: $(srcdir)/xeno-test.in Makefile
utils/chkkconf/Makefile.am +1 -0
@@ -8,4 +8,5 @@ sbin_PROGRAMS = chkkconf chkkconf_SOURCES = checkconfig.c chkkconf_CPPFLAGS = \ + @XENO_USER_CFLAGS_DEBUG@ \ -DDATADIR=\"$(datadir)\" -D_GNU_SOURCE
utils/net/Makefile.am +3 -1
@@ -2,7 +2,9 @@ nodist_sysconf_DATA = rtnet.conf dist_sysconf_DATA = tdma.conf -AM_CPPFLAGS = -I$(top_srcdir)/kernel/drivers/net/stack/include +AM_CPPFLAGS = \ + @XENO_USER_CFLAGS_DEBUG@ \ + -I$(top_srcdir)/kernel/drivers/net/stack/include sbin_SCRIPTS = rtnet
utils/slackspot/Makefile.am +1 -0
@@ -2,6 +2,7 @@ sbin_PROGRAMS = slackspot AM_CPPFLAGS = \ @XENO_USER_CFLAGS_STDLIB@ \ + @XENO_USER_CFLAGS_DEBUG@ \ -I$(top_srcdir)/include slackspot_SOURCES = slackspot.c
Signature · 1 line
2.51.0
configure.ac XENO_USER_APP_CFLAGS="$CFLAGS $XENO_USER_APP_CFLAGS" · line 742
Quoted 4 lines · Jan Kiszka
if test x$use_assert = x; then
configure.ac +1
-1- XENO_USER_CFLAGS="-DNDEBUG $XENO_USER_CFLAGS" + XENO_USER_CFLAGS_DEBUG="-DNDEBUG $XENO_USER_CFLAGS_DEBUG"
We add NDEBUG to the debug flags? That looks odd.
Quoted 2 lines
fi
+XENU_USER_CFLAGS="$XENO_USER_CFLAGS_DEBUG $XENO_USER_CFLAGS"
Quoted 8 lines · Florian Bezdeka
configure.ac XENO_USER_APP_CFLAGS="$CFLAGS $XENO_USER_APP_CFLAGS" · line 742
Quoted 4 lines · Jan Kiszka
if test x$use_assert = x; then
configure.ac +1
-1- XENO_USER_CFLAGS="-DNDEBUG $XENO_USER_CFLAGS" + XENO_USER_CFLAGS_DEBUG="-DNDEBUG $XENO_USER_CFLAGS_DEBUG"We add NDEBUG to the debug flags? That looks odd.
...only if assertions are disabled. Naming is tricky here as we also carry optimization switches in that variable.
Meanwhile, I wondered if we should bring the FORITY_SOURCE setting to those apps as well.
Jan
Signature · 2 lines
Siemens AG, Foundational Technologies Linux Expert Center