Re: [PATCH] newlib: libm: workaround ar duplicate member behavior
Joel Sherrill <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CAF9ehCWK6r9Qv90-Xq7WddX68i5Vfw=ffBcoDaSXioSrYHFJqQ@mail.gmail.com> |
On Mon, Feb 21, 2022, 4:12 PM Mike Frysinger <[email protected]> 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 >