Simplify --sysroot=/
Alan Modra
amodra@gmail.com
Mon Oct 29 09:34:00 GMT 2018
On Mon, Oct 29, 2018 at 10:22:03AM +0100, Andreas Schwab wrote:
> 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?
No, that's a bug fix. Pick the last --sysroot. I probably should
have mentioned that in the ChangeLog.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list