<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
<style>
div.markdown { white-space: normal; }
body { font-family: sans-serif; }
h1 { font-size: 1.4em; }
h2 { font-size: 1.2em; }
h3 { font-size: 1.1em; }
@media (prefers-color-scheme: dark) { a { color: #136BCE; }
}
pre { margin-left: 15px; margin-right: 15px; padding: 5px; border: thin solid gray; overflow-x: auto; max-width: 90vw; }
div.footnotes li p { margin: 0.2em 0; }
</style>
</head>
<body>
<div class="markdown">
<p dir="auto">I'm struggling with this on Solaris 10 with Solaris Studio compiler.<br>
Seems to be a couple of issues, I'm still working through...</p>
<p dir="auto">For example configure is using -pthread option when testing OpenSSL which is not appropriate for Studio:</p>
<pre><code>configure:17237: checking for OpenSSL AES support
configure:17261: /ws/on10-patch-tools/SUNWspro/SS12/bin/cc -D_STDC_C99= -mt -pthread -o conftest -g -D_XPG4_2 -D__EXTENSIONS__ -L/builds2/smarshal/sfw10-patch/proto/root_sparc/usr/lib -L/builds2/smarshal/sfw10-patch/proto/root_sparc/usr/lib/dns conftest.c -lcrypto -lpthread >&5
ld: fatal: option -h and building a dynamic executable are incompatible
ld: fatal: Flags processing errors
configure:17261: $? = 1
configure: program exited with status 1
configure: failed program was:
</code></pre>
<p dir="auto">'pthread' option also needs patching out of ltmain.sh, I have raised that as an issue with libtool.</p>
<pre><code>libtool should not pass option '-pthread' to Solaris link-editor.
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index 0f0a2da3f9..7c8bcfd9d2 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -7070,7 +7070,21 @@ func_mode_link ()
continue
;;
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+ # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
+ -pthread)
+ case $host in
+ *solaris2*) ;;
+ *)
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) func_append new_inherited_linker_flags " $arg" ;;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
|-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
func_append compiler_flags " $arg"
func_append compile_command " $arg"
</code></pre>
<p dir="auto">I'm running a GCC build now, with gcc from /usr/sfw/bin. I needed to tell gcc to not use /usr/sfw/include, where it was finding an older OpenSSL include file:</p>
<pre><code>CC = /usr/sfw/bin/gcc
CFLAGS = -g -Os -Wall,packed,padded,sign-compare,pointer-arith
# override default gcc include search order (shown by 'gcc -v file.c')
# as need openssl headers to come from /usr/include and not
# /usr/sfw/include. Note, do not seem to need gcc include dir; commented out.
#
CFLAGS += -nostdinc
# CFLAGS += -isystem /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/include
CFLAGS += -isystem /usr/include/libxml2
CFLAGS += -isystem /usr/include
CFLAGS += -isystem /usr/sfw/include
</code></pre>
<p dir="auto">Also, needed patch that I posted to <a href="https://gitlab.isc.org/isc-projects/bind9/issues/935">https://gitlab.isc.org/isc-projects/bind9/issues/935</a></p>
<p dir="auto">--<br>
Stacey</p>
</div>
</body>
</html>