[OE-core] [dora][RFC PATCH 1/2] dpkg: Fix a build error for dpkg-native on CentOS 5.8.
Mark Hatle
mark.hatle at windriver.com
Thu Nov 21 07:08:21 UTC 2013
From: Lei Liu <lei.liu2 at 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 at windriver.com>
Signed-off-by: Lei Liu <lei.liu2 at windriver.com>
Signed-off-by: Randy MacLeod <Randy.MacLeod at windriver.com>
Signed-off-by: Jeff Polk <jeff.polk at 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
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 at windriver.com>
+Signed-off-by: Lei Liu <lei.liu2 at 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"
--
1.8.1.2.545.g2f19ada
More information about the Openembedded-core
mailing list