Gentoo Archives: gentoo-dev

From: Matthias Schwarzott <zzam@g.o>
To: gentoo-dev@l.g.o, blueness@g.o
Subject: [gentoo-dev] multilib and different CFLAGS for 32 and 64bit ABIs
Date: Sun, 29 Mar 2015 18:58:36
Message-Id: 55184B4E.30207@gentoo.org
1 Hi there!
2
3 I updated my ~amd64 system recently to new hardware (Intel Core i3-4160).
4 Since then valgrind did no longer work for 32bit programs because
5 "-march=native" did choose instructions that valgrind does not support
6 in 32bit mode (even ld.so was unusable).
7
8 After some research I put this into make.conf and now it works:
9 CFLAGS_x86="${CFLAGS_x86} -mno-avx2 -mno-sse4 -mno-bmi -mno-bmi2"
10 CXXFLAGS_x86="${CXXFLAGS_x86} -mno-avx2 -mno-sse4 -mno-bmi -mno-bmi2"
11
12 Is this the best solution to the problem?
13 If yes, the valgrind ebuild could suggest something like this.
14 Either always show it or check cpu-flags first (is this maintainable?).
15
16 Regards
17 Matthias

Replies