From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by sourceware.org (Postfix) with ESMTPS id F38673858433 for ; Thu, 10 Feb 2022 19:18:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F38673858433 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-x834.google.com with SMTP id s1so6420604qtw.9 for ; Thu, 10 Feb 2022 11:18:40 -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=iMNhD/ps2VDOv9aZ0aTtwHqdRwgof7Wb8piQx66meCc=; b=XyBYKMIlWckIOPa5/7rdt0B3W0GMSUPwPLGrwux0wxoKWfwkbLzFF+kjwVB/HtGy/x pdXzeo+8/tqzxuJ/+Rw+yRngOb3WeaEYuZuyHwp65Bt3khcMevTmVkf8kzd99BLfvBLr pcNMeR7VlGQ5HtiBhkcv8bQqD/B441MXhjzxv5vMZXksdYE2zlpqiWhkUDoWR9hSOT7o 8sbZVGDqiVH//tjk3fzB3tyHIdCoej/AoX/G9KXJXmArdoI8En4t/VLZC1F5sYF7JT2D 8FDUPnbgYKOc6jf9taGcZm6fg3bfb+PUgw6ULsi/bJIpBIiIYbp5bTR1hOrXKFSNlAwJ ufag== 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=iMNhD/ps2VDOv9aZ0aTtwHqdRwgof7Wb8piQx66meCc=; b=LwfzzMt9lI7IyfftPVJKDu9tSq8LjwNDPCspQoA3NXHxTwUWAMeXmILSBIWTcCkATp DY/foxDCZFCgWKybVrHWysWWzmykvgpB3yNOOnG3lMYcjR5fyp7psd6rhsgsophaMsX1 +yZMNgXVaYKwPBGOWg0E3QOJydSPvrOmeRgZj4oufY2q90vL3XvAP+4VaPQE97M/gpUa KOJG16GyYvhNnIjN46WXVE0hPvGr8KgcSx4b3/RLKv+kqZVRcc8NCAvZgAzIiE+5eK6D NXO7OLHIuph3IOiLgdQQO10TOT0MfKmRm4F0nACAAr2j394a6eZeMh8tdb+dZ0mGJlLF mB+w== X-Gm-Message-State: AOAM5320tZmaAkdRsP6l0v+kL4XeKlGFrtI28z0lpXxKxKBPMsj/en/C XQ/0g3gjxlVuhpXsUPZQSQ24Aoj03/wwKbAI9nGvipI= X-Google-Smtp-Source: ABdhPJxIHZf8cwxfu9B7tYbw6vLQVifCPZgjd0MFObV/QGh4Rpuz1LMkilbRsxD8dYek4PalHOqcoMwL6vfnNULIuMg= X-Received: by 2002:ac8:7dd5:: with SMTP id c21mr5920620qte.367.1644520720471; Thu, 10 Feb 2022 11:18:40 -0800 (PST) MIME-Version: 1.0 References: <20220210055347.24825-1-vapier@gentoo.org> In-Reply-To: From: C Howland Date: Thu, 10 Feb 2022 14:18:29 -0500 Message-ID: Subject: Re: [PATCH] newlib: remove unused fenv flags To: newlib@sourceware.org X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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: Thu, 10 Feb 2022 19:18:42 -0000 On Thu, 10 Feb 2022 at 13:41, Mike Frysinger wrote: > On 10 Feb 2022 13:02, C Howland wrote: > > > On Feb 10 00:53, Mike Frysinger wrote: > > > > These look like they were just copied & pasted from > common/Makefile.am. > > > > The funcs in this dir are all stubs that don't actually call any math > > > > or builtin functions, and a simple compile shows they produce > identical > > > > object code. So delete to simplify the build rules. > > > > --- > > > > newlib/libm/fenv/Makefile.am | 3 -- > > > > newlib/libm/fenv/Makefile.in | 90 > +++--------------------------------- > > > > 2 files changed, 6 insertions(+), 87 deletions(-) > > > > > > > > diff --git a/newlib/libm/fenv/Makefile.am > b/newlib/libm/fenv/Makefile.am > > > > index 50b59004c17e..66755e394cb7 100644 > > > > --- a/newlib/libm/fenv/Makefile.am > > > > +++ b/newlib/libm/fenv/Makefile.am > > > > @@ -6,11 +6,8 @@ src = feclearexcept.c fe_dfl_env.c fegetenv.c > > > fegetexceptflag.c \ > > > > fegetround.c feholdexcept.c feraiseexcept.c fesetenv.c \ > > > > fesetexceptflag.c fesetround.c fetestexcept.c feupdateenv.c > > > > > > > > -lib_a_CFLAGS = -fbuiltin -fno-math-errno > > > > - > > > > noinst_LIBRARIES = lib.a > > > > lib_a_SOURCES = $(src) > > > > -lib_a_CFLAGS += $(AM_CFLAGS) > > > > > > > > # A partial dependency list. > > > > > > > > -- > > > > 2.34.1 > > > > > > Ok. > > > > No, not OK, it doesn't sound like. The fenv functions are all > > machine-specific and the files in the libm/fenv directory are all stubs > > (which they clearly state internally). Unless all targets were checked > > (and it doesn't sound like they were), the conclusion is faulty that no > > difference happens. Taking away -fbuiltin would definitely break any > > machine source relying on it, but not the stubs. > > you seemed to be confused as to how this works. there is no machine code > here. there are only stubs. machine code lives under libm/machine/$arch/, > not under libm/fenv/. compiler flags in one directory only affects files > in that one directory, they don't propagate out to every other directory in > the build. > > i'll also note that none of the machine code explicitly uses -fno-builtin. > there is a configure option for it that affects all newlib files instead. > > so either cite exactly what doesn't work, or withdraw your objection > please. > -mike > Granted, I might be confused as to how this works. I am aware of the code in the machine directories. What I am not familiar with is whether the flags in the main tree propagate to the machine directories in any way, and I thought it would, in possibly 2 ways. 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. 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. Craig