X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hints%2Fsolaris_2.sh;h=2155e4959ee077d00bfbdc8de278eb9751793759;hb=ed423f7afb5038546a92d00ca689992f3e08bc61;hp=bf8f422a2bce6ecbb9ce003f14bf7f7b98ce673f;hpb=2a421fdbf642d8802eb47592c9ed1f5013a62e2b;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh index bf8f422..2155e49 100644 --- a/hints/solaris_2.sh +++ b/hints/solaris_2.sh @@ -94,6 +94,21 @@ case "$workshoplibpth_done" in esac EOCBU +case "$cc" in +'') if test -f /opt/SUNWspro/bin/cc; then + cc=/opt/SUNWspro/bin/cc + cat <&4 + +You specified no cc but you seem to have the Workshop compiler +($cc) installed, using that. +If you want something else, specify that in the command line, +e.g. Configure -Dcc=gcc + +EOF + fi + ;; +esac + ###################################################### # General sanity testing. See below for excerpts from the Solaris FAQ. # @@ -119,7 +134,7 @@ esac # Check that /dev/fd is mounted. If it is not mounted, let the # user know that suid scripts may not work. -/usr/bin/df /dev/fd 2>&1 > /dev/null +df /dev/fd 2>&1 > /dev/null case $? in 0) ;; *) @@ -252,15 +267,21 @@ END # apparently don't reveal that unless you pass in -V. # (This may all depend on local configurations too.) + # Recompute verbose with -Wl,-v to find GNU ld if present + verbose=`${cc:-cc} -v -Wl,-v -o try try.c 2>&1 | grep ld 2>&1` + myld=`echo $verbose| grep ld | awk '/\/ld/ {print $1}'` # This assumes that gcc's output will not change, and that # /full/path/to/ld will be the first word of the output. - # Thus myld is something like opt/gnu/sparc-sun-solaris2.5/bin/ld + # Thus myld is something like /opt/gnu/sparc-sun-solaris2.5/bin/ld - if $myld -V 2>&1 | grep "ld: Software Generation Utilities" >/dev/null 2>&1; then + # Allow that $myld may be '', due to changes in gcc's output + if ${myld:-ld} -V 2>&1 | + grep "ld: Software Generation Utilities" >/dev/null 2>&1; then # Ok, /usr/ccs/bin/ld eventually does get called. : else + echo "Found GNU ld='$myld'" >&4 cat <&2 NOTE: You are using GNU ld(1). GNU ld(1) might not build Perl. If you @@ -342,9 +363,6 @@ cat > UU/usethreads.cbu <<'EOCBU' # after it has prompted the user for whether to use threads. case "$usethreads" in $define|true|[yY]*) - case "$ccflags" in - *_REENTRANT*) ;; # Already been here, I presume. - *) ccflags="-D_REENTRANT $ccflags" # sched_yield is in -lposix4 up to Solaris 2.6, in -lrt starting with Solaris 2.7 @@ -388,9 +406,28 @@ for more information. EOM fi - ;; - esac - ;; + + # These prototypes should be visible since we using + # -D_REENTRANT, but that does not seem to work. + # It does seem to work for getnetbyaddr_r, weirdly enough, + # and other _r functions. (Solaris 8) + + d_ctermid_r_proto="$define" + d_gethostbyaddr_r_proto="$define" + d_gethostbyname_r_proto="$define" + d_getnetbyname_r_proto="$define" + d_getprotobyname_r_proto="$define" + d_getprotobynumber_r_proto="$define" + d_getservbyname_r_proto="$define" + d_getservbyport_r_proto="$define" + + # Ditto. (Solaris 7) + d_readdir_r_proto="$define" + d_readdir64_r_proto="$define" + d_tmpnam_r_proto="$define" + d_ttyname_r_proto="$define" + + ;; esac EOCBU @@ -437,6 +474,26 @@ EOM esac ;; esac +# gcc-2.8.1 on Solaris 8 with -Duse64bitint fails op/pat.t test 822 +# if we compile regexec.c with -O. Turn off optimization for that one +# file. See hints/README.hints , especially +# =head2 Propagating variables to config.sh, method 3. +# A. Dougherty May 24, 2002 +case "$use64bitint" in +"$define") + case "${gccversion}-${optimize}" in + 2.8*-O*) + # Honor a command-line override (rather unlikely) + case "$regexec_cflags" in + '') echo "Disabling optimization on regexec.c for gcc $gccversion" >&4 + regexec_cflags='optimize=' + echo "regexec_cflags='optimize=\"\"'" >> config.sh + ;; + esac + ;; + esac + ;; +esac EOCBU cat > UU/use64bitall.cbu <<'EOCBU'