Gentoo Archives: gentoo-dev

From: Matt Turner <mattst88@g.o>
To: gentoo-dev@l.g.o
Cc: "Anthony G. Basile" <blueness@g.o>
Subject: Re: [gentoo-dev] multilib and different CFLAGS for 32 and 64bit ABIs
Date: Sun, 29 Mar 2015 19:07:43
Message-Id: CAEdQ38EKA+HwObvKY1hn0rZngLqvymtjmd2+jhG0OTSVYtUVgQ@mail.gmail.com
In Reply to: [gentoo-dev] multilib and different CFLAGS for 32 and 64bit ABIs by Matthias Schwarzott
1 On Sun, Mar 29, 2015 at 11:58 AM, Matthias Schwarzott <zzam@g.o> wrote:
2 > Hi there!
3 >
4 > I updated my ~amd64 system recently to new hardware (Intel Core i3-4160).
5 > Since then valgrind did no longer work for 32bit programs because
6 > "-march=native" did choose instructions that valgrind does not support
7 > in 32bit mode (even ld.so was unusable).
8 >
9 > After some research I put this into make.conf and now it works:
10 > CFLAGS_x86="${CFLAGS_x86} -mno-avx2 -mno-sse4 -mno-bmi -mno-bmi2"
11 > CXXFLAGS_x86="${CXXFLAGS_x86} -mno-avx2 -mno-sse4 -mno-bmi -mno-bmi2"
12 >
13 > Is this the best solution to the problem?
14 > If yes, the valgrind ebuild could suggest something like this.
15 > Either always show it or check cpu-flags first (is this maintainable?).
16
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.

Replies

Subject Author
Re: [gentoo-dev] multilib and different CFLAGS for 32 and 64bit ABIs "Anthony G. Basile" <blueness@g.o>