userspace: Fix DEBUG=1 build
cover userspace: Fix DEBUG=1 build
...and add it to the Travis CI matrix.
Passed Travis: https://travis-ci.org/WOnder93/selinux/builds/646830495
Failed new test without the fix: https://travis-ci.org/WOnder93/selinux/builds/646833909
Ondrej Mosnacek (2):
libsemanage: preserve parent Makefile's flags in debug mode
Travis-CI: test that DEBUG build works
.travis.yml | 3 +++ libsemanage/src/Makefile | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-)
Signature · 1 line
2.24.1
PATCH 1/2 libsemanage: preserve parent Makefile's flags in debug mode
Do not override CFLAGS and LDFLAGS in libsemange Makefile under DEBUG=1, to make it possible to build the whole tree using the root Makefile with DEBUG=1.
--- libsemanage/src/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
libsemanage/src/Makefile +2 -2
@@ -22,8 +22,8 @@ RUBYINSTALL ?= $(shell $(RUBY) -e 'puts RbConfig::CONFIG["vendorarchdir"]') DEFAULT_SEMANAGE_CONF_LOCATION=/etc/selinux/semanage.conf ifeq ($(DEBUG),1) - export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror - export LDFLAGS = -g + export CFLAGS ?= -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror + export LDFLAGS ?= -g endif LEX = flex
Signature · 1 line
2.24.1
PATCH 2/2 Travis-CI: test that DEBUG build works
In reply to Ondrej Mosnacek--- .travis.yml | 3 +++ 1 file changed, 3 insertions(+)
.travis.yml +3 -0
@@ -13,6 +13,7 @@ env: # Test the last version of Python and Ruby together, with some linkers - PYVER=python3.7 RUBYLIBVER=2.6 - PYVER=python3.7 RUBYLIBVER=2.6 TEST_FLAGS_OVERRIDE=1 + - PYVER=python3.7 RUBYLIBVER=2.6 TEST_DEBUG=1 - PYVER=python3.7 RUBYLIBVER=2.6 LINKER=gold - PYVER=python3.7 RUBYLIBVER=2.6 LINKER=bfd
@@ -116,6 +117,8 @@ before_script: # If TEST_FLAGS_OVERRIDE is defined, test that overriding CFLAGS, LDFLAGS and other variables works fine - if [ -n "$TEST_FLAGS_OVERRIDE" ]; then EXPLICIT_MAKE_VARS="CFLAGS=-I$DESTDIR/usr/include LDFLAGS=-L$DESTDIR/usr/lib LDLIBS= CPPFLAGS=" ; fi + # If TEST_DEBUG is defined, test that debug build works fine + - if [ -n "$TEST_DEBUG" ]; then EXPLICIT_MAKE_VARS="$EXPLICIT_MAKE_VARS DEBUG=1" ; fi script: # Start by installing everything into $DESTDIR
Signature · 1 line
2.24.1
Re: [PATCH 2/2] Travis-CI: test that DEBUG build works
Quoted 1 line · Ondrej Mosnacek
Signed-off-by Ondrej Mosnacek <[email protected]>
Quoted 26 lines
--- .travis.yml | 3 +++ 1 file changed, 3 insertions(+).travis.yml +3
-0@@ -13,6 +13,7 @@ env: # Test the last version of Python and Ruby together, with some linkers - PYVER=python3.7 RUBYLIBVER=2.6 - PYVER=python3.7 RUBYLIBVER=2.6 TEST_FLAGS_OVERRIDE=1 + - PYVER=python3.7 RUBYLIBVER=2.6 TEST_DEBUG=1 - PYVER=python3.7 RUBYLIBVER=2.6 LINKER=gold - PYVER=python3.7 RUBYLIBVER=2.6 LINKER=bfd@@ -116,6 +117,8 @@ before_script: # If TEST_FLAGS_OVERRIDE is defined, test that overriding CFLAGS, LDFLAGS and other variables works fine - if [ -n "$TEST_FLAGS_OVERRIDE" ]; then EXPLICIT_MAKE_VARS="CFLAGS=-I$DESTDIR/usr/include LDFLAGS=-L$DESTDIR/usr/lib LDLIBS= CPPFLAGS=" ; fi + # If TEST_DEBUG is defined, test that debug build works fine + - if [ -n "$TEST_DEBUG" ]; then EXPLICIT_MAKE_VARS="$EXPLICIT_MAKE_VARS DEBUG=1" ; fi script: # Start by installing everything into $DESTDIR
Re: [PATCH 2/2] Travis-CI: test that DEBUG build works
Quoted 4 lines · Stephen Smalley
Quoted 1 line · Ondrej Mosnacek
Signed-off-by Ondrej Mosnacek <[email protected]>Acked-by Stephen Smalley <[email protected]>
Both patches applied.