{"id":806629,"url":"http://patchwork.ozlabs.org/api/1.0/patches/806629/?format=json","project":{"id":41,"url":"http://patchwork.ozlabs.org/api/1.0/projects/41/?format=json","name":"GNU C Library","link_name":"glibc","list_id":"libc-alpha.sourceware.org","list_email":"libc-alpha@sourceware.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<alpine.DEB.2.20.1708281520170.13583@digraph.polyomino.org.uk>","date":"2017-08-28T15:20:34","name":"Simplify math-svid-compat code [committed]","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"a4b9037946757fa0ce79147b9a255cadd7114752","submitter":{"id":4349,"url":"http://patchwork.ozlabs.org/api/1.0/people/4349/?format=json","name":"Joseph Myers","email":"joseph@codesourcery.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/glibc/patch/alpine.DEB.2.20.1708281520170.13583@digraph.polyomino.org.uk/mbox/","series":[{"id":192,"url":"http://patchwork.ozlabs.org/api/1.0/series/192/?format=json","date":"2017-08-28T15:20:34","name":"Simplify math-svid-compat code [committed]","version":1,"mbox":"http://patchwork.ozlabs.org/series/192/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/806629/checks/","tags":{},"headers":{"Return-Path":"<libc-alpha-return-83789-incoming=patchwork.ozlabs.org@sourceware.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list libc-alpha@sourceware.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-83789-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"MXFTzQ5g\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xgwTD3Jf7z9sNn\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 01:21:04 +1000 (AEST)","(qmail 79122 invoked by alias); 28 Aug 2017 15:20:58 -0000","(qmail 73483 invoked by uid 89); 28 Aug 2017 15:20:54 -0000"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:subject:message-id:mime-version\n\t:content-type; q=dns; s=default; b=Y6ab1CteNIEm8bPYwWhuCVoh2Vonz\n\tMxmWSFgsoPorAPnjitYfoTSkQJwqHzvJrB9ueRWLnSTf8FIUJeobcRtv5K96+svx\n\t648D/BcODqyKGneWRON8D38unzZ/FI9lILWg8RX3QEzU+qrpnuZA/e55BdQVKlnL\n\tCOVhbw/ytg17KE=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:subject:message-id:mime-version\n\t:content-type; s=default; bh=T8ldLZsQ995dXeM5Ui0ahHUY7ac=; b=MXF\n\tTzQ5g46/1K0p+YqKRuHvP9OEJ7MqyKxHKZGWZlbp5mLUX2d2cRxmeYlNo1M4S9q7\n\t2zGnGs5TKQ0UUCA5c/nLokyj/zxtl0xnByrSIxtAHwVCEYHcAlnHAFDV8rWyQyuR\n\tdIc9nslT7g637+VqXuUSdopNJg7rxmcfVjfQpsL4=","Mailing-List":"contact libc-alpha-help@sourceware.org; run by ezmlm","Precedence":"bulk","List-Id":"<libc-alpha.sourceware.org>","List-Unsubscribe":"<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>","List-Subscribe":"<mailto:libc-alpha-subscribe@sourceware.org>","List-Archive":"<http://sourceware.org/ml/libc-alpha/>","List-Post":"<mailto:libc-alpha@sourceware.org>","List-Help":"<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>","Sender":"libc-alpha-owner@sourceware.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-24.5 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tRCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=SING, 1995, jtc","X-HELO":"relay1.mentorg.com","Date":"Mon, 28 Aug 2017 15:20:34 +0000","From":"Joseph Myers <joseph@codesourcery.com>","To":"<libc-alpha@sourceware.org>","Subject":"Simplify math-svid-compat code [committed]","Message-ID":"<alpine.DEB.2.20.1708281520170.13583@digraph.polyomino.org.uk>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"US-ASCII\"","X-ClientProxiedBy":"svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1)"},"content":"Now there are no more assembly wrappers using _LIB_VERSION or\n__kernel_standard, the math-svid-compat code can be slighly\nsimplified.  math-svid-compat.h no longer needs __ASSEMBLER__\nconditionals, and the _LIB_VERSION variable no longer needs to be\nbuilt for static libm, since all references are now in C code that\nincludes math-svid-compat.h and so gets the macro definition of\n_LIB_VERSION to _POSIX_ outside the compat case.  This patch makes\nthose cleanups.\n\nTested for x86_64, and with build-many-glibcs.py.  Committed.\n\n2017-08-28  Joseph Myers  <joseph@codesourcery.com>\n\n\t* math/math-svid-compat.h [!__ASSEMBLER__]: Make code\n\tunconditional.\n\t* sysdeps/ieee754/s_lib_version.c [!defined SHARED]: Remove\n\tconditional code; define contents only for [LIBM_SVID_COMPAT].","diff":"diff --git a/math/math-svid-compat.h b/math/math-svid-compat.h\nindex 284cc13..67acedc 100644\n--- a/math/math-svid-compat.h\n+++ b/math/math-svid-compat.h\n@@ -19,7 +19,6 @@\n #ifndef\t_MATH_SVID_COMPAT_H\n #define\t_MATH_SVID_COMPAT_H\t1\n \n-#ifndef __ASSEMBLER__\n /* Support for various different standard error handling behaviors.  */\n typedef enum\n {\n@@ -49,37 +48,34 @@ struct exception\n extern int matherr (struct exception *__exc);\n extern int __matherr (struct exception *__exc);\n \n-# define X_TLOSS\t1.41484755040568800000e+16\n+#define X_TLOSS\t1.41484755040568800000e+16\n \n /* Types of exceptions in the `type' field.  */\n-# define DOMAIN\t\t1\n-# define SING\t\t2\n-# define OVERFLOW\t3\n-# define UNDERFLOW\t4\n-# define TLOSS\t\t5\n-# define PLOSS\t\t6\n+#define DOMAIN\t\t1\n+#define SING\t\t2\n+#define OVERFLOW\t3\n+#define UNDERFLOW\t4\n+#define TLOSS\t\t5\n+#define PLOSS\t\t6\n \n /* SVID mode specifies returning this large value instead of infinity.  */\n-# define HUGE\t\t3.40282347e+38F\n-#endif\n+#define HUGE\t\t3.40282347e+38F\n \n /* The above definitions may be used in testcases.  The following code\n    is only used in the implementation.  */\n \n #ifdef _LIBC\n-# ifndef __ASSEMBLER__\n /* fdlibm kernel function */\n extern double __kernel_standard (double, double, int);\n extern float __kernel_standard_f (float, float, int);\n extern long double __kernel_standard_l (long double, long double, int);\n-# endif\n \n # include <shlib-compat.h>\n # define LIBM_SVID_COMPAT SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_27)\n # if LIBM_SVID_COMPAT\n compat_symbol_reference (libm, matherr, matherr, GLIBC_2_0);\n compat_symbol_reference (libm, _LIB_VERSION, _LIB_VERSION, GLIBC_2_0);\n-# elif !defined __ASSEMBLER__\n+# else\n /* Except when building compat code, optimize out references to\n    _LIB_VERSION and matherr.  */\n #  define _LIB_VERSION _POSIX_\ndiff --git a/sysdeps/ieee754/s_lib_version.c b/sysdeps/ieee754/s_lib_version.c\nindex f11d1c3..40f708d 100644\n--- a/sysdeps/ieee754/s_lib_version.c\n+++ b/sysdeps/ieee754/s_lib_version.c\n@@ -24,12 +24,7 @@ static char rcsid[] = \"$NetBSD: s_lib_version.c,v 1.6 1995/05/10 20:47:44 jtc Ex\n  * define and initialize _LIB_VERSION\n  */\n #undef _LIB_VERSION\n-#if LIBM_SVID_COMPAT || !defined SHARED\n-_LIB_VERSION_TYPE _LIB_VERSION_INTERNAL = _POSIX_;\n-#endif\n #if LIBM_SVID_COMPAT\n+_LIB_VERSION_TYPE _LIB_VERSION_INTERNAL = _POSIX_;\n compat_symbol (libm, _LIB_VERSION_INTERNAL, _LIB_VERSION, GLIBC_2_0);\n-#elif !defined SHARED\n-/* For use in .S wrappers.  */\n-weak_alias (_LIB_VERSION_INTERNAL, _LIB_VERSION)\n #endif\n","prefixes":[]}