GNOME Bugzilla – Bug 776195
-z nodelete configure check does not work on Solaris
Last modified: 2017-11-21 12:18:43 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
Review of attachment 342104 [details] [review]: Seems reasonable.
Pushed as ca32be3bf231c6591cbe34f4e58e98312c4b73c5.