diff options
author | Tom Spindler <dogcow@isi.net> | 1998-08-01 17:21:58 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-08-02 04:44:20 +0000 |
commit | d5fdf557bafa0b62e5137b7e9cc0d2d0d7c86735 (patch) | |
tree | 1f6f45518ef374bba705c4da859f0626896189d8 /hints | |
parent | 19b4f81ab32719bedc893a7532029fff0bf316c9 (diff) | |
download | perl-d5fdf557bafa0b62e5137b7e9cc0d2d0d7c86735.tar.gz |
beware egcs' ld on Solaris
Message-ID: <19980801212158.A2934@home.merit.edu>
Subject: Re: [PATCH perl5.005_01] hints/solaris_2.sh, egcs, and ld
p4raw-id: //depot/maint-5.005/perl@1694
Diffstat (limited to 'hints')
-rw-r--r-- | hints/solaris_2.sh | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/hints/solaris_2.sh b/hints/solaris_2.sh index 6f5ee32092..856f80103f 100644 --- a/hints/solaris_2.sh +++ b/hints/solaris_2.sh @@ -173,10 +173,28 @@ END # 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. @@ -185,6 +203,7 @@ in your ${cc:-cc} command. (Note that the trailing "/" is required.) END cc="${cc:-cc} -B/usr/ccs/bin/" + fi fi else |