GNOME Bugzilla – Bug 763560
Constructors on AIX
Last modified: 2018-05-24 18:41:34 UTC
Created attachment 323776 [details] [review] Constructor patch for AIX I have a build of glib-2.46.2 on AIX that has constructors working. Supporting constructors on this platform is problematic because you need the support of the compiler and the linker. I have attached a patch of my work. Explanations: 1. The constructor/destructor must not be static. Maybe we redefine G_DEFINE_DESTRUCTOR to G_DEFINE_DESTRUCTOR_PROTO and then use G_DEFINE_DESTRUCTOR in the .c file to define the constructor? We could then continue with the preprocessor-like method in glib/gconstructor.h and support static-less constructors on AIX. 2. The library with the constructor must be linked with -Wl,-binitfini:<constructor>:<destructor>. I added AIX_LDFLAGS to glib/Makefile.am and gobject/Makefile.am for manual massaging at build time. We could fix this in configure.ac as well.
Created attachment 324043 [details] [review] Updated patch
Hi I'm now trying to port version 2.48.0 of Glib on AIX 6.1. For BullFreeware. We want to deliver a new version of GTK+ v2 and then v3. Huge work. And I'm facing and discovering this damned issue with GLib. I will have a look at your patch tomorrow. Regards, Tony
(In reply to Tony Reix from comment #2) > I'm now trying to port version 2.48.0 of Glib on AIX 6.1. For BullFreeware. > We want to deliver a new version of GTK+ v2 and then v3. Huge work. > And I'm facing and discovering this damned issue with GLib. > I will have a look at your patch tomorrow. Did the patch work for you?
Yes ! It worked perfectly well ! Thanks ! And we have just fixed another issue dealing with libiconv in our .spec file for 64bits.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1147.