public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: Joel Sherrill <joel@rtems.org>
Cc: Newlib <newlib@sourceware.org>
Subject: Re: [PATCH] newlib: libm: workaround ar duplicate member behavior
Date: Mon, 21 Feb 2022 17:12:02 -0500	[thread overview]
Message-ID: <YhQOMi6aIUcXqHU+@vapier> (raw)
In-Reply-To: <CAF9ehCUdDQk20r_6EcPkUGfMxECun=qZo5fpxA5Q5W=iRUe36A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 703 bytes --]

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.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-02-21 22:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12 20:34 [PATCH] newlib: libm: merge build up a directory Mike Frysinger
2022-02-16  8:50 ` [HEADSUP] " Corinna Vinschen
2022-02-16  9:40   ` Sebastian Huber
2022-02-16 10:48     ` Corinna Vinschen
2022-02-17  4:38   ` Mike Frysinger
2022-02-17  4:42 ` [PATCH v2] " Mike Frysinger
2022-02-17 12:08   ` Corinna Vinschen
2022-02-21 11:20   ` Corinna Vinschen
2022-02-21 18:00     ` Mike Frysinger
2022-02-21 18:04       ` Jon Turney
2022-02-21 18:30         ` Mike Frysinger
2022-02-21 19:12           ` Jon Turney
2022-02-21 19:24             ` Corinna Vinschen
2022-02-21 20:30               ` Mike Frysinger
2022-02-21 20:31         ` Mike Frysinger
2022-02-21 18:28       ` Mike Frysinger
2022-02-21 20:43     ` [PATCH] newlib: libm: workaround ar duplicate member behavior Mike Frysinger
2022-02-21 20:51       ` Joel Sherrill
2022-02-21 22:12         ` Mike Frysinger [this message]
2022-02-21 22:14           ` Joel Sherrill
2022-02-22  0:21       ` [PATCH v2] " Mike Frysinger
2022-02-22 11:31         ` Corinna Vinschen
2022-02-22 12:34           ` Jon Turney
2022-02-22 17:17             ` Mike Frysinger
2022-02-23  8:56               ` Corinna Vinschen

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=YhQOMi6aIUcXqHU+@vapier \
    --to=vapier@gentoo.org \
    --cc=joel@rtems.org \
    --cc=newlib@sourceware.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).