summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2022-10-17 21:41:53 -0400
committerMike Gilbert <floppym@gentoo.org>2022-10-23 20:21:18 -0400
commited189588a071f88186a3a9de25abfbd7582b9c69 (patch)
tree454f774f85202aab5e336a9584797fcf48ecd775 /profiles
parentsys-kernel/git-sources: add 6.1_rc2 (diff)
downloadgentoo-ed189588a071f88186a3a9de25abfbd7582b9c69.tar.gz
gentoo-ed189588a071f88186a3a9de25abfbd7582b9c69.tar.bz2
gentoo-ed189588a071f88186a3a9de25abfbd7582b9c69.zip
profiles/arch/amd64: add "-mfpmath=sse" to CFLAGS_x86
GCC uses x87 floating point instructions when building 32-bit x86 code by default. When building 64-bit code, SSE2 instructions are used instead. Using the x87 floating point unit can lead to strange behavior when calculating intermediate values for single and double precision floats. It uses 80 bits for all calculations, which is larger than the 32 or 64 bits specified for floats and doubles. Using the SSE2 instructions available on x86-64 for floating point arithmetic leads to more consistent behavior, and is usually faster. Reference: https://gcc.gnu.org/wiki/x87note Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'profiles')
-rw-r--r--profiles/arch/amd64/make.defaults4
1 files changed, 2 insertions, 2 deletions
diff --git a/profiles/arch/amd64/make.defaults b/profiles/arch/amd64/make.defaults
index 0c05dec124e2..e7e18ff6a912 100644
--- a/profiles/arch/amd64/make.defaults
+++ b/profiles/arch/amd64/make.defaults
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
ARCH="amd64"
@@ -28,7 +28,7 @@ LDFLAGS_amd64="-m elf_x86_64"
CHOST_amd64="x86_64-pc-linux-gnu"
# 32bit specific settings.
-CFLAGS_x86="-m32"
+CFLAGS_x86="-m32 -mfpmath=sse"
LDFLAGS_x86="-m elf_i386"
CHOST_x86="i686-pc-linux-gnu"