Build swgl with clang rather than gcc to avoid internal compiler error.
authorPeter Michael Green <plugwash@raspbian.org>
Tue, 15 Feb 2022 04:46:48 +0000 (04:46 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Tue, 15 Feb 2022 19:15:23 +0000 (19:15 +0000)
debian/changelog
gfx/wr/swgl/build.rs

index 3e25619f873b76367295d5f930735ca18b91ebf1..f64d046e3a9a9da5dbb03a2e5343be560bcaddf5 100644 (file)
@@ -20,7 +20,10 @@ firefox-esr (91.6.0esr-1~deb10u1+rpi1) buster-staging; urgency=medium
   * Use a #define instead of a typedef for double_t in fdlibm to prevent conflicting
     definitions error.
 
- -- Raspbian forward porter <root@raspbian.org>  Sun, 13 Feb 2022 13:05:44 +0000
+  [changes introduced in 91.6.0esr-1~deb10u1+rpi1 by Peter Michael Green]
+  * Build swgl with clang rather than gcc to avoid internal compiler error.
+
+ -- Peter Michael Green <plugwash@raspbian.org>  Tue, 15 Feb 2022 04:45:41 +0000
 
 firefox-esr (91.6.0esr-1~deb10u1) buster-security; urgency=medium
 
index 8ace5615a28157439910ed580b80291e5eb1a88e..477b7c066f8b297526b85070aee61666e3ea5f1b 100644 (file)
@@ -129,6 +129,12 @@ fn main() {
 
     shaders.sort();
 
+    // force build with clang to work around internal compiler error in gcc
+    if let Ok(target) = std::env::var("TARGET") {
+        std::env::set_var(format!("CC_{}", target),"clang");
+        std::env::set_var(format!("CXX_{}", target),"clang++");
+    }
+
     // We need to ensure that the C preprocessor does not pull compiler flags from
     // the host or target environment. Set up a SWGLPP target with empty flags to
     // work around this.