From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id BF39F1F44D for ; Wed, 27 Mar 2024 19:41:00 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=lD0oziCZ; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E9AE2385B532 for ; Wed, 27 Mar 2024 19:40:59 +0000 (GMT) Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id C311A3858D34 for ; Wed, 27 Mar 2024 19:40:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C311A3858D34 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C311A3858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1029 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568433; cv=none; b=iyNIDUr/CYMPD/P1i7ezxF7oeaBLNY4ho/RlqgqFcnRjIFu1SRk+Isch+3Y2kNszFWUoVkL0THZBQ6/hKheBa/Y6EljA+mpEk0coFMMi6fCuUQRPY0XFPnvQOKX/Pfdu3DVG91g4gYWeG7sX2AzwnVGVwZD+YYSc/+TGMOjiDDQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711568433; c=relaxed/simple; bh=EHnyytP6+ZGW+aC0q3eeJNpVFyc+yZFx/uyt1K+nb0M=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=XrLYKE8RYl1JGvBkMgJXpU1R0tr+vLAuGeUYc7qPl+GjYsVzLbwOMGFtI3Ewdj4thLp6YJzO8JvIl1gp5KPfQ/HxibJFatMM+horqTDNyAWdq59y51xjMKWXB5r25YPrpgHuhEe9RzQhIE9uAnKsdNEwgTa9mJUbDXNgdrZulyo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-29c14800a7fso178843a91.2 for ; Wed, 27 Mar 2024 12:40:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711568429; x=1712173229; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TKEFr85lufbOCyqJ88dpFK06fvQtqp0Rk97D7S4BRnM=; b=lD0oziCZm8Pc4dPUL7hTr3bPTJcJIYII6GYPnfUhKLkr/+r29H5b6znEFycZ8jO2gI f1qVkYHO0DxEzj70vo2BgLbLRfjHOhkpQctOO7YOFRF+nI/YEsrOEhn/tHhfe9271pIz i4Jby5vQS+B+8Q2XhyDnalTzQ5K51Q0LCZ0Supld1/MD/JK8ruSli5YCtGjfW3FHRK3q evVVlY+6bjBri/gc3E6ioNeAX3gM5SuhSzEH0bkCspovDucBvvEChqO/WH+7pp2y6e26 Sx7j9RwOvF83EvAFXDgoqx3bYmH07uAnsm5fva6hO8hn01Bc2hq8ToSshAvnXqYXxWAg 2OwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711568429; x=1712173229; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TKEFr85lufbOCyqJ88dpFK06fvQtqp0Rk97D7S4BRnM=; b=CGMDH/nPnvSE5bqp0Yz6jvEBQrWZOrbrrs4usJAvPHiEt6ycYMCpAq+eq3JPDLeKRk 0SZJiZ+zzu7rvsGK+7AdsCRqI11nAwPJo7Q52/gesn1jQXvbAUK4fnhtPwc39qq1Oo6y IIjl7bL7sFbVX1FtNHkpd8CLe1dJrRtxpr7EzpWTI6fIjXZM3D/1ODfDGwzHxnbzaMHZ KJXfCaX2p8vE3L/Bd/v7sO/vVjiL/8WrSd3bTmOCmz+B7IlOApgMtzANRQmTadJk3WyV OlIOH8jOuLgQzpx9BVnDlsiggfeNvhRbVTzj/J8jMOWcOpY+d2ku/2LvlBwQhrkSymy4 HmNg== X-Gm-Message-State: AOJu0YwiyEG448zz0NBvGullOmCft69clL18oh1OVKpn7xddzeWen+Rr 8Gl5O9hjL6JGC7CSNxPoM8xIJcQA+wUAp3L/xztZSwh7mW1egbp2jGuGcMPoz3xdO4TnA/76i5K / X-Google-Smtp-Source: AGHT+IGRKrDH5G0QBA4a9yYfC8EAyesSt68Yka5f07/fF3PuIqOoDOw7mrm80geM4aFjMaNdjD5fCg== X-Received: by 2002:a17:90a:4297:b0:2a0:d24:6cbf with SMTP id p23-20020a17090a429700b002a00d246cbfmr639210pjg.36.1711568429113; Wed, 27 Mar 2024 12:40:29 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id p11-20020a17090a348b00b002a091be027esm2277357pjb.31.2024.03.27.12.40.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 12:40:28 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH v2 00/10] Fix some libm static issues Date: Wed, 27 Mar 2024 16:40:14 -0300 Message-Id: <20240327194024.1409677-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Some recent math optimizations removed some symbols from the static build and due to the limited static build check, along with --disable-shared being broken for some time [1]; this issue has slipped some releases. Although the fix is straightforward, I added an extra framework to enable static build for select math libraries using the generic type framework (which autogenerated the tests for all supported types using the C template files). I have not enabled it for all tests due to the required extra size constraint, maybe a future ---enable-static-math-tests configure option could improve test coverage. As an experiment, I enabled static build for all autogenerated math tests. This has uncovered some extra missing symbols on some ABIs, along with some issues with implementation used on static for some ABIs. On x86_64/i686 it shows that the assembly optimizations for acos, log10, log2, and ldbl-96 y0/y1 show some issues. I tested this patchset on x86_64, i686, armhf, aarch64, and powerpc64le. The powerpc64le shows some issues with the static linking, due to the newly enabled tests (using gcc 13.1): FAIL: math/test-float128-exp10-static FAIL: math/test-float64x-exp10-static FAIL: math/test-ibm128-acos-static FAIL: math/test-ibm128-copysign-static FAIL: math/test-ibm128-exp10-static FAIL: math/test-ibm128-fmod-static FAIL: math/test-ibm128-frexp-static FAIL: math/test-ibm128-modf-static I have not analyzed what is happening, but it might be due to the '-mabi=ibmlongdouble' along with how libgcc.a was built (I saw some issues on GCC bugzilla). One option could be XFAIL for now. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=20845 Adhemerval Zanella (10): math: Add support for auto static math tests math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) i386: Use generic fmod i386: Use generic fmodf math: Fix i386 and m68k exp10 on static build i386: Use generic exp10 math: Fix isnanf128 static build math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 math: Provide frexpf128 for static libm on alpha, s390, and sparcv9 math: Provide modf128 for static libm on alpha, s390, and sparcv9 math/Makefile | 111 +++++++++++++++++++- math/test-double-static.h | 1 + math/test-float-static.h | 1 + math/test-float128-static.h | 1 + math/test-float32-static.h | 1 + math/test-float32x-static.h | 1 + math/test-float64-static.h | 1 + math/test-float64x-static.h | 1 + math/test-ibm128-static.h | 1 + math/test-ldouble-static.h | 1 + sysdeps/i386/fpu/Versions | 5 + sysdeps/i386/fpu/e_exp10.S | 51 --------- sysdeps/i386/fpu/e_exp10.c | 2 + sysdeps/i386/fpu/e_exp_data.c | 1 - sysdeps/i386/fpu/e_fmod.S | 18 ---- sysdeps/i386/fpu/e_fmod.c | 2 + sysdeps/i386/fpu/e_fmodf.S | 18 ---- sysdeps/i386/fpu/e_fmodf.c | 2 + sysdeps/i386/fpu/math_err.c | 1 - sysdeps/i386/fpu/w_exp10_compat.c | 3 - sysdeps/i386/fpu/w_fmod_compat.c | 14 --- sysdeps/i386/fpu/w_fmodf_compat.c | 14 --- sysdeps/ieee754/dbl-64/e_exp10.c | 7 +- sysdeps/ieee754/dbl-64/e_fmod.c | 5 +- sysdeps/ieee754/float128/float128_private.h | 2 +- sysdeps/ieee754/float128/s_isnanf128.c | 4 + sysdeps/ieee754/flt-32/e_fmodf.c | 5 +- sysdeps/ieee754/ldbl-64-128/s_copysignl.c | 4 +- sysdeps/ieee754/ldbl-64-128/s_frexpl.c | 4 +- sysdeps/ieee754/ldbl-64-128/s_modfl.c | 4 +- sysdeps/ieee754/ldbl-opt/s_ldexpl.c | 4 +- sysdeps/m68k/m680x0/fpu/w_exp10_compat.c | 9 +- sysdeps/m68k/m680x0/fpu/w_fmod_compat.c | 5 +- sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c | 7 +- sysdeps/mach/hurd/i386/libm.abilist | 3 + sysdeps/unix/sysv/linux/i386/libm.abilist | 3 + 36 files changed, 175 insertions(+), 142 deletions(-) create mode 100644 math/test-double-static.h create mode 100644 math/test-float-static.h create mode 100644 math/test-float128-static.h create mode 100644 math/test-float32-static.h create mode 100644 math/test-float32x-static.h create mode 100644 math/test-float64-static.h create mode 100644 math/test-float64x-static.h create mode 100644 math/test-ibm128-static.h create mode 100644 math/test-ldouble-static.h delete mode 100644 sysdeps/i386/fpu/e_exp10.S create mode 100644 sysdeps/i386/fpu/e_exp10.c delete mode 100644 sysdeps/i386/fpu/e_exp_data.c delete mode 100644 sysdeps/i386/fpu/e_fmod.S create mode 100644 sysdeps/i386/fpu/e_fmod.c delete mode 100644 sysdeps/i386/fpu/e_fmodf.S create mode 100644 sysdeps/i386/fpu/e_fmodf.c delete mode 100644 sysdeps/i386/fpu/math_err.c delete mode 100644 sysdeps/i386/fpu/w_exp10_compat.c delete mode 100644 sysdeps/i386/fpu/w_fmod_compat.c delete mode 100644 sysdeps/i386/fpu/w_fmodf_compat.c -- 2.34.1