]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
pkg-config: Fix compilation with newer GCCs
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 12 Apr 2017 09:39:04 +0000 (11:39 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 18 May 2017 10:58:22 +0000 (11:58 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/pkg-config
src/patches/pkg-config-0.29-glib-compile-fix.patch [new file with mode: 0644]

index 3c3b8b27ed2ed60c8575808915310a0597e7745b..d58fbe2abad47e33a7246af043cc67199ce85a6b 100644 (file)
@@ -42,6 +42,8 @@ else
   PREFIX = /tools
 endif
 
+CFLAGS += Wno-error=format-nonliteral
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -80,6 +82,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP)/glib && patch -Np1 < $(DIR_SRC)/src/patches/pkg-config-0.29-glib-compile-fix.patch
 ifeq "$(ROOT)" ""
 else
        mkdir -pv /tools/lib/pkgconfig
diff --git a/src/patches/pkg-config-0.29-glib-compile-fix.patch b/src/patches/pkg-config-0.29-glib-compile-fix.patch
new file mode 100644 (file)
index 0000000..a092882
--- /dev/null
@@ -0,0 +1,29 @@
+From 0817af40e8c74c721c30f6ef482b1f53d12044c7 Mon Sep 17 00:00:00 2001
+From: coypu <coypu@sdf.org>
+Date: Mon, 8 Feb 2016 00:06:06 +0200
+Subject: gdate: Suppress string format literal warning
+
+Newer versions of GCC emit an error here, but we know it's safe.
+https://bugzilla.gnome.org/761550
+---
+ glib/gdate.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/glib/gdate.c b/glib/gdate.c
+index 4aece02..cdc735c 100644
+--- a/glib/gdate.c
++++ b/glib/gdate.c
+@@ -2494,7 +2494,10 @@ g_date_strftime (gchar       *s,
+        * recognize whether strftime actually failed or just returned "".
+        */
+       tmpbuf[0] = '\1';
++      #pragma GCC diagnostic push
++      #pragma GCC diagnostic ignored "-Wformat-nonliteral"
+       tmplen = strftime (tmpbuf, tmpbufsize, locale_format, &tm);
++      #pragma GCC diagnostic pop
+       if (tmplen == 0 && tmpbuf[0] != '\0')
+         {
+-- 
+cgit v0.12
+