From nobody Sun Nov 7 22:17:34 2021 X-Original-To: dev-commits-ports-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 34E8C183F0CA; Sun, 7 Nov 2021 22:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HnTBl13zjz3kh1; Sun, 7 Nov 2021 22:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0060F260C0; Sun, 7 Nov 2021 22:17:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1A7MHYql093493; Sun, 7 Nov 2021 22:17:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1A7MHYDl093492; Sun, 7 Nov 2021 22:17:34 GMT (envelope-from git) Date: Sun, 7 Nov 2021 22:17:34 GMT Message-Id: <202111072217.1A7MHYDl093492@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Christoph Moench-Tegeder Subject: git: f08d78ed342f - 2021Q4 - www/firefox-esr: fix build on i386 List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cmt X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q4 X-Git-Reftype: branch X-Git-Commit: f08d78ed342f51f81da94f8c7851e4c17f327b19 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2021Q4 has been updated by cmt: URL: https://cgit.FreeBSD.org/ports/commit/?id=f08d78ed342f51f81da94f8c7851e4c17f327b19 commit f08d78ed342f51f81da94f8c7851e4c17f327b19 Author: Christoph Moench-Tegeder AuthorDate: 2021-11-07 22:15:08 +0000 Commit: Christoph Moench-Tegeder CommitDate: 2021-11-07 22:17:24 +0000 www/firefox-esr: fix build on i386 same fix as firefox in edae8a1c040482b1cc559eee4f6d626288d54965 Reported by: ports-fallout (cherry picked from commit 1a2b9d4e69cebdf706ddd8af237038b454e2eac4) --- www/firefox-esr/files/patch-bug1729459_comment12 | 93 ++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/www/firefox-esr/files/patch-bug1729459_comment12 b/www/firefox-esr/files/patch-bug1729459_comment12 new file mode 100644 index 000000000000..dda42170f71b --- /dev/null +++ b/www/firefox-esr/files/patch-bug1729459_comment12 @@ -0,0 +1,93 @@ +--- modules/fdlibm/src/math_private.h.orig 2021-09-30 19:32:33.764224000 +0200 ++++ modules/fdlibm/src/math_private.h 2021-10-02 22:15:33.265122000 +0200 +@@ -30,7 +30,11 @@ + * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t + */ + +-typedef double __double_t; ++#ifdef __LP64__ ++typedef double __double_t; ++#else ++typedef long double __double_t; ++#endif + typedef __double_t double_t; + + /* +@@ -630,7 +634,37 @@ + return ((double)(x + 0x1.8p52) - 0x1.8p52); + } + ++static inline float ++rnintf(__float_t x) ++{ ++ /* ++ * As for rnint(), except we could just call that to handle the ++ * extra precision case, usually without losing efficiency. ++ */ ++ return ((float)(x + 0x1.8p23F) - 0x1.8p23F); ++} ++ ++#ifdef LDBL_MANT_DIG + /* ++ * The complications for extra precision are smaller for rnintl() since it ++ * can safely assume that the rounding precision has been increased from ++ * its default to FP_PE on x86. We don't exploit that here to get small ++ * optimizations from limiting the rangle to double. We just need it for ++ * the magic number to work with long doubles. ld128 callers should use ++ * rnint() instead of this if possible. ld80 callers should prefer ++ * rnintl() since for amd64 this avoids swapping the register set, while ++ * for i386 it makes no difference (assuming FP_PE), and for other arches ++ * it makes little difference. ++ */ ++static inline long double ++rnintl(long double x) ++{ ++ return (x + __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2 - ++ __CONCAT(0x1.8p, LDBL_MANT_DIG) / 2); ++} ++#endif /* LDBL_MANT_DIG */ ++ ++/* + * irint() and i64rint() give the same result as casting to their integer + * return type provided their arg is a floating point integer. They can + * sometimes be more efficient because no rounding is required. +@@ -644,6 +678,39 @@ + sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x)) + #else + #define irint(x) ((int)(x)) ++#endif ++ ++#define i64rint(x) ((int64_t)(x)) /* only needed for ld128 so not opt. */ ++ ++#if defined(__i386__) && defined(__GNUCLIKE_ASM) ++static __inline int ++irintf(float x) ++{ ++ int n; ++ ++ __asm("fistl %0" : "=m" (n) : "t" (x)); ++ return (n); ++} ++ ++static __inline int ++irintd(double x) ++{ ++ int n; ++ ++ __asm("fistl %0" : "=m" (n) : "t" (x)); ++ return (n); ++} ++#endif ++ ++#if (defined(__amd64__) || defined(__i386__)) && defined(__GNUCLIKE_ASM) ++static __inline int ++irintl(long double x) ++{ ++ int n; ++ ++ __asm("fistl %0" : "=m" (n) : "t" (x)); ++ return (n); ++} + #endif + + #ifdef DEBUG