From patchwork Thu Mar 14 18:18:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 87213 X-Patchwork-Delegate: hjl.tools@gmail.com Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 969BD3857704 for ; Thu, 14 Mar 2024 18:19:30 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by sourceware.org (Postfix) with ESMTPS id 2BB413857C60 for ; Thu, 14 Mar 2024 18:18:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BB413857C60 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 2BB413857C60 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c2c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710440300; cv=none; b=X5j/PhcAhJLG1Ug3j95rYUr2Xfnjik4J/vInTDxr0GpH2mnytF4DOx1vxlmf6KblzS5FmFtfcKA/xF+mh1urVyKB7xo3MvNOYq29rNoxsT9aCSfX7C7wH6rGfa+Pd59+SMzxXWNlGv19q4Zvbdzs9OPGHGP9JHlWNqHKKCaH0KU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710440300; c=relaxed/simple; bh=F61JMsyt/P5ZMhAmn2xsfWQk137ViN9kNLMmWqGPBT4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=ITmVRDgU2jNv4zHJztYuhokE9JWzCKWe46uTlfrJJJgfIO0CUfejNSXKeq+wkhqDvf+0ai+DHxcmtVU2/T3/ttmE4xGQlZXpj4VQ15NhvBF760/HRblpFAa4z8PQgHL67szxTQsI+n3/lGqWjsqhSV6XqajCPdQdbzJbgY/Ntrc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc2c.google.com with SMTP id 006d021491bc7-5a46b28a77dso337338eaf.1 for ; Thu, 14 Mar 2024 11:18:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710440296; x=1711045096; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=1c4L82w2R0JEPhgrPrx+f5B66yhxRLl8/heowMTKVhU=; b=vY4Wzdj+GxGJEzArYPQ3gP4+Mjrdsm3GUAbCpEy2HIPw/mKTgZ320ljPXQu/U1nqLt aQdOxcL7m9TIL32SkXZLKY9ZQT+EsLpaoSRuV4VYIrIE2qN5/rnzs01P7CjZ3JtTPNSS OrPV2b2zYEi+wMv3OmH4q3YR5mEYnfwXVty/RzrWCOlqw5Aki1dFhh77nIpPlTJPwAdp n45RgLSHcE3Jz+oFNMHaNs2M6NewTzyEjAAcbHkfkpHOfh0wMWnvELxPhJqxH+7BDk9T RmyhNQzc6WrNv/u2dLgupanR3SYBBjIKiRPx97B8hgo0bWUwbHsBHork1z4uGGx/1Tnc nGIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710440296; x=1711045096; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1c4L82w2R0JEPhgrPrx+f5B66yhxRLl8/heowMTKVhU=; b=Jvr1+5cfaSeHHhsRSuQ+/VXFSRmodD/MBJD9S4JyhaBqKiViRgbXxWhFMmuQS2p2gd uVwfTuJ/ddj8+PTsEoJaCWe8S5AaABbYvCJSta3co0jptUNxGwYNGHa2z/VasQRRU07Y Nj9AOOTLJFBFb5UuIeqtxGgo0B4tCzLygSPaRuROaIXbpjpTl6+se7mYgh94IMcR9Dyg M1S081y9wS6ihQNzeETYe8KmY46SN9rSsaUSscdZZrLMLRAQ6tIHnMTT+I9M7072Gxh/ SITgWokudYjR8FI7QD3o2y2POZTmO7Mpe7bLpB+DNF9wSUH2LcrSPTdryNb1fEDpvZPV BYuA== X-Gm-Message-State: AOJu0YyoD3PXafZt6rrAYj5fQ6mIG0vAtK2ojsZHs8c4uSgBBESiqNGA UD9lXcZLMslfA4z1hq0L1EcPwvQN59TWTIwFdMb/8Mw/TFD+K/blC5Q/rIu2/WxvVXSSvfvEUV3 w X-Google-Smtp-Source: AGHT+IEiIzAYxibWNRkLJjVu1Tj66DHDCe9sD4Sdd6EUmhTCG5Xth1VUbVXtunVKTz5i6Xhg+l4hiA== X-Received: by 2002:a05:6358:1282:b0:17b:f6a9:dc18 with SMTP id e2-20020a056358128200b0017bf6a9dc18mr3256766rwi.15.1710440296394; Thu, 14 Mar 2024 11:18:16 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c2:8dfd:b85a:7d6:59ce:add5]) by smtp.gmail.com with ESMTPSA id n188-20020a6327c5000000b005dc491ccdcesm1013469pgn.14.2024.03.14.11.18.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 11:18:15 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 1/3] math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488) Date: Thu, 14 Mar 2024 15:18:08 -0300 Message-Id: <20240314181810.1330836-2-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240314181810.1330836-1-adhemerval.zanella@linaro.org> References: <20240314181810.1330836-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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+patchwork=sourceware.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. Checked on i686-linux-gnu and with a build for m68k-linux-gnu. I also checked that a stack build using fmod/fmodf correctly resolves on both ABIs. --- sysdeps/i386/fpu/w_fmod_compat.c | 7 ++++--- sysdeps/i386/fpu/w_fmodf_compat.c | 7 ++++--- sysdeps/m68k/m680x0/fpu/w_fmod_compat.c | 5 +++-- sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c | 7 ++++--- 4 files changed, 15 insertions(+), 11 deletions(-) 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/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