From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 974243858408 for ; Mon, 21 Feb 2022 22:12:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 974243858408 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Received: by smtp.gentoo.org (Postfix, from userid 559) id 12432342F07; Mon, 21 Feb 2022 22:12:02 +0000 (UTC) Date: Mon, 21 Feb 2022 17:12:02 -0500 From: Mike Frysinger To: Joel Sherrill Cc: Newlib Subject: Re: [PATCH] newlib: libm: workaround ar duplicate member behavior Message-ID: Mail-Followup-To: Joel Sherrill , Newlib References: <20220221204327.2945-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s6KkvxsgOGVsDoFH" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Feb 2022 22:12:04 -0000 --s6KkvxsgOGVsDoFH Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 21 Feb 2022 14:51, Joel Sherrill wrote: > Could this be de-duped with the gnu make sort command? That would avoid t= he > copy. >=20 > 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, a= nd 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 --s6KkvxsgOGVsDoFH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIUDjIACgkQQWM7n+g3 9YGKZRAAvEHS9MfV4pZLblTD4gbj+bR6fiGpw8oMZZedg9wka/FiNjhx9w1YTGYH 3J4Ndq37xIQADWMn1AkqDOndzLuST301GPUH+pHjtNh+Jyn40l9Ne40k7At8sSy9 O5gHjHRlDsKq75gWr8usJ5CYmYorOW3AWHj7F/9oCC7aAw4Xz+nY6P2Rzjxr+z03 NnNh3b7CZym1aAHJa93SmkmKf26cV7jNszoLdqPK2KHYW7l4Wj0cj5jG2kJbEIpb nzq8y2dz6qpVkOCzy9lugEJnrQigZXGgGt/npKXKU+gTdhquR8otVgkhDrIFGzfV 8MTmSb/zRlcYjgPq5QpBu7JO8EgeRGyif+KarlW9c8Mqet5FI8YBjFUWyTfwQV+6 o8JJ1qBtGFdD0VFceu2gQTXV5a9dSaMerxWNNy2oFP5CqlWX1RfIPFxLsSNm3aQI yTWfpMDnEcJiWkupyJPt+BWj99HHU5LpEGH2SVbwh6gEKOQJzG1dJi5K/fmzxY2k zsEA8p7is1CAWZwBOYd2gKLRllVEeyxv+Bal+XKARZXAmxRkjYWVcTGcBxWSoAu3 p+I2YRlZe3swVa3ryuDGLnqXDm1n38Yvpl9pTUsjOp/8vOQJ6u5yER76kvdXjjuV zjUJcY+GUmXaWj7io+ac38WqTnANsuEWNwxJZ5xE+g8UgPrvR9E= =1K2q -----END PGP SIGNATURE----- --s6KkvxsgOGVsDoFH--