mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: jon@ringle.org
To: ptxdist@pengutronix.de
Cc: Jon Ringle <jringle@gridpoint.com>
Subject: [ptxdist] [PATCH] glib: Patch glib-2.0.pc.in to use '-isystem dir' rather than '-Idir'
Date: Fri,  2 Oct 2015 23:06:11 -0400	[thread overview]
Message-ID: <1443841571-30052-1-git-send-email-jon@ringle.org> (raw)

From: Jon Ringle <jringle@gridpoint.com>

When ptxdist did a bump to glib-2.44.0, a project that uses glib and builds
with -Werror will fail.

This patch will allow projects that use -Werror to continue to build without
error.

This patch was submitted upstream:
https://bugzilla.gnome.org/show_bug.cgi?id=756005

Signed-off-by: Jon Ringle <jringle@gridpoint.com>
---
 ....0.pc.in-use-isystem-dir-rather-than-Idir.patch | 90 ++++++++++++++++++++++
 patches/glib-2.44.0/series                         |  4 +
 2 files changed, 94 insertions(+)
 create mode 100644 patches/glib-2.44.0/0001-glib-2.0.pc.in-use-isystem-dir-rather-than-Idir.patch
 create mode 100644 patches/glib-2.44.0/series

diff --git a/patches/glib-2.44.0/0001-glib-2.0.pc.in-use-isystem-dir-rather-than-Idir.patch b/patches/glib-2.44.0/0001-glib-2.0.pc.in-use-isystem-dir-rather-than-Idir.patch
new file mode 100644
index 0000000..c524878
--- /dev/null
+++ b/patches/glib-2.44.0/0001-glib-2.0.pc.in-use-isystem-dir-rather-than-Idir.patch
@@ -0,0 +1,90 @@
+From: Jon Ringle <jringle@gridpoint.com>
+Date: Fri, 2 Oct 2015 22:44:07 -0400
+Subject: [PATCH] glib-2.0.pc.in: use '-isystem dir' rather than '-Idir'
+
+glib produces warnings in that gcc will turn to errors when a project builds
+with -Werror:
+/usr/include/glib-2.0/gio/glistmodel.h: In function 'GListModel* G_LIST_MODEL(gconstpointer)':
+/usr/include/glib-2.0/gobject/gtype.h:479:88: error: cast from type 'gconstpointer {aka const void*}' to type 'GTypeInstance* {aka _GTypeInstance*}' casts away qualifiers [-Werror=cast-qual]
+ #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
+                                                                                        ^
+/usr/include/glib-2.0/gobject/gtype.h:2186:57: note: in definition of macro '_G_TYPE_CIC'
+     ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
+                                                         ^
+/usr/include/glib-2.0/gobject/gtype.h:1565:12: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_CAST'
+     return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); }               \
+            ^
+/usr/include/glib-2.0/gio/glistmodel.h:36:1: note: in expansion of macro 'G_DECLARE_INTERFACE'
+ G_DECLARE_INTERFACE(GListModel, g_list_model, G, LIST_MODEL, GObject)
+ ^
+/usr/include/glib-2.0/gio/glistmodel.h: In function 'gboolean G_IS_LIST_MODEL(gconstpointer)':
+/usr/include/glib-2.0/gobject/gtype.h:491:88: error: cast from type 'gconstpointer {aka const void*}' to type 'GTypeInstance* {aka _GTypeInstance*}' casts away qualifiers [-Werror=cast-qual]
+ #define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type)            (_G_TYPE_CIT ((instance), (g_type)))
+                                                                                        ^
+/usr/include/glib-2.0/gobject/gtype.h:2200:44: note: in definition of macro '_G_TYPE_CIT'
+   GTypeInstance *__inst = (GTypeInstance*) ip; GType __t = gt; gboolean __r; \
+                                            ^
+/usr/include/glib-2.0/gobject/gtype.h:1567:12: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_TYPE'
+     return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); }                              \
+            ^
+/usr/include/glib-2.0/gio/glistmodel.h:36:1: note: in expansion of macro 'G_DECLARE_INTERFACE'
+ G_DECLARE_INTERFACE(GListModel, g_list_model, G, LIST_MODEL, GObject)
+ ^
+/usr/include/glib-2.0/gio/glistmodel.h: In function 'GListModelInterface* G_LIST_MODEL_GET_IFACE(gconstpointer)':
+/usr/include/glib-2.0/gobject/gtype.h:533:88: error: cast from type 'gconstpointer {aka const void*}' to type 'GTypeInstance* {aka _GTypeInstance*}' casts away qualifiers [-Werror=cast-qual]
+ #define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type))
+                                                                                        ^
+/usr/include/glib-2.0/gobject/gtype.h:2196:89: note: in definition of macro '_G_TYPE_IGI'
+ #define _G_TYPE_IGI(ip, gt, ct)         ((ct*) g_type_interface_peek (((GTypeInstance*) ip)->g_class, gt))
+                                                                                         ^
+/usr/include/glib-2.0/gobject/gtype.h:1569:12: note: in expansion of macro 'G_TYPE_INSTANCE_GET_INTERFACE'
+     return G_TYPE_INSTANCE_GET_INTERFACE (ptr, module_obj_name##_get_type (), ModuleObjName##Interface); } \
+            ^
+/usr/include/glib-2.0/gio/glistmodel.h:36:1: note: in expansion of macro 'G_DECLARE_INTERFACE'
+ G_DECLARE_INTERFACE(GListModel, g_list_model, G, LIST_MODEL, GObject)
+ ^
+/usr/include/glib-2.0/gio/gliststore.h: In function 'GListStore* G_LIST_STORE(gconstpointer)':
+/usr/include/glib-2.0/gobject/gtype.h:479:88: error: cast from type 'gconstpointer {aka const void*}' to type 'GTypeInstance* {aka _GTypeInstance*}' casts away qualifiers [-Werror=cast-qual]
+ #define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
+                                                                                        ^
+/usr/include/glib-2.0/gobject/gtype.h:2186:57: note: in definition of macro '_G_TYPE_CIC'
+     ((ct*) g_type_check_instance_cast ((GTypeInstance*) ip, gt))
+                                                         ^
+/usr/include/glib-2.0/gobject/gtype.h:1396:12: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_CAST'
+     return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); }             \
+            ^
+/usr/include/glib-2.0/gio/gliststore.h:36:1: note: in expansion of macro 'G_DECLARE_FINAL_TYPE'
+ G_DECLARE_FINAL_TYPE(GListStore, g_list_store, G, LIST_STORE, GObject)
+ ^
+/usr/include/glib-2.0/gio/gliststore.h: In function 'gboolean G_IS_LIST_STORE(gconstpointer)':
+/usr/include/glib-2.0/gobject/gtype.h:491:88: error: cast from type 'gconstpointer {aka const void*}' to type 'GTypeInstance* {aka _GTypeInstance*}' casts away qualifiers [-Werror=cast-qual]
+ #define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type)            (_G_TYPE_CIT ((instance), (g_type)))
+                                                                                        ^
+/usr/include/glib-2.0/gobject/gtype.h:2200:44: note: in definition of macro '_G_TYPE_CIT'
+   GTypeInstance *__inst = (GTypeInstance*) ip; GType __t = gt; gboolean __r; \
+                                            ^
+/usr/include/glib-2.0/gobject/gtype.h:1398:12: note: in expansion of macro 'G_TYPE_CHECK_INSTANCE_TYPE'
+     return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); }                            \
+            ^
+/usr/include/glib-2.0/gio/gliststore.h:36:1: note: in expansion of macro 'G_DECLARE_FINAL_TYPE'
+ G_DECLARE_FINAL_TYPE(GListStore, g_list_store, G, LIST_STORE, GObject)
+ ^
+
+suppress these by using -isystem dir to include the directories so that a
+project using these headers compiled with -Werror doesn't fail
+
+Signed-off-by: Jon Ringle <jringle@gridpoint.com>
+---
+ glib-2.0.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/glib-2.0.pc.in b/glib-2.0.pc.in
+index 275fc0163299..7b15ca91c5aa 100644
+--- a/glib-2.0.pc.in
++++ b/glib-2.0.pc.in
+@@ -13,4 +13,4 @@ Version: @VERSION@
+ Requires.private: @PCRE_REQUIRES@
+ Libs: -L${libdir} -lglib-2.0 @INTLLIBS@
+ Libs.private: @G_THREAD_LIBS@ @G_LIBS_EXTRA@ @PCRE_LIBS@ @INTLLIBS@ @ICONV_LIBS@ @CARBON_LIBS@ @COCOA_LIBS@
+-Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include @GLIB_EXTRA_CFLAGS@
++Cflags: -isystem ${includedir}/glib-2.0 -isystem ${libdir}/glib-2.0/include @GLIB_EXTRA_CFLAGS@
diff --git a/patches/glib-2.44.0/series b/patches/glib-2.44.0/series
new file mode 100644
index 0000000..01f3583
--- /dev/null
+++ b/patches/glib-2.44.0/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-glib-2.0.pc.in-use-isystem-dir-rather-than-Idir.patch
+# ff1ff15a8125aafbe83b77dcac75a37f  - git-ptx-patches magic
-- 
2.4.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2015-10-03  3:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03  3:06 jon [this message]
2015-10-03  8:56 ` Marc Kleine-Budde
2015-10-03 13:11   ` Jon Ringle
2015-10-16 14:02     ` Jon Ringle
2015-10-30 10:22       ` Michael Olbrich
2015-10-30 15:45         ` Jon Ringle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1443841571-30052-1-git-send-email-jon@ringle.org \
    --to=jon@ringle.org \
    --cc=jringle@gridpoint.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox