After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776195 - -z nodelete configure check does not work on Solaris
-z nodelete configure check does not work on Solaris
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
2.46.x
Other Solaris
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-12-17 06:28 UTC by Alan Coopersmith
Modified: 2017-11-21 12:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch currently used in Solaris builds (1.71 KB, patch)
2016-12-17 06:28 UTC, Alan Coopersmith
committed Details | Review

Description Alan Coopersmith 2016-12-17 06:28:28 UTC
Created attachment 342104 [details] [review]
Patch currently used in Solaris builds

The glib configure script fails to detect that Solaris ld supports -z nodelete:

checking for -z,nodelete linker flag... no

config.log shows it failed due to:

configure:29135: checking for -z,nodelete linker flag
configure:29149: gcc  -m64 -o conftest -std=gnu11 -Wall -Wextra -Wwrite-strings -Wmissing-noreturn -Wmissing-format-attribute -Wstrict-aliasing -Wno-unused-parameter -idirafter  /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.12/5.4.0//install-tools/include -Wstack-usage=1048576 -Wdate-time -O2  -m64 -g -I/net/also.us.oracle.com/export/alanc/X.Org/amd64-gcc/install/usr/X11R7/include -DNO_ALLOCA -D__EXTENSIONS__ -D_REENTRANT -D_ERRNO_VERIFY -D__C99FEATURES__  -D__unix__ -D_REENTRANT -D_PTHREADS -Wl,--fatal-warnings -Wl,-z,nodelete conftest.c  >&5
ld: fatal: option '-z nodelete' is incompatible with building a dynamic executable
collect2: error: ld returned 1 exit status

Ensuring that the flags to build a shared library are also passed when testing
this flag cause it to be correctly detected:

configure:29136: checking for -z,nodelete linker flag
configure:29150: gcc  -m64 -o conftest -std=gnu11 -Wall -Wextra -Wwrite-strings -Wmissing-noreturn -Wmissing-format-attribute -Wstrict-aliasing -Wno-unused-parameter -idirafter  /usr/gcc/5/lib/gcc/x86_64-pc-solaris2.12/5.4.0//install-tools/include -Wstack-usage=1048576 -Wdate-time -O2  -m64 -g  -shared -I/net/also.us.oracle.com/export/alanc/X.Org/amd64-gcc/install/usr/X11R7/include -DNO_ALLOCA -D__EXTENSIONS__ -D_REENTRANT -D_ERRNO_VERIFY -D__C99FEATURES__  -D__unix__ -D_REENTRANT -D_PTHREADS -Wl,--fatal-warnings -Wl,-z,nodelete conftest.c  >&5
configure:29150: $? = 0
configure:29151: result: yes
Comment 1 Philip Withnall 2017-11-21 12:14:13 UTC
Review of attachment 342104 [details] [review]:

Seems reasonable.
Comment 2 Philip Withnall 2017-11-21 12:18:43 UTC
Pushed as ca32be3bf231c6591cbe34f4e58e98312c4b73c5.