]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
configure: add nowerror argument (for clang)
authorJaroslav Kysela <perex@perex.cz>
Tue, 8 Mar 2016 14:31:04 +0000 (15:31 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 8 Mar 2016 14:31:04 +0000 (15:31 +0100)
Makefile
configure
support/configure.inc

index 07e2f17f3a79976b18cc4331447bd4c2079a48f6..ec95b5ea1ac315d7d9526067f49ac45039003601 100644 (file)
--- 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
index 03297a5ac9945cee0467d6a09ed6800c0cbd2d16..dac82a135d690383b186dd7151e0bbb0e0383f70 100755 (executable)
--- 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-*)
index 04eb6cf606ea82c21749c2d9b1d79ad4e5e0e094..9205e5ec4986c283fd0b58a492b7105a51e26a69 100755 (executable)
@@ -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}" <<EOF