Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: Ulrich Mueller <ulm@g.o>
Cc: David Seifert <soap@g.o>, gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] profiles/arch/amd64: add "-mfpmath=sse" to CFLAGS_x86
Date: Tue, 18 Oct 2022 17:38:51
Message-Id: CAJ0EP41v-dLdm1SDqrLqJt_wgHJ3iat8raYvsmofW+Y+7=G5YA@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH] profiles/arch/amd64: add "-mfpmath=sse" to CFLAGS_x86 by Ulrich Mueller
1 On Tue, Oct 18, 2022 at 12:47 PM Ulrich Mueller <ulm@g.o> wrote:
2 >
3 > >>>>> On Tue, 18 Oct 2022, David Seifert wrote:
4 >
5 > > What if I want to build Gentoo on an old AMD Thunderbird which has
6 > > neither SSE1 nor the more important SSE2?
7 >
8 > The -mfpmath=sse option is a no-op if the CPU doesn't support SSE,
9 > i.e. it will use 387 arithmetics nevertheless.
10
11 I don't really see an "effective" way to deploy this via profiles on x86.
12
13 We could add it to the default CFLAGS setting in
14 profiles/arch/x86/make.defaults. However, we also default to
15 -march=i686 there, and that doesn't support SSE or SSE2. Also, the
16 entire CFLAGS variable is likely to be overridden by the CFLAGS
17 setting in /etc/make.conf.
18
19 The CFLAGS_x86 profile variable is only used by the
20 multilib_toolchain_setup function in multilib.eclass. In other words,
21 it only affects ebuilds that utilize the multilib eclasses to build
22 libraries for multiple ABIs. That covers all 32-bit libraries on
23 amd64, but doesn't cover all packages on x86.