This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Simplify --sysroot=/
- From: Andreas Schwab <schwab at suse dot de>
- To: Alan Modra <amodra at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 29 Oct 2018 10:22:03 +0100
- Subject: Re: Simplify --sysroot=/
- References: <20181029075154.GE30859@bubble.grove.modra.org>
On Okt 29 2018, Alan Modra <amodra@gmail.com> wrote:
> diff --git a/ld/ldmain.c b/ld/ldmain.c
> index 464192049a..6f3ce6f810 100644
> --- a/ld/ldmain.c
> +++ b/ld/ldmain.c
> @@ -584,21 +584,25 @@ static const char *
> get_sysroot (int argc, char **argv)
> {
> int i;
> - const char *path;
> + const char *path = NULL;
>
> for (i = 1; i < argc; i++)
> if (CONST_STRNEQ (argv[i], "--sysroot="))
> - return argv[i] + strlen ("--sysroot=");
> + path = argv[i] + strlen ("--sysroot=");
Should this break out?
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."