commit:     cc66524b22b55a4f6ab64b21efbe226c7eb4e552
Author:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Mon Jun  3 21:06:01 2024 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Jun  3 21:53:34 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc66524b

app-editors/emacs: Use sane compiler flags for FP arithmetic

Fixes a test failure with lcms-cam02-ucs.

Closes: https://bugs.gentoo.org/933380
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 app-editors/emacs/emacs-26.3-r18.ebuild  | 3 +++
 app-editors/emacs/emacs-27.2-r16.ebuild  | 4 ++++
 app-editors/emacs/emacs-28.2-r12.ebuild  | 4 ++++
 app-editors/emacs/emacs-29.3-r2.ebuild   | 4 ++++
 app-editors/emacs/emacs-29.3.9999.ebuild | 4 ++++
 app-editors/emacs/emacs-30.0.9999.ebuild | 4 ++++
 6 files changed, 23 insertions(+)

diff --git a/app-editors/emacs/emacs-26.3-r18.ebuild 
b/app-editors/emacs/emacs-26.3-r18.ebuild
index acca742e0fe9..1ba9d36ffa14 100644
--- a/app-editors/emacs/emacs-26.3-r18.ebuild
+++ b/app-editors/emacs/emacs-26.3-r18.ebuild
@@ -132,6 +132,9 @@ src_configure() {
                replace-flags "-O[3-9]" -O2
        fi
 
+       # We want floating-point arithmetic to be correct #933380
+       append-flags -fno-fast-math -ffp-contract=off
+
        local myconf
 
        if use alsa; then

diff --git a/app-editors/emacs/emacs-27.2-r16.ebuild 
b/app-editors/emacs/emacs-27.2-r16.ebuild
index 5c0b5934fb86..f6b8de88dad1 100644
--- a/app-editors/emacs/emacs-27.2-r16.ebuild
+++ b/app-editors/emacs/emacs-27.2-r16.ebuild
@@ -166,6 +166,10 @@ src_prepare() {
 }
 
 src_configure() {
+       # We want floating-point arithmetic to be correct #933380
+       replace-flags -Ofast -O3
+       append-flags -fno-fast-math -ffp-contract=off
+
        local myconf
 
        if use alsa; then

diff --git a/app-editors/emacs/emacs-28.2-r12.ebuild 
b/app-editors/emacs/emacs-28.2-r12.ebuild
index 50156d392662..12cc6ad9824d 100644
--- a/app-editors/emacs/emacs-28.2-r12.ebuild
+++ b/app-editors/emacs/emacs-28.2-r12.ebuild
@@ -190,6 +190,10 @@ src_prepare() {
 }
 
 src_configure() {
+       # We want floating-point arithmetic to be correct #933380
+       replace-flags -Ofast -O3
+       append-flags -fno-fast-math -ffp-contract=off
+
        local myconf
 
        # Prevents e.g. tests interfering with running Emacs.

diff --git a/app-editors/emacs/emacs-29.3-r2.ebuild 
b/app-editors/emacs/emacs-29.3-r2.ebuild
index c828ae18054e..cf970a0a5802 100644
--- a/app-editors/emacs/emacs-29.3-r2.ebuild
+++ b/app-editors/emacs/emacs-29.3-r2.ebuild
@@ -223,6 +223,10 @@ src_prepare() {
 }
 
 src_configure() {
+       # We want floating-point arithmetic to be correct #933380
+       replace-flags -Ofast -O3
+       append-flags -fno-fast-math -ffp-contract=off
+
        local myconf
 
        # Prevents e.g. tests interfering with running Emacs.

diff --git a/app-editors/emacs/emacs-29.3.9999.ebuild 
b/app-editors/emacs/emacs-29.3.9999.ebuild
index 4f14c5c8568a..8ce5405e7582 100644
--- a/app-editors/emacs/emacs-29.3.9999.ebuild
+++ b/app-editors/emacs/emacs-29.3.9999.ebuild
@@ -220,6 +220,10 @@ src_prepare() {
 }
 
 src_configure() {
+       # We want floating-point arithmetic to be correct #933380
+       replace-flags -Ofast -O3
+       append-flags -fno-fast-math -ffp-contract=off
+
        local myconf
 
        # Prevents e.g. tests interfering with running Emacs.

diff --git a/app-editors/emacs/emacs-30.0.9999.ebuild 
b/app-editors/emacs/emacs-30.0.9999.ebuild
index dd2880411851..886e2dbf4f7f 100644
--- a/app-editors/emacs/emacs-30.0.9999.ebuild
+++ b/app-editors/emacs/emacs-30.0.9999.ebuild
@@ -220,6 +220,10 @@ src_prepare() {
 }
 
 src_configure() {
+       # We want floating-point arithmetic to be correct #933380
+       replace-flags -Ofast -O3
+       append-flags -fno-fast-math -ffp-contract=off
+
        local myconf
 
        # Prevents e.g. tests interfering with running Emacs.

Reply via email to