Patchwork [dora,RFC,1/2] dpkg: Fix a build error for dpkg-native on CentOS 5.8.

login
register
mail settings
Submitter Mark Hatle
Date Nov. 21, 2013, 7:08 a.m.
Message ID <1385017702-22903-2-git-send-email-mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/62079/
State New
Headers show

Comments

Mark Hatle - Nov. 21, 2013, 7:08 a.m.
From: Lei Liu <lei.liu2@windriver.com>

Remove the -Wvla(*) flag from the set of compiler warning flags, since
gcc on ancient host systems such as CentOS 5.8 doesn't support it.

*-Wvla
  Warn if variable length array is used in the code.  -Wno-vla will prevent
  the -pedantic warning of the variable length array.

Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
Signed-off-by: Lei Liu <lei.liu2@windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
---
 .../dpkg/dpkg/no-vla-warning.patch                 | 24 ++++++++++++++++++++++
 meta/recipes-devtools/dpkg/dpkg_1.17.1.bb          |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch

Patch

diff --git a/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
new file mode 100644
index 0000000..9bec523
--- /dev/null
+++ b/meta/recipes-devtools/dpkg/dpkg/no-vla-warning.patch
@@ -0,0 +1,24 @@ 
+Remove the -Wvla flag from the set of compiler warning flags, since gcc
+on ancient host systems such as CentOS 5.8 doesn't support it, and it
+causes a build error for dpkg-native.
+
+Upstream-Status: Inappropriate [everyone else builds on newer hosts :-)]
+
+Signed-off-by: Donn Seeley <donn.seeley@windriver.com>
+Signed-off-by: Lei Liu <lei.liu2@windriver.com>
+---
+ m4/dpkg-compiler.m4 |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/m4/dpkg-compiler.m4
++++ b/m4/dpkg-compiler.m4
+@@ -14,7 +14,7 @@ AC_DEFUN([DPKG_COMPILER_WARNINGS],
+ 
+ WFLAGS="-Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers \
+ 	 -Wmissing-declarations -Wmissing-format-attribute \
+ 	 -Wformat-security -Wpointer-arith \
+-	 -Wvla -Winit-self -Wwrite-strings -Wcast-align -Wshadow"
++	 -Winit-self -Wwrite-strings -Wcast-align -Wshadow"
+ WCFLAGS="-Wdeclaration-after-statement -Wnested-externs -Wbad-function-cast \
+ 	 -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition"
+ # Temporarily here until #542031 gets fixed in ncurses
diff --git a/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb b/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
index 525f759..4ff22cc 100644
--- a/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
+++ b/meta/recipes-devtools/dpkg/dpkg_1.17.1.bb
@@ -9,6 +9,7 @@  SRC_URI += "file://noman.patch \
             file://remove-tar-no-timestamp.patch \
             file://fix-abs-redefine.patch \
             file://arch_pm.patch \
+            file://no-vla-warning.patch \
            "
 
 SRC_URI[md5sum] = "ece3ae87a099158c17bde95c0036c575"