--- glib/gconstructor.h.orig	2020-09-23 07:59:26 +0000
+++ glib/gconstructor.h	2020-09-23 08:06:00 +0000
@@ -111,6 +111,26 @@
 #define G_DEFINE_DESTRUCTOR(_func) \
   static void _func(void);
 
+#elif defined(__xlc__)
+
+#define G_HAS_CONSTRUCTORS 1
+
+#define G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 1
+#define G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA 1
+
+#define G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(_func) \
+  init(_func)
+#define G_DEFINE_CONSTRUCTOR(_func) \
+  static void _func(void); \
+  void _func ## _wrapper(void) { _func(); }
+
+#define G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(_func) \
+  fini(_func)
+#define G_DEFINE_DESTRUCTOR(_func) \
+  static void _func(void); \
+  void _func ## _wrapper(void) { _func(); }
+
+
 #else
 
 /* constructors not supported for this compiler */

