EXTRA_ARGS=
PROFILE_ARGS=
-#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling compression urldebug iodbg"
+COMPILER=
+CFLAGS=
+#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling compression urldebug iodbg clang"
+ifneq (,$(findstring clang,$(DEB_BUILD_OPTIONS)))
+ COMPILER="clang"
+endif
ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
PROFILE_ARGS= --with-gprof
LDFLAGS += -pg
endif
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D TECH_PREVIEW -pedantic -Wformat-nonliteral
+ CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D TECH_PREVIEW -pedantic -Wformat-nonliteral -Wmaybe-uninitialized -Wunused-variable
EXTRA_ARGS = --with-backtrace
else
CFLAGS += -O2
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
- CFLAGS="$(CFLAGS)" ./configure \
+ export CC=$(COMPILER); export CFLAGS=" -Wformat -Werror=format-security $(CFLAGS)"; ./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr/sbin/ \