pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/firefox Work around build failure on i386 caused b...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cfb000cabd77
branches:  trunk
changeset: 457437:cfb000cabd77
user:      manu <manu%pkgsrc.org@localhost>
date:      Wed Aug 25 11:50:43 2021 +0000

description:
Work around build failure on i386 caused by internal compiler error

On i386, cc1plus hits an internal error when building gfx/wr/swgl/src/gl.cc
with -O2 or -O1. This change adjusts the build script to force -O0.

diffstat:

 www/firefox/Makefile                           |   3 +-
 www/firefox/distinfo                           |   3 +-
 www/firefox/patches/patch-gfx_wr_swgl_build.rs |  30 ++++++++++++++++++++++++++
 3 files changed, 34 insertions(+), 2 deletions(-)

diffs (68 lines):

diff -r acb604c5208b -r cfb000cabd77 www/firefox/Makefile
--- a/www/firefox/Makefile      Wed Aug 25 11:38:35 2021 +0000
+++ b/www/firefox/Makefile      Wed Aug 25 11:50:43 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.490 2021/08/24 16:36:01 ryoon Exp $
+# $NetBSD: Makefile,v 1.491 2021/08/25 11:50:43 manu Exp $
 
 FIREFOX_VER=           ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
 MOZ_BRANCH=            91.0
@@ -6,6 +6,7 @@
 
 DISTNAME=      firefox-${FIREFOX_VER}.source
 PKGNAME=       ${DISTNAME:S/.source//:S/b/beta/:S/esr//}
+PKGREVISION=   1
 CATEGORIES=    www
 MASTER_SITES+= ${MASTER_SITE_MOZILLA:=firefox/releases/${FIREFOX_VER}/source/}
 EXTRACT_SUFX=  .tar.xz
diff -r acb604c5208b -r cfb000cabd77 www/firefox/distinfo
--- a/www/firefox/distinfo      Wed Aug 25 11:38:35 2021 +0000
+++ b/www/firefox/distinfo      Wed Aug 25 11:50:43 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.443 2021/08/24 16:36:01 ryoon Exp $
+$NetBSD: distinfo,v 1.444 2021/08/25 11:50:43 manu Exp $
 
 SHA1 (firefox-91.0.2.source.tar.xz) = 953eb52799ae1da9ea63e154e1b3194c10bca8ce
 RMD160 (firefox-91.0.2.source.tar.xz) = 22b066a0f891aca3c9512501b01e556a6b5414e5
@@ -19,6 +19,7 @@
 SHA1 (patch-gfx_cairo_cairo_src_cairo-type1-subset.c) = 89a9d934ef76706c552c0b81e6cbc0f45b1ffd2c
 SHA1 (patch-gfx_skia_skia_src_core_SkCpu.cpp) = 36218819254f3681b9c717d652ea78c9f20d49ad
 SHA1 (patch-gfx_thebes_gfxPlatform.cpp) = f6f8996f0818a1b890698c7cc5054d49cb1e8924
+SHA1 (patch-gfx_wr_swgl_build.rs) = 6b9d7528f07a89638f83dc2527f658c6b10f152b
 SHA1 (patch-ipc_chromium_src_base_message__pump__libevent.cc) = 4a6606da590cfb8d855bde58b9c6f90e98d0870c
 SHA1 (patch-ipc_chromium_src_base_platform__thread__posix.cc) = 35d20981d33ccdb1d8ffb8039e48798777f11658
 SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 260c29bacd8bf265951b7a412f850bf2b292c836
diff -r acb604c5208b -r cfb000cabd77 www/firefox/patches/patch-gfx_wr_swgl_build.rs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-gfx_wr_swgl_build.rs    Wed Aug 25 11:50:43 2021 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-gfx_wr_swgl_build.rs,v 1.1 2021/08/25 11:50:43 manu Exp $
+
+Work around an internal compiler error on i386 when optimization is enabled:
+
+  cargo:warning=In file included from src/gl.cc:2637:0:
+  cargo:warning=src/rasterize.h: In function 'void draw_quad_spans(int, Point2D*, uint32_t, glsl::Interpolants*, Texture&, Texture&, const ClipRect&) [with P = unsigned char]':
+  cargo:warning=src/rasterize.h:782:20: internal compiler error: in convert_move, at expr.c:231
+  cargo:warning= static inline void draw_quad_spans(int nump, Point2D p[4], uint32_t z,
+  cargo:warning=                    ^~~~~~~~~~~~~~~
+
+
+--- gfx/wr/swgl/build.rs.orig  2021-08-24 17:33:31.320811394 +0200
++++ gfx/wr/swgl/build.rs       2021-08-25 03:00:14.918972216 +0200
+@@ -195,8 +195,16 @@
+                  .flag("-mrecip=none");
+         }
+     }
+ 
++    // Work around a compiler bug
++    let target_triple = std::env::var("TARGET").expect("The TARGET environment variab
++le must be set");
++    let target_name = target_triple.split('-').next().unwrap();
++    if ["i386", "i586", "i686"].contains(&target_name) { 
++        build.flag("-O0");
++    }
++
+     build.file("src/gl.cc")
+         .define("_GLIBCXX_USE_CXX11_ABI", Some("0"))
+         .include(shader_dir)
+         .include("src")



Home | Main Index | Thread Index | Old Index