Bug 1003702 - Suppress clang warnings in third-party code: ICU. Now with more clobberin'. r=glandium
authorChris Peterson <cpeterson@mozilla.com>
Thu, 01 May 2014 08:55:31 -0700
changeset 200528 2df94d46bc5ab57278be1f06d371ec2122326d15
parent 200527 5c399b6e1368151e4c0b626d693d8e2f21beb38b
child 200529 c56db0ba5b49056cc1a3638dc9befe749a32aa55
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1003702
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1003702 - Suppress clang warnings in third-party code: ICU. Now with more clobberin'. r=glandium
CLOBBER
intl/icu-patches/suppress-warnings.diff
intl/icu/source/acinclude.m4
intl/icu/source/configure
intl/update-icu.sh
--- a/CLOBBER
+++ b/CLOBBER
@@ -1,9 +1,9 @@
-# To Trigger a clobber replace ALL of the textual description below,
+# To trigger a clobber replace ALL of the textual description below,
 # giving a bug number and a one line description of why a clobber is
 # required. Modifying this file will make configure check that a
 # clobber has been performed before the build can continue.
 #
 # MERGE NOTE: When merging two branches that require a CLOBBER, you should
 #             merge both CLOBBER descriptions, to ensure that users on
 #             both branches correctly see the clobber warning.
 #
@@ -17,9 +17,9 @@
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
 # Are you updating CLOBBER because you think it's needed for your WebIDL
 # changes to stick? As of bug 928195, this shouldn't be necessary! Please
 # don't change CLOBBER for WebIDL changes any more.
 
-Bug 1003702 - ICU is unhappy.
+Bug 1003702 - Relanding ICU changes with a clobber
new file mode 100644
--- /dev/null
+++ b/intl/icu-patches/suppress-warnings.diff
@@ -0,0 +1,80 @@
+diff --git a/intl/icu/source/acinclude.m4 b/intl/icu/source/acinclude.m4
+--- a/intl/icu/source/acinclude.m4
++++ b/intl/icu/source/acinclude.m4
+@@ -466,30 +466,36 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE],
+             *)
+                 # Do not use -ansi. It limits us to C90, and it breaks some platforms.
+                 # We use -std=c99 to disable the gnu99 defaults and its associated warnings
+                 CFLAGS="$CFLAGS -std=c99"
+                 ;;
+             esac
+             
+             CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
++
++            # Suppress clang C warnings:
++            CFLAGS="$CFLAGS -Wno-sign-compare -Wno-unused"
+         else
+             case "${host}" in
+             *-*-cygwin)
+                 if test "`$CC /help 2>&1 | head -c9`" = "Microsoft"
+                 then
+                     CFLAGS="$CFLAGS /W4"
+                 fi ;;
+             *-*-mingw32|*-*-mingw64)
+                 CFLAGS="$CFLAGS -W4" ;;
+             esac
+         fi
+         if test "$GXX" = yes
+         then
+             CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
++
++            # Suppress clang C++ warnings:
++            CXXFLAGS="$CXXFLAGS -Wno-unused -Wno-unused-parameter"
+         else
+             case "${host}" in
+             *-*-cygwin)
+                 if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft"
+                 then
+                     CXXFLAGS="$CXXFLAGS /W4"
+                 fi ;;
+             *-*-mingw32|*-*-mingw64)
+diff --git a/intl/icu/source/configure b/intl/icu/source/configure
+--- a/intl/icu/source/configure
++++ b/intl/icu/source/configure
+@@ -4089,30 +4089,36 @@ fi
+             *)
+                 # Do not use -ansi. It limits us to C90, and it breaks some platforms.
+                 # We use -std=c99 to disable the gnu99 defaults and its associated warnings
+                 CFLAGS="$CFLAGS -std=c99"
+                 ;;
+             esac
+ 
+             CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
++
++            # Suppress clang C warnings:
++            CFLAGS="$CFLAGS -Wno-sign-compare -Wno-unused"
+         else
+             case "${host}" in
+             *-*-cygwin)
+                 if test "`$CC /help 2>&1 | head -c9`" = "Microsoft"
+                 then
+                     CFLAGS="$CFLAGS /W4"
+                 fi ;;
+             *-*-mingw32|*-*-mingw64)
+                 CFLAGS="$CFLAGS -W4" ;;
+             esac
+         fi
+         if test "$GXX" = yes
+         then
+             CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
++
++            # Suppress clang C++ warnings:
++            CXXFLAGS="$CXXFLAGS -Wno-unused -Wno-unused-parameter"
+         else
+             case "${host}" in
+             *-*-cygwin)
+                 if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft"
+                 then
+                     CXXFLAGS="$CXXFLAGS /W4"
+                 fi ;;
+             *-*-mingw32|*-*-mingw64)
--- a/intl/icu/source/acinclude.m4
+++ b/intl/icu/source/acinclude.m4
@@ -466,30 +466,36 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE],
             *)
                 # Do not use -ansi. It limits us to C90, and it breaks some platforms.
                 # We use -std=c99 to disable the gnu99 defaults and its associated warnings
                 CFLAGS="$CFLAGS -std=c99"
                 ;;
             esac
             
             CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
+
+            # Suppress clang C warnings:
+            CFLAGS="$CFLAGS -Wno-sign-compare -Wno-unused"
         else
             case "${host}" in
             *-*-cygwin)
                 if test "`$CC /help 2>&1 | head -c9`" = "Microsoft"
                 then
                     CFLAGS="$CFLAGS /W4"
                 fi ;;
             *-*-mingw32|*-*-mingw64)
                 CFLAGS="$CFLAGS -W4" ;;
             esac
         fi
         if test "$GXX" = yes
         then
             CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
+
+            # Suppress clang C++ warnings:
+            CXXFLAGS="$CXXFLAGS -Wno-unused -Wno-unused-parameter"
         else
             case "${host}" in
             *-*-cygwin)
                 if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft"
                 then
                     CXXFLAGS="$CXXFLAGS /W4"
                 fi ;;
             *-*-mingw32|*-*-mingw64)
--- a/intl/icu/source/configure
+++ b/intl/icu/source/configure
@@ -4089,30 +4089,36 @@ fi
             *)
                 # Do not use -ansi. It limits us to C90, and it breaks some platforms.
                 # We use -std=c99 to disable the gnu99 defaults and its associated warnings
                 CFLAGS="$CFLAGS -std=c99"
                 ;;
             esac
 
             CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings"
+
+            # Suppress clang C warnings:
+            CFLAGS="$CFLAGS -Wno-sign-compare -Wno-unused"
         else
             case "${host}" in
             *-*-cygwin)
                 if test "`$CC /help 2>&1 | head -c9`" = "Microsoft"
                 then
                     CFLAGS="$CFLAGS /W4"
                 fi ;;
             *-*-mingw32|*-*-mingw64)
                 CFLAGS="$CFLAGS -W4" ;;
             esac
         fi
         if test "$GXX" = yes
         then
             CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long"
+
+            # Suppress clang C++ warnings:
+            CXXFLAGS="$CXXFLAGS -Wno-unused -Wno-unused-parameter"
         else
             case "${host}" in
             *-*-cygwin)
                 if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft"
                 then
                     CXXFLAGS="$CXXFLAGS /W4"
                 fi ;;
             *-*-mingw32|*-*-mingw64)
--- a/intl/update-icu.sh
+++ b/intl/update-icu.sh
@@ -50,10 +50,11 @@ rm ${icu_dir}/source/data/translit/*
 # the tree.)
 svn info $1 | grep -v '^Revision: [[:digit:]]\+$' > ${icu_dir}/SVN-INFO
 
 patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/bug-724533
 patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/bug-899722-4
 patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/bug-915735
 patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/genrb-omitCollationRules.diff
 patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/qualify-uinitonce-windows.diff
+patch -d ${icu_dir}/../../ -p1 < ${icu_dir}/../icu-patches/suppress-warnings.diff
 
 hg addremove ${icu_dir}