From patchwork Mon Mar 30 17:00:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 38658 Return-Path: X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by sourceware.org (Postfix) with ESMTPS id E1D21385BF86 for ; Mon, 30 Mar 2020 17:00:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E1D21385BF86 Received: by mail-qt1-x843.google.com with SMTP id i3so15673400qtv.8 for ; Mon, 30 Mar 2020 10:00:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=niLAG/wm9qU2vPIlOZo/uXCtKfHcRGcQ/+c6gDkDCSE=; b=KZaMAbmLg1LsZTevaO2G2UtGtjzD42VQ6QZtrhT+7WJtcAqI89ae5TSanZx2zO6val WILVXT0MdX83uU+J0vH43QXkGMFeyRcnBcnjz0rT50zqKCOMzR5rLP55UCZVgMW0ejjX 1vKNfY4aew9PlfaXodoYAkCZF1CsjlJeA6TZXfdnFAg41i6+Ommhnne4aACKmhuuLnOH Wf/CsMpP9oLco7pFW9OM1iy6/KbK3SBomsu8I580fZupVG8BGcmDk+KoZLP3xtbxi1IL uo/UPYTnSlM4jbPWYi1LxaDXpBc4oPc7gmSf/E7axr3r7eXBKOI962pZiQ4xe6CVJ0OO 7gyQ== X-Gm-Message-State: ANhLgQ3yADtmLDRR0MXStFhaL+4WrBhaWFGyLhAlHK4UeCKwyVevz07U YhjTSMn1PnbiS9wAbqcVas1y75WdTqo= X-Google-Smtp-Source: ADFU+vtBDRR5/DF/9mGlTOD7GpIaABzFV85mJrPBPZsm4b5jQTdQdwfteMLwt+4Vf5fpP0iTzVSBIg== X-Received: by 2002:aed:2be5:: with SMTP id e92mr967347qtd.374.1585587634668; Mon, 30 Mar 2020 10:00:34 -0700 (PDT) Received: from localhost.localdomain ([177.194.48.209]) by smtp.googlemail.com with ESMTPSA id x74sm10947797qkb.40.2020.03.30.10.00.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 10:00:34 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] Remove __NO_MATH_INLINES Date: Mon, 30 Mar 2020 14:00:30 -0300 Message-Id: <20200330170030.2313730-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-26.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 17:00:37 -0000 With fenvinline.h removal the flag is not used anymore. Checked on x86_64-linux-gnu. --- manual/math.texi | 6 ------ math/Makefile | 4 ---- math/README.libm-test | 8 +++----- math/math.h | 7 ------- math/test-tgmath.c | 2 -- math/test-tgmath2.c | 2 -- 6 files changed, 3 insertions(+), 26 deletions(-) diff --git a/manual/math.texi b/manual/math.texi index 4aaa106653..dcff7b7f41 100644 --- a/manual/math.texi +++ b/manual/math.texi @@ -2010,12 +2010,6 @@ might have a reduced precision and/or argument range in comparison with the library functions. The latter inline functions are only available if the flag @code{-ffast-math} is given to GNU CC. -In cases where the inline functions and macros are not wanted the symbol -@code{__NO_MATH_INLINES} should be defined before any system header is -included. This will ensure that only library functions are used. Of -course, it can be determined for each file in the project whether -giving this option is preferable or not. - Not all hardware implements the entire @w{IEEE 754} standard, and even if it does there may be a substantial performance penalty for using some of its features. For example, enabling traps on some processors forces diff --git a/math/Makefile b/math/Makefile index 1d6413a978..62667d9186 100644 --- a/math/Makefile +++ b/math/Makefile @@ -613,10 +613,6 @@ endef object-suffixes-left := $(all-object-suffixes) include $(o-iterator) -# We don't want the fdlibm code to use the inline math functions, -# only the fdlibm code. -math-CPPFLAGS += -D__NO_MATH_INLINES - ifneq ($(long-double-fcts),yes) # The `double' and `long double' types are the same on this machine. # We won't compile the `long double' code at all. Tell the `double' code diff --git a/math/README.libm-test b/math/README.libm-test index 28d7a2ed28..f32c629c6d 100644 --- a/math/README.libm-test +++ b/math/README.libm-test @@ -38,11 +38,9 @@ The test drivers "test-double-.c", "test-float-.c", and double, float and long double implementation of libm. Each driver selects the desired real floating type to exercise the math functions to test with (float, double, or long double) by defining a small set -of macros just before including the generic "libm-test.c" file. Each -driver also either defines or undefines the __NO_MATH_INLINES macro -just before including "libm-test-.c" to select either the real -or inline functions, respectively. Each driver is compiled into a -single executable test program with the corresponding name. +of macros just before including the generic "libm-test.c" file. Each +driver is compiled into a single executable test program with the +corresponding name. As mentioned above, the "gen-libm-test.py" script looks for a file named "libm-test-ulps" in the platform specific sysdep directory (or diff --git a/math/math.h b/math/math.h index 5c3dcb9194..777d108347 100644 --- a/math/math.h +++ b/math/math.h @@ -1257,13 +1257,6 @@ iszero (__T __val) # error "M_* values needed for _Float128x" #endif -/* When compiling in strict ISO C compatible mode we must not use the - inline functions since they, among other things, do not set the - `errno' variable correctly. */ -#if defined __STRICT_ANSI__ && !defined __NO_MATH_INLINES -# define __NO_MATH_INLINES 1 -#endif - #ifdef __USE_ISOC99 # if __GNUC_PREREQ (3, 1) /* ISO C99 defines some macros to compare number while taking care for diff --git a/math/test-tgmath.c b/math/test-tgmath.c index 1f72cc349a..6d5a84bc01 100644 --- a/math/test-tgmath.c +++ b/math/test-tgmath.c @@ -19,8 +19,6 @@ . */ #ifndef HAVE_MAIN -#undef __NO_MATH_INLINES -#define __NO_MATH_INLINES 1 #include #include #include diff --git a/math/test-tgmath2.c b/math/test-tgmath2.c index 91b93e6586..54f8284c67 100644 --- a/math/test-tgmath2.c +++ b/math/test-tgmath2.c @@ -18,8 +18,6 @@ . */ #ifndef HAVE_MAIN -#undef __NO_MATH_INLINES -#define __NO_MATH_INLINES 1 #include #include #include