Gentoo Archives: gentoo-dev

From: Matthias Schwarzott <zzam@g.o>
To: gentoo-dev@l.g.o, blueness@g.o
Subject: Re: [gentoo-dev] multilib and different CFLAGS for 32 and 64bit ABIs
Date: Sun, 29 Mar 2015 19:13:05
Message-Id: 55184EAF.8060907@gentoo.org
In Reply to: [gentoo-dev] multilib and different CFLAGS for 32 and 64bit ABIs by Matthias Schwarzott
1 On 29.03.2015 20:58, Matthias Schwarzott 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 I should add, that it seems to break for exactly one package: mariadb
18
19 # file /usr/lib32/libmysqlclient.so.18.0.0
20 /usr/lib32/libmysqlclient.so.18.0.0: ELF 64-bit LSB shared object,
21 x86-64, version 1 (SYSV), dynamically linked, stripped
22
23 After commenting the flags again:
24 # file /usr/lib32/libmysqlclient.so.18.0.0
25 /usr/lib32/libmysqlclient.so.18.0.0: ELF 32-bit LSB shared object, Intel
26 80386, version 1 (SYSV), dynamically linked, stripped
27
28 Regards
29 Matthias

Replies