From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by sourceware.org (Postfix) with ESMTPS id 251C43858D1E for ; Fri, 11 Feb 2022 16:10:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 251C43858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-x833.google.com with SMTP id x5so9407973qtw.10 for ; Fri, 11 Feb 2022 08:10:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=pmuot3NcD/zhQzmpAT/1rd8xB6PmsGK5KZ8n6li3V7s=; b=di8JiRGz9PEX82GnGFFJ7MEAC1NkEaaM+9lsKcIyFgQbhI6sA92U02BUl+EcW6BOQ8 zADajRlAEzarHrLNk3psTz0kQX75mTSFWLIr5WQyYXKkSzIdLVaau2AIrXEcCUqQuJrG J1p5qmgxi0iNDhaPDKDPaawmtb+OfzEIQgEEG1e511LxjfvQKTvoJ8VwifZzV/t5NG+5 BFwrycppyjPguwWskl2FX+Ha9/9BX/897cNSr9w66GP4rUCwB6c8XNxiEz/I1LaeHI7A hcmvW7h7ougNidxfhMSMJ5xLkRJuJMClXZJuL+j5F8GwPPBjaK/XZ7/4wH/YO6x5vgOi KcTQ== 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:from:date :message-id:subject:to; bh=pmuot3NcD/zhQzmpAT/1rd8xB6PmsGK5KZ8n6li3V7s=; b=2p0U6sQrUT5M8ovHHrjtcBHXdEBMfX/kXsVKo9BKc8AC1hcN3QK8rbPclZ/GdxZtmQ yKaAolIf7dEgUsQC7OaVDc0RE1+0UfwP/POYBxtq+hYgOfuuuSV7WvyoVywqcl9bIUlq ixBih0cIQR1DBvwA6Fk3/1e/y4NhobRctBxFlapyuTGFrP3M5q8i34s7Sj/DsEny2/B0 Or2orQF5moGhoEMO+Jdu7YjNPg6vz1jiS8MsRIbCbrnS9U4PQ3B+aRL+BW/KDtSmdd1l WSeh38hypYIivWcJ0j2jZOtVOy0w2FVCHq1gfwo/eQztwLLJ3VWq6efm1wkHau0V9zzJ 2/5Q== X-Gm-Message-State: AOAM533QOBYx7EU65sEzEwYIHSDXfJvKiA8fNejP9kXVdvaelbmVCiIh XP/f6EWpHKvw7afm9U9m7+E+ED18HZKWF2WP8/tkqXI= X-Google-Smtp-Source: ABdhPJyXfq68VjqHxhP1P9M21vdJboT1LICnyqPIsOBkOyjMCFUhRnDYjzOVppu+wzNdGPyJ87R0khwvzDaEJWdYK74= X-Received: by 2002:a05:622a:11c1:: with SMTP id n1mr1622570qtk.128.1644595833610; Fri, 11 Feb 2022 08:10:33 -0800 (PST) MIME-Version: 1.0 References: <20220210055347.24825-1-vapier@gentoo.org> In-Reply-To: From: C Howland Date: Fri, 11 Feb 2022 11:10:22 -0500 Message-ID: Subject: Re: [PATCH] newlib: remove unused fenv flags To: newlib@sourceware.org X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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 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: Fri, 11 Feb 2022 16:10:36 -0000 On Fri, 11 Feb 2022 at 05:09, Mike Frysinger wrote: > On 10 Feb 2022 14:18, C Howland wrote: > > First, would be if a machine directory can override just some files > > from the main--as if viewpathed--and this can also apply to the makefile. > > (Does the machine directory totally replace the main branch directory, or > > can it be supplemental? My impression was a viewpath model, which can be > > supplementary or replace all.) If I'm wrong about this, no problem, no > > objection for this specific reason. > > assuming "viewpathed" means "VPATH in the makefile", then no, that's not > how > newlib works. that is how glibc works, so maybe you're thinking of that. > newlib compiles all objects in all subdirs in isolation. it then assembles > the final libm.a/libc.a in a specific order (with the machine dir last). > so > it adds fenv/*.o to libm.a by basename, then replaces any existing ones > with > machine/$arch/*.o. > Yes, I meant as in VPATH in a makefile with individual file granularity. So, yes, I was thinking not the right thing for newlib, sorry for conflating Newlib with other things. > > > The second is if the main branch is intended to also be a template > for > > new machine directories. The C part of it definitely is, but the > makefile > > does not necessarily fall into that category. So I'll turn that into a > > question: if the main branch makefile does not serve as a template for > the > > machine directories, where would that be? That is, while these arguments > > are superfluous in the main dir, should they remain in comments as an > aid > > to machine developers, in the same manner in which the source code is > > annotated? (It's not so much these specific arguments, themselves, but > > having an example how ones like this would be added. These particular > ones > > are reasonable for serving that purpose, however.) The real makefile > seems > > the best place for this. We could have Makefile.template, or something > > along those lines, but the real one is forced to be valid by being used, > > while maintaining a separate template would be additional maintenance > work. > > So if I'm wrong about the viewpathing model, a suggestion: rather > > than deleting the lines, comment them out and add some comment text > > suitable for a template. If you're amenable to this approach and would > > like, I (or possibly Joel if he's interested) could contribute suggested > > comments for you to use. > > this isn't specific to fenv/. you can make this argument against any of > the subdirs. > > even then, the use of -fbuiltin & -fno-math-errno kind of seem like the > opposite of what you're arguing. -fno-math-errno shouldn't be used in > general as it is an optimization that can break correctness wrt IEEE > standards. -fbuiltin probably shouldn't be applied to entire subdirs > without strict review since it allows the compiler to rewrite calls > that assume C library behavior, but the C library might be violating > those assumptions specifically as part of its implementation. > -mike > OK, neither you nor Joel think templating for the makefile to be of much use, that makes a majority in comments so far and I'll go along. (Since fenv is special and tricky I think we would be better off with better instructions for this one particularly, as it would encourage/help people to add new targets.) I agree that these specific compiler options do need care taken. But that's part of the reason they're good examples for the fenv environment, as that's a tricky subject that needs special attention and might need things like them. But at the same time I agree that they are also for the same reason potentially dangerous to suggest. (By the way, off the specific topic, but thanks for spending all the time on cleaning up the build process.) Craig