Closed Bug 1702189 Opened 3 years ago Closed 3 years ago

Solaris SPARC: g++: error: unrecognized command line option ?-mrecip=none?

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

RESOLVED FIXED
89 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox87 --- unaffected
firefox88 --- unaffected
firefox89 --- fixed

People

(Reporter: petr.sumbera, Assigned: petr.sumbera)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0

Steps to reproduce:

When building on Solaris SPARC I get:

30:20.63 The following warnings were emitted during compilation:
30:20.64 warning: g++: error: unrecognized command line option ?-mrecip=none?
30:20.64 error: failed to run custom build command for `swgl v0.1.0 (/builds2/psumbera/mozilla-central-build/gfx/wr/swgl)`
30:20.64 Caused by:
30:20.64   process didn't exit successfully: `/builds2/psumbera/mozilla-central-build/obj-sparc64-sun-solaris2.11/debug/build/swgl-ab7097c5850649a2/build-script-build` (exit code: 1)
30:17.50   107 | union NetAddr {
30:17.50       |       ^~~~~~~
30:20.63 The following warnings were emitted during compilation:
applying //builds/psumbera/mozilla-bot/imports/569784.patch
30:20.64 error: failed to run custom build command for `swgl v0.1.0 (/builds2/psumbera/mozilla-central-build/gfx/wr/swgl)`

This seems to be regression from Bug 1700717.

Note that Solaris on i386 builds fine.

Keywords: regression
Regressed by: 1700717
Has Regression Range: --- → yes

The Bugbug bot thinks this bug should belong to the 'Core::Graphics: WebRender' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core

Set release status flags based on info from the regressing bug 1700717

Ah, it seems like mrecip is x86 only with gcc.

Severity: -- → S3
Priority: -- → P3

seems -mrecip is supported in x86 and rs6000 (aka ppc/ppc64/ppc64le) targets in gcc, thus it breaks at least aarch64 and s390x for us (Fedora)

Workaround is easy:

--- a/gfx/wr/swgl/build.rs      Fri Mar 05 16:07:26 2021 +0100
+++ b/gfx/wr/swgl/build.rs      Wed Mar 31 04:36:16 2021 -0700
@@ -189,8 +189,7 @@
                  .flag("-Xclang")
                  .flag("-mrecip=none");
         } else {
-            build.flag("-ffast-math")
-                 .flag("-mrecip=none");
+            build.flag("-ffast-math");
         }
     }

Though not sure how check whether it's running on x86 and rs6000 in Rust to prepare proper fix.

You should be able to check env::var("HOST") or env::var("TARGET"), respectively.

Assignee: nobody → petr.sumbera

gcc doesn't support using -mrecip=none universally and it's a
pain to keep track of where it's supported so just avoid using
-ffast-math altogether.

Attachment #9214419 - Attachment is obsolete: true
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e8606ea7841
Don't use -ffast-math on gcc. r=lsalzman
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

I'm confirming that the merged change fixed my build on Linux/s390x with gcc.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: