From patchwork Wed Mar 27 16:45:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 783136 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:b0:33e:7753:30bd with SMTP id p1csp2300065wrt; Wed, 27 Mar 2024 09:46:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWTC9L0RdTibzQsjgkeZnF3N37xA9BqIz3eTQeQbuAjyAm0B8gLWPB+BIpu/GoAr9b/Yf69YO/D/WXdjBct+DdY X-Google-Smtp-Source: AGHT+IEME5xIbWL+QS5t5TaAnQjy+ChAoxtEl3V3ydOMp1HyedzLqfH1gYTkHoC07UcnBg31E6LE X-Received: by 2002:a37:e217:0:b0:788:7299:e79a with SMTP id g23-20020a37e217000000b007887299e79amr130376qki.28.1711558017991; Wed, 27 Mar 2024 09:46:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711558017; cv=pass; d=google.com; s=arc-20160816; b=iA6iGrBeLk3MjOgHxTnD0VNDJdB42AdUapGq/JJO6QZN8jvI16G3hmh2wPn9JVMA68 LvxgonYh4B6AeI2CSK5Zi1Dx+ljA6ddPKLDDkDxxZaDKp+903E037I6Lcdmu2By7IrZB 7cHDb7oUqIS6j8oKEXMHv+ej9Mp2L499GfyMPDGabGZ223ncDSMY94jIctfYt6a7ujg0 866NGxOJqTwWI9DXC8cL1l8u4qmxendUP0SRNjtjPpOSTlxU36T2/dZVFkmTewnnbr2V d3c+DR4kXSzxHeqJBdSX3T7etjYsL2kmiKdgAFCKmGeymIJgaXWDR8k0N/72Xc+D6liD HUEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=HTwxuMR5ucDSMpp4J0Kk3EI0Ie85RaR9Xaq7XFWHhq0=; fh=WtLnUd2EuDKv+EP3BSdEI8hdivapDDAq3MY9+WgWrlk=; b=vgAxGMye5YhqfBAzUUiBbz7lEdnHp7qBvl3CINucYc71qo4ozKPfkQSnppsi/SzSnq qmGKUSs3HlMipbb3V619UEkOzVqcLmRxR7W2SBNw5r/lQlQIaHwiN6+XEeQ4oGq0NyPj es6g5dudkSQJs+shceUu6PdIffLJZnC8tUsIjp+vwtetXlF88SJJ9GZOorf9PkAfBfwA amkb0+tAXwsWK0O22nxWXuxd9S/OZE8ed3UcToiNfGUJUD/VEOsjIP2hpHYdgZaO+9T8 Z7Ry01YKS+aHmEohlQAyXyXYuD86zhDsiteiI2NepZPmpHZxbjL5uOAoS8hD/cdjCtwE q7tg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G+QGS+wq; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id pc39-20020a05620a842700b0078a078f100csi10189030qkn.333.2024.03.27.09.46.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:46:57 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G+QGS+wq; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces+patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="libc-alpha-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9EB4B385E446 for ; Wed, 27 Mar 2024 16:46:57 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id B96413858C36 for ; Wed, 27 Mar 2024 16:45:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B96413858C36 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 B96413858C36 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::633 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557940; cv=none; b=eTwwis9yVzhoUXoo5HPepNqwTQHBgoNpFkwYQtsfxfA2/9OyqQ08ACb4dDpgrY/Uy9h1UXEyUjpHHCejhqhvsGz41Wkvdb4JqOaX/dFVbI7ShUriAxLWMVVuBNfLGN7JpRCNvhFQ3ZbvSCqLANTg6zPdHLV4tXJhGb5xWFH41gU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711557940; c=relaxed/simple; bh=4aR3m2SjWqChSXYKCt63Vv0Bjg6RMaEe6T3zRnV9swU=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=X11Wqn0Qc/2kkaZi1BJbAK43ItJoBegJGIvumjJOBuEhmR0OXlWSAqfU45F/Jc3xA7ZCHlKyWmwvuIwTsDJULXB3cwxJYhGA78ArL74cCTvfQd5n6d+mNIqFhIOm18xKgqyYG6FIgQ2SwF37HVwXYyPXTu3wJ8rVyty84KJdYSE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1df01161b39so183865ad.3 for ; Wed, 27 Mar 2024 09:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711557937; x=1712162737; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=HTwxuMR5ucDSMpp4J0Kk3EI0Ie85RaR9Xaq7XFWHhq0=; b=G+QGS+wqM4Waw5uQXeOZK977hREhvems3Ifzh+b//aL9w/l3NRqey+f90/dB05pFof /OMvj2VAT+qSFSYlLDWU6o4jdYm8abP/SRhK2p78FgL0AtbNkwyyk0dTk8SydcFW5hBM ozjb4wrPqJANc9TDvhfQEqUNkWzAi6B/+9T38Pl494n3nuCaAnQvwLiO7CzXxWmNaSs4 tbAKcaS3FD/8eI7RZaQvqGKiyRBZWVj3hXhjHH032wTDAr88FZlDU9HGI5KGF9iKJESR dWU4zg81zI/7VLh+/3XdTRGU4MbzNf2xzspI5JB2C1SGDAOZ9mgQVrmJdKbIdiKOzkqc 2iFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711557937; x=1712162737; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HTwxuMR5ucDSMpp4J0Kk3EI0Ie85RaR9Xaq7XFWHhq0=; b=LcBTWtp3z+tYfm0Le83w/Lsi7AD83HNfFLSvLB9Utr9PkdvHaUFolxTYYiC9T5Fg45 M2QYoxGKJcrIxDs1xsvd7gjnQJwa//FsbhkUFxe+2l/uf9Vg3KO2/FYaTkxw+o++2K0D 5oJ/35hKvUJ/RTiX78XFJPBzMvG9zP0sd1gs87/oGweAovuwF1GqgXi1PFVoyRJBAPvO bmo1BTRL2ytJgu8t7Ax2z/CfU58u4vrH/KLxqzDH5q4S9l9RzUiHNUuEWRSa428JykT3 0pd83e80OLxH4dbKl5UZRllfZ2B54Mm02SelTJH/qFTKZlVG4fLuaCW7wX9bCLCuYiTP brgQ== X-Gm-Message-State: AOJu0Yys7Jm3UgK0ilh9zGytGSekpOu0VXlDMbS4xL9AfjV4tvy0IwvR /FjTXtes17NTmDoPSVbJwvFRg+XA5Ws741yxSVNlgJwgokkMsao4rCtQI3r1rz183nBSijQv2PT k X-Received: by 2002:a17:902:f54a:b0:1e0:fc73:8f81 with SMTP id h10-20020a170902f54a00b001e0fc738f81mr282804plf.64.1711557936997; Wed, 27 Mar 2024 09:45:36 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c3:b18e:67c4:6248:3d8a:f386]) by smtp.gmail.com with ESMTPSA id c4-20020a170903234400b001e20578b524sm858593plh.252.2024.03.27.09.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:45:36 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Joseph Myers , Florian Weimer , "H . J . Lu" Subject: [PATCH 02/15] math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) Date: Wed, 27 Mar 2024 13:45:14 -0300 Message-Id: <20240327164527.3717523-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> References: <20240327164527.3717523-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, 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 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+patch=linaro.org@sourceware.org The commit 16439f419b removed the static fmod/fmodf on i386 and m68k with and empty w_fmod.c (required for the ABIs that uses the newly implementation). This patch fixes by adding the required symbols on the arch-specific w_fmod{f}_compat.c implementation. To statically build fmod fails on some ABI (alpha, s390, sparc) because it does not export the ldexpf128, this is also fixed by this patch. Checked on i686-linux-gnu and with a build for m68k-linux-gnu. --- math/Makefile | 4 +++- sysdeps/i386/fpu/w_fmod_compat.c | 7 ++++--- sysdeps/i386/fpu/w_fmodf_compat.c | 7 ++++--- sysdeps/ieee754/ldbl-opt/s_ldexpl.c | 4 ++-- sysdeps/m68k/m680x0/fpu/w_fmod_compat.c | 5 +++-- sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c | 7 ++++--- 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/math/Makefile b/math/Makefile index fb537955fb..964bf2be71 100644 --- a/math/Makefile +++ b/math/Makefile @@ -368,7 +368,9 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ libm-test-funcs-auto-static = -libm-test-funcs-noauto-static = +libm-test-funcs-noauto-static = \ + fmod \ + # libm-test-funcs-noauto-static libm-test-funcs-narrow-static = libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static) diff --git a/sysdeps/i386/fpu/w_fmod_compat.c b/sysdeps/i386/fpu/w_fmod_compat.c index 5ac9995ffd..528bfc2a13 100644 --- a/sysdeps/i386/fpu/w_fmod_compat.c +++ b/sysdeps/i386/fpu/w_fmod_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif -#include -#ifdef SHARED +# include libm_alias_double (__fmod_compat, fmod) +#else +#include +#include #endif diff --git a/sysdeps/i386/fpu/w_fmodf_compat.c b/sysdeps/i386/fpu/w_fmodf_compat.c index cc417e07d3..5a61693e51 100644 --- a/sysdeps/i386/fpu/w_fmodf_compat.c +++ b/sysdeps/i386/fpu/w_fmodf_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif -#include -#ifdef SHARED +# include libm_alias_float (__fmod_compat, fmod) +#else +#include +#include #endif diff --git a/sysdeps/ieee754/ldbl-opt/s_ldexpl.c b/sysdeps/ieee754/ldbl-opt/s_ldexpl.c index 1afbe7d8ad..932cc4341c 100644 --- a/sysdeps/ieee754/ldbl-opt/s_ldexpl.c +++ b/sysdeps/ieee754/ldbl-opt/s_ldexpl.c @@ -17,13 +17,13 @@ License along with the GNU C Library; if not, see . */ -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # define declare_mgen_alias(f,t) #endif #include #include -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __ldexpl, ldexpl); long_double_symbol (libc, __wrap_scalbnl, scalbnl); #endif diff --git a/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c b/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c index 527d4fbed2..57f38091e6 100644 --- a/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c +++ b/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif #include -#ifdef SHARED libm_alias_double (__fmod_compat, fmod) +#else +#include +#include #endif diff --git a/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c b/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c index 5043586b91..88db07f443 100644 --- a/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c +++ b/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c @@ -7,8 +7,9 @@ # define LIBM_SVID_COMPAT 1 # undef compat_symbol # define compat_symbol(a, b, c, d) -#endif -#include -#ifdef SHARED +# include libm_alias_float (__fmod_compat, fmod) +#else +#include +#include #endif