From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) by sourceware.org (Postfix) with ESMTPS id 2D05D3858408 for ; Mon, 21 Feb 2022 22:14:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2D05D3858408 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rtems.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f43.google.com with SMTP id w27so3378683lfa.5 for ; Mon, 21 Feb 2022 14:14:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to; bh=TJk4CrOGw/rS9rBRLL9ZxOJ3SQIQzLxgNbq71zXEYa4=; b=B0sMFJRPc6Ec24fShbLS/E1m2mKB872PTL6EFAttTf8vBhVVhPYKkiluEgOPMUPtzF 5D4KeYXuuYfdwjrdjFJq9J+KpJIYSSse7luD1gVhrsHPnpx4tjFRhwiVqvMnIKOt+e3D HnBm58BVyITZExOC3uFtKslEBSrp+KwaTDKSpT9bvsipk0slTv8Dz8Lu8E9T7wZiRckf aNDo6boNCTSu1uwD1SeNvlUOtbdJ/8bvi8iUuC8gIDj5++ten/cwe8dSxbqDAqEUQemt zcmQBbOQOM6pzRWHbFa4yqVNP02lnyBdsTKbM+kyUvIvD0ovbEwy+2OgzWHopYz+mhXc y8Pg== X-Gm-Message-State: AOAM533WMwppWCjdiQjk8PlfbZA1kZdc2rLzMPSYioN2fGBtLgqn2lCr GS4T2+MU2KcBmlY6vQV3C8CnGxC0st262Q== X-Google-Smtp-Source: ABdhPJw+Nt3UtZ2FSggLGivWpnTOyph6zu3nmOeFpeWf87hdSGz8B9m3KvZNnw1WKQSsuWJXOjS0Fg== X-Received: by 2002:a05:6512:a93:b0:442:5d43:7b21 with SMTP id m19-20020a0565120a9300b004425d437b21mr15463447lfu.427.1645481695609; Mon, 21 Feb 2022 14:14:55 -0800 (PST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id u7sm1213127lfr.282.2022.02.21.14.14.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Feb 2022 14:14:55 -0800 (PST) Received: by mail-lj1-f182.google.com with SMTP id t14so16628453ljh.8 for ; Mon, 21 Feb 2022 14:14:55 -0800 (PST) X-Received: by 2002:a05:651c:14f:b0:23d:8a2a:456d with SMTP id c15-20020a05651c014f00b0023d8a2a456dmr16281926ljd.196.1645481695255; Mon, 21 Feb 2022 14:14:55 -0800 (PST) MIME-Version: 1.0 References: <20220221204327.2945-1-vapier@gentoo.org> In-Reply-To: Reply-To: joel@rtems.org From: Joel Sherrill Date: Mon, 21 Feb 2022 16:14:43 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] newlib: libm: workaround ar duplicate member behavior To: Joel Sherrill , Newlib X-Spam-Status: No, score=-3031.8 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:14:58 -0000 On Mon, Feb 21, 2022, 4:12 PM Mike Frysinger 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 >