From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 6F9603858D33 for ; Mon, 20 May 2024 16:31:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6F9603858D33 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 6F9603858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716222702; cv=none; b=d4njlrTBl5iIJoaDkjaEqcAkpCntlcpKloAq7mQY3vxlNLb4n88RAGC8WXRClLWhz2PG2KNsCYFDLVrXad7ahyLWselUD9Sgz4+UqyNwZaJObge8cODmDFy7BWukR2cq5TKHMunRJlwXJbF3czOgslfBCJYwQCcV8BvIv4i18AQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716222702; c=relaxed/simple; bh=d0TJexbJTFqMglqA4AFI6oi5aLq8DFzN/DhJtpRGKVY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To; b=YuZy+1ZMZiWRZt769iJUw4VmYUVYi9YIcQrnP/swZbnksqPTZ+ysfK+SEZFaFtC3qYztAcwW/+1W1U52F0Kn3MQMSpFwXVM3oXopYzXCeb+hhHa6mt7yz2fZwqxDVUoI6jFMk9VMAb/hzs1c3B9fH7LlG5hYSLkOgUhGLt1wHZw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1ee0132a6f3so81773495ad.0 for ; Mon, 20 May 2024 09:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716222699; x=1716827499; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=N+KzQB55fDvYltQ6NFxfLwg2pWg36RvRZvcEMPhkmfE=; b=GZhtCuAsU9lcDchsagl2yjBE0rdTfo2Qr5vtkOFAKDLjFGYK7HTGlg06vynXfrFBoC 4woybEgxv+IM5xFf/xfNWgC+nAAkDyJx7gRaXxikfamljmFw2gNMr7K70QlgV3k+xVCh Qd4l6QgR7eeb1/nMTyImKLEBSxaLlffecrMrMxOzykgLG2Eo8MyZ6LUSWLtzRElSZC65 ydz39qk0S0HjtnwjxZT0/9Tjm11qEjyPnJv7Vn1QkgL38bzvSmHrQ+57XPDmvzH4QP+A mtE7vu4apxBuskUnj9SazDWNyNTWWhFLbLfKYgP+cobifPOMlReZcZZR1H8zwRph7cdz 6lqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716222699; x=1716827499; h=content-transfer-encoding:in-reply-to:organization:content-language :references:cc:to:from:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=N+KzQB55fDvYltQ6NFxfLwg2pWg36RvRZvcEMPhkmfE=; b=wIph6/Pqi3n5BZ/9u2GB6Je2izyAU1yF8xsh1dninojTgp3t4tG823Vc1Sib+Vek/f m1s/OoTK66ViO9cbIuoKSoBkMSJVIlSiDwYgiK8FXiDKpLyu5U+2/Da4KebsGFhjpwbf tOqph4oQvXMyeoonlY0c2oufsxBYEtH2HhKS+KYvCb8ZSR/NojxQuWjRJqMhYUnHuTZ+ xLLkOIAINTrS6y63C0RZ+wOMzQ0lrAEs6gYDPGyNGIyr6Af4p72vYXIjgAt4eJ2xud+2 O7gJYylJ0+UCskDtFCwlxYloyT/cHxo2fon8A42CZTDSgHu4NG6UVxHSyFtZzJEVaW7L sjxA== X-Gm-Message-State: AOJu0YzV4khbefOUvw/bDAo0XljD9czUjjIaJoZpecELcTydjeEKtv5s o9X0F5u54qEhbTfG8462HFHlVeaumavIZvb8Jxrgd1+mujKyVGx33w165I4I5leghBpjgSH92Hl 8 X-Google-Smtp-Source: AGHT+IEOfALV8ZjtKJcSdpkpu7/dXqTr4jHwXQHCOlJQUY/Fqb8Wc0+vcbwvYdDcqHlFMj73Nhp7xQ== X-Received: by 2002:a17:902:ce86:b0:1e9:43c:d176 with SMTP id d9443c01a7336-1ef43c0cf35mr355258925ad.12.1716222698987; Mon, 20 May 2024 09:31:38 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c2:f76a:4d8e:551e:8ee4:7221? ([2804:1b3:a7c2:f76a:4d8e:551e:8ee4:7221]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f2fb7a1ae3sm27288925ad.299.2024.05.20.09.31.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 May 2024 09:31:38 -0700 (PDT) Message-ID: Date: Mon, 20 May 2024 13:31:35 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 0/7] Fix some libm static issues From: Adhemerval Zanella Netto To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" References: <20240402140644.2172819-1-adhemerval.zanella@linaro.org> Content-Language: en-US Organization: Linaro In-Reply-To: <20240402140644.2172819-1-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.7 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: Ping on this serie (the 2/7 and 3/7 were already reviewed). On 02/04/24 11:06, Adhemerval Zanella wrote: > 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 (7): > math: Add support for auto static math tests > math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) > math: Fix i386 and m68k exp10 on static build > 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 > > Makeconfig | 5 + > Makefile.help | 4 + > math/Makefile | 113 +++++++++++++++++++- > 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/w_exp10_compat.c | 9 +- > sysdeps/i386/fpu/w_fmod_compat.c | 7 +- > sysdeps/i386/fpu/w_fmodf_compat.c | 7 +- > sysdeps/ieee754/float128/float128_private.h | 2 +- > 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 +- > 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 +- > 24 files changed, 170 insertions(+), 27 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 >