# See if ld(1) is GNU ld(1). GNU ld(1) won't work for this job.
# Recompute $verbose since we may have just changed $cc.
- verbose=`${cc:-cc} -v -o try try.c 2>&1`
+ verbose=`${cc:-cc} -v -o try try.c 2>&1 | grep ld 2>&1`
if echo "$verbose" | grep ' /usr/ccs/bin/ld ' >/dev/null 2>&1; then
:
else
+ # It's not /usr/ccs/bin/ld - but it might be egcs's ld wrapper,
+ # which calls /usr/ccs/bin/ld in turn. Passing -V to it will
+ # make it show its true colors.
+
+ 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.
+
+ # all Solaris versions of ld I've seen contain the magic
+ # string used in the grep below.
+ if $myld -V 2>&1 | grep "ld: Software Generation Utilities" >/dev/null 2>&1; then
+ cat <<END >&2
+
+Aha. You're using egcs and /usr/ccs/bin/ld.
+
+END
+
+ else
cat <<END >&2
NOTE: You are using GNU ld(1). GNU ld(1) will not build Perl.
END
cc="${cc:-cc} -B/usr/ccs/bin/"
+ fi
fi
else
fi
fi
+# 64-bitness
+# jhi@iki.fi, inspired by Alan Burlison.
+
+if [ "X$use64bits" = "X$define" ]; then
+ uname_r=`uname -r`
+ case "$uname_r" in
+ 1.*|2.[1-5])
+ echo >&4 "Solaris $uname_r does not support 64-bit types."
+ echo >&4 "You should upgrade to at least Solaris 2.6."
+ exit 1
+ ;;
+ esac
+ ccflags="$ccflags `getconf LFS_CFLAGS` -DUSE_LONG_LONG"
+ ldflags="$ldflags `getconf LFS_LDFLAGS`"
+ libswanted="$libswanted `getconf LFS_LIBS`"
+ # When a 64-bit cc becomes available $archname64 may need setting
+ # so that $archname gets it attached.
+fi
+
# This is just a trick to include some useful notes.
cat > /dev/null <<'End_of_Solaris_Notes'