[PATCH] newlib: libm: workaround ar duplicate member behavior

Joel Sherrill joel@rtems.org
Mon Feb 21 22:14:43 GMT 2022


On Mon, Feb 21, 2022, 4:12 PM Mike Frysinger <vapier@gentoo.org> wrote:

> On 21 Feb 2022 14:51, Joel Sherrill wrote:
> > Could this be de-duped with the gnu make sort command? That would avoid
> the
> > copy.
> >
> > Alternatively, I see some awk one liners on the web to uniq the set. Or
> > just invoke uniq.
>
> the inputs need to be deduped based on basename and the order specified.
> so
> i'd build a hashmap/associative array from the basename to the full path,
> and
> then output the resulting set.
>
> this isn't something sort/uniq can accomplish.
>
> it is possible to do in awk, i've just been a bit shy about using it as i'm
> not confident in portability aspects (beyond POSIX).  if we agree POSIX is
> fine (which, for newlib, i think is OK), then yes, we can do that.
>

That's not my call. If GCC needs awk, we really haven't added much of a
dependency.

--joel

-mike
>


More information about the Newlib mailing list