public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
From: Jim Meyering <meyering@ascend.com>
To: Ben Elliston <bje@cygnus.com>
Cc: Per Bothner <bothner@cygnus.com>,
	hjl@gnu.org, carlo@runaway.xs4all.nl, gas2@cygnus.com,
	bfd@cygnus.com
Subject: Re: [cygnus.gas2] binutils bug: config.guess
Date: Mon, 05 Apr 1999 06:46:00 -0000	[thread overview]
Message-ID: <87lng76vhm.fsf@ascend.com> (raw)
In-Reply-To: <Pine.LNX.3.95.990405201802.7418B-100000@moshpit.cygnus.com>

Ben Elliston <bje@cygnus.com> writes:
| > * Cd to some directory unlikely to contain ld:  (cd /; ld)
|
| Here is a patch which seems to work fine.  Does anyone see any potential
| problems with this?
|
| *** config.guess        1999/03/21 14:01:53     1.138
| --- config.guess        1999/04/05 10:17:18
| ***************
| *** 608,614 ****
|
|         # The BFD linker knows what the default object file format is, so
|         # first see if it will tell us.
| !       ld_help_string=`ld --help 2>&1`
|         ld_supported_emulations=`echo $ld_help_string \
|                          | sed -ne '/supported emulations:/!d
|                                     s/[         ][      ]*/ /g
| --- 608,614 ----
|
|         # The BFD linker knows what the default object file format is, so
|         # first see if it will tell us.
| !       pwd=`pwd`; cd /; ld_help_string=`ld --help 2>&1`; cd $pwd
|         ld_supported_emulations=`echo $ld_help_string \
|                          | sed -ne '/supported emulations:/!d
|                                     s/[         ][      ]*/ /g

That will not change back to the proper directory if pwd fails.
It's more robust to do the cd from a subshell instead -- then you
don't have to be able to return to the working directory:

  ld_help_string=`cd /; ld --help 2>&1`

Also, I think the `cd /' part deserves a comment.

      reply	other threads:[~1999-04-05  6:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.3.95.990405125857.5800B-100000@moshpit.cygnus.com>
1999-04-04 22:57 ` Per Bothner
1999-04-04 23:02   ` Ben Elliston
1999-04-04 23:25     ` Per Bothner
1999-04-04 23:33       ` Ben Elliston
1999-04-05  8:17         ` Carlo Wood
1999-04-06  2:20         ` Richard Stallman
1999-04-06  9:21           ` Carlo Wood
1999-04-05  3:26   ` Ben Elliston
1999-04-05  6:46     ` Jim Meyering [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lng76vhm.fsf@ascend.com \
    --to=meyering@ascend.com \
    --cc=bfd@cygnus.com \
    --cc=bje@cygnus.com \
    --cc=bothner@cygnus.com \
    --cc=carlo@runaway.xs4all.nl \
    --cc=gas2@cygnus.com \
    --cc=hjl@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).