From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by sourceware.org (Postfix) with ESMTPS id 63E8C3858D1E for ; Tue, 21 May 2024 16:54:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 63E8C3858D1E 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 63E8C3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1035 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716310482; cv=none; b=E/BAyAvCVFVAoxPZRacskGC7550MbTdsqLh175u5p4ZwaP1+rQb7gxOJd1zS4Kr9GRdKkoxruM1Dl4kvcvGP2RC4PIsJj/oLiuWWj8Lj6fYmmIq1tFU2p3psUY35fA+haXWXXv2cnPESEu7zHNrbYcJo4ms61YWDggGQoRyUgfg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716310482; c=relaxed/simple; bh=nXOctILiUfkFq97jCJDBlhc4gpCSpv6malavqztphls=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JpbkD3xs8TOlC0uWFDY7/QiMeOHqF6F3UdfdzGyUbGR7yaiZviX2rSiC2mTeDPyXZKDuVAbUXX/62n+xFdjGEmcSdO8gSK9kK4cLfFMGRQNgs3vR4qHvdSmrRr0/4QkJxsXcsNXbOk4runPdwywdJr3LfsoM3i82d4FtGYJDj8w= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2b37731c118so1396566a91.1 for ; Tue, 21 May 2024 09:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716310476; x=1716915276; 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=ydeZ4ZztqLYjkQK/zDyjG9ZLwQgOBzYVntXDnfZCBy4=; b=BBFBp//slBwMjlGcCamMlkJjUqLkKwzcx7nm3dEOi0yYTiZm037K+1VqIA5JcpotC0 obrFveWTaFMfTt4/5ja9x4NwkH4eVf+91Dgl0UedpUJMy2T7/BVVI/i7lcNmwhBGnQhm kWbapogQxOUgHC6gfR/cv7q25EXhnxd9G0kY+WIiMaP8E2MLCm1bObSRFTWZmZepGuWD fM5/l7NvKdts+88+m5Ki72OOC/uHx+w5WqTlsLpPGoRWefeoOMirvzfT2PVCT9dvY4fJ 9unXZ881TY+GCZrq4X0LhffmIo6YGciMByKAz8c+Ptcjp7YRHdrAvCTWS4aQmU7rmGe8 uy2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716310476; x=1716915276; 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=ydeZ4ZztqLYjkQK/zDyjG9ZLwQgOBzYVntXDnfZCBy4=; b=e557zCwCa2874+JXMhDGRwUlzKVbPkiLlhl9cW+iy256mFVKUsgItSNzW7KqpW4Tjm ThcVLvkbrVN/I/XKdxPfkhnt3LHtYbQNVdyZgcBNBKRdpsLJiZKWbDIc5zqjujOXgGQl 5UXAE9sKktxfIdHrEUEjm0x3U7MYFFBpkqwwC2f3NWoRAd3Bgt0aoqunT1W0h0GChW2W F4W+9Uyc78sBUqEUid7hBn/1Q850DHgerHlm45zjwTs0xh7y0TpRuJZ3VefYK9wOnODS 2WXph79+Pe2w9FpIKbeNtKzETciGNMPDRmG/NxMjPcMhWE6ekzCLgju5DpQ3mSZkYuJn y+Vg== X-Gm-Message-State: AOJu0YyNvcG8uC5zmIpmghPOVOaXbRTf2Ut695n35IfcbNO8wuvjjVFU iSCBDuj6CCk3qG9bb8VPcytJ3eiIFCE58SctUmxx2oF5QkU/jCelk3EFNwsw3eDtixTo3mJCT1L T X-Google-Smtp-Source: AGHT+IHrz5Dh6frCnMnjPnfQQjeNWOi5srOUU8X4wBCrbyhgwFYqgG7K7kMLgluI0pCq/C0uqttFEQ== X-Received: by 2002:a17:90a:de92:b0:2b5:6d47:9e12 with SMTP id 98e67ed59e1d1-2b6cc34035cmr27488059a91.2.1716310475876; Tue, 21 May 2024 09:54:35 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:f76a:a4a6:1329:be7a:c724]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2bd92b3d2b0sm1620774a91.3.2024.05.21.09.54.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 09:54:35 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: "H . J . Lu" Subject: [PATCH v4 0/5] Improve libm.a static coverage Date: Tue, 21 May 2024 13:52:52 -0300 Message-ID: <20240521165430.2998944-1-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 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, this is done with a new define that can be used with make check (build-math-static-tests). 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: x86_64-linux-gnu$ grep ^FAIL math/subdir-tests.sum FAIL: math/test-float64x-acos-static FAIL: math/test-float64x-log10-static FAIL: math/test-float64x-log2-static FAIL: math/test-float64x-y0-static FAIL: math/test-float64x-y1-static FAIL: math/test-ldouble-acos-static FAIL: math/test-ldouble-log10-static FAIL: math/test-ldouble-log2-static FAIL: math/test-ldouble-y0-static FAIL: math/test-ldouble-y1-static i686-linux-gnu$ grep ^FAIL math/subdir-tests.sum FAIL: math/test-double-atanh-static FAIL: math/test-float-atanh-static FAIL: math/test-float32-atanh-static FAIL: math/test-float32x-atanh-static FAIL: math/test-float64-atanh-static FAIL: math/test-float64x-acos-static FAIL: math/test-float64x-acosh-static FAIL: math/test-float64x-atanh-static FAIL: math/test-float64x-log10-static FAIL: math/test-float64x-log2-static FAIL: math/test-float64x-y0-static FAIL: math/test-float64x-y1-static FAIL: math/test-ldouble-acos-static FAIL: math/test-ldouble-acosh-static FAIL: math/test-ldouble-atanh-static FAIL: math/test-ldouble-log10-static FAIL: math/test-ldouble-log2-static FAIL: math/test-ldouble-y0-static FAIL: math/test-ldouble-y1-static The powerpc64le also shows multiple issues with the static linking (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). I also tested this patchset with build-math-static-tests=yes for all ABIs, and there is not more build failures. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=20845 Adhemerval Zanella (5): math: Add support for auto static math tests math: Fix isnanf128 static build (BZ 31774) 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 Makeconfig | 5 + Makefile.help | 4 + math/Makefile | 120 +++++++++++++++++++++- 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/ieee754/float128/s_isnanf128.c | 4 + 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 +- 16 files changed, 143 insertions(+), 11 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 -- 2.43.0