Re: [PATCH] newlib: libm: workaround ar duplicate member behavior
Mike Frysinger <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <YhQOMi6aIUcXqHU+@vapier> |
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
signature.asc
(application/pgp-signature, 833 B)
-----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-----