From: Jaroslav Kysela Date: Tue, 8 Mar 2016 14:31:04 +0000 (+0100) Subject: configure: add nowerror argument (for clang) X-Git-Tag: v4.2.1~935 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ddb31c58b88450f7228e620048fb2d691d427fab;p=thirdparty%2Ftvheadend.git configure: add nowerror argument (for clang) --- diff --git a/Makefile b/Makefile index 07e2f17f3..ec95b5ea1 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,10 @@ CFLAGS += -g -O2 ifeq ($(CONFIG_W_UNUSED_RESULT),yes) CFLAGS += -Wunused-result endif -CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations +ifneq ($(CFLAGS_NO_WERROR),yes) +CFLAGS += -Werror +endif +CFLAGS += -Wall -Wwrite-strings -Wno-deprecated-declarations CFLAGS += -Wmissing-prototypes CFLAGS += -fms-extensions -funsigned-char -fno-strict-aliasing CFLAGS += -D_FILE_OFFSET_BITS=64 diff --git a/configure b/configure index 03297a5ac..dac82a135 100755 --- a/configure +++ b/configure @@ -88,7 +88,7 @@ for opt do gzip) eval "$(toupper ${opt}CMD)=\"$val\"" ;; - cc|cflags|ldflags|arch|cpu|platform|python|bzip2) + cc|cflags|ldflags|arch|cpu|platform|python|bzip2|nowerror) eval "$(toupper $opt)=\"$val\"" ;; enable-*) diff --git a/support/configure.inc b/support/configure.inc index 04eb6cf60..9205e5ec4 100755 --- a/support/configure.inc +++ b/support/configure.inc @@ -173,6 +173,7 @@ show_help () printf " $fmt Build and optimize for specific CPU\n" "--cpu=CPU" printf " $fmt Build for architecture [$ARCH]\n" "--arch=ARCH" printf " $fmt Build for platform [$PLATFORM]\n" "--platform=PLATFORM" + printf " $fmt Build without -Werror CFLAGS" "--nowerror" printf " $fmt Use python binary [$PYTHON]\n" "--python=PYTHON" echo "" echo "Options" @@ -495,6 +496,11 @@ datadir = ${datadir} libdir = ${libdir} EOF + # no -Werror + if test -n "${NOWERROR}"; then + echo "CFLAGS_NO_WERROR = yes" >> "${CONFIG_MK}" + fi + # Create C include CONFIG_H="${BUILDDIR}/build.h" cat > "${CONFIG_H}" <