Gentoo Archives: gentoo-dev

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] multilib and different CFLAGS for 32 and 64bit ABIs
Date: Sun, 29 Mar 2015 20:06:21
Message-Id: 55185B91.1070607@gentoo.org
In Reply to: Re: [gentoo-dev] multilib and different CFLAGS for 32 and 64bit ABIs by Matt Turner
1 On 03/29/15 15:07, Matt Turner wrote:
2 > On Sun, Mar 29, 2015 at 11:58 AM, Matthias Schwarzott <zzam@g.o> wrote:
3 >> Hi there!
4 >>
5 >> I updated my ~amd64 system recently to new hardware (Intel Core i3-4160).
6 >> Since then valgrind did no longer work for 32bit programs because
7 >> "-march=native" did choose instructions that valgrind does not support
8 >> in 32bit mode (even ld.so was unusable).
9 >>
10 >> After some research I put this into make.conf and now it works:
11 >> CFLAGS_x86="${CFLAGS_x86} -mno-avx2 -mno-sse4 -mno-bmi -mno-bmi2"
12 >> CXXFLAGS_x86="${CXXFLAGS_x86} -mno-avx2 -mno-sse4 -mno-bmi -mno-bmi2"
13 >>
14 >> Is this the best solution to the problem?
15 >> If yes, the valgrind ebuild could suggest something like this.
16 >> Either always show it or check cpu-flags first (is this maintainable?).
17 > Valgrind's policy is that they don't implement new instruction sets in 32-bit.
18 >
19 > Doing what you've done is the only option I'm aware of, short of
20 > implementing support in valgrind for these instructions.
21 >
22
23 This is a known issue. I could add a pkg_postinst() message, but with
24 valgrind, there would be lots of caveats. Maybe open a bug and we'll
25 track the issue in gentoo that way, like the strlen issue and a few
26 other valgrind oldies.
27
28 --
29 Anthony G. Basile, Ph.D.
30 Gentoo Linux Developer [Hardened]
31 E-Mail : blueness@g.o
32 GnuPG FP : 1FED FAD9 D82C 52A5 3BAB DC79 9384 FA6E F52D 4BBA
33 GnuPG ID : F52D4BBA