Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 528708 - cross-x86_64-pc-linux-gnu/glibc: building x86 multilib fails due to invalid -march=x86_64 flag added
Summary: cross-x86_64-pc-linux-gnu/glibc: building x86 multilib fails due to invalid -...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-09 05:48 UTC by devsk
Modified: 2015-05-30 04:31 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,6.42 KB, text/plain)
2014-11-10 01:15 UTC, devsk
Details
config.log (config.log,11.57 KB, text/plain)
2014-11-11 03:28 UTC, devsk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description devsk 2014-11-09 05:48:11 UTC
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/cross-x86_64-pc-linux-gnu/glibc-2.20/work/glibc-2.20 ...
 * strip-flags: CFLAGS: changed '-O2 -march=core2 -msse2 -msse -fforce-addr -fomit-frame-pointer -pipe' to '-O2 -march=core2 -pipe'
 * strip-flags: CXXFLAGS: changed '-O2 -march=core2 -msse2 -msse -fforce-addr -fomit-frame-pointer -pipe' to '-O2 -march=core2 -pipe'
<builtin>: recipe for target 'glibc-test' failed
 * Auto adding -march=x86_64 to CFLAGS_x86 #185404
 * strip-flags: CFLAGS: changed '-O2 -march=core2 -msse2 -msse -fforce-addr -fomit-frame-pointer -pipe' to '-O2 -march=core2 -pipe'
 * strip-flags: CXXFLAGS: changed '-O2 -march=core2 -msse2 -msse -fforce-addr -fomit-frame-pointer -pipe' to '-O2 -march=core2 -pipe'
<builtin>: recipe for target 'glibc-test' failed
 * Auto adding -march=x86_64 to CFLAGS_x86 #185404
 * Running toolchain-glibc_src_configure for ABI x86

Reproducible: Always

Steps to Reproduce:
1. emerge cross-x86_64-pc-linux-gnu/glibc
2.
3.


Expected Results:  
Should compile.

The config.log says:

configure:2740: checking for suffix of object files
configure:2762: x86_64-pc-linux-gnu-gcc -m32 -march=x86_64 -c -pipe -O2 -fno-strict-aliasing  conftest.c >&5
conftest.c:1:0: error: bad value (x86_64) for -march= switch

Basically,

 * Auto adding -march=x86_64 to CFLAGS_x86 #185404

is conflicting with the new 4.9.2 gcc which does not recognise the x86_64 as a valid -march value.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-09 09:21:03 UTC
1) Please post your `cross-emerge --info' output in a comment.
2) Please attach the entire build log to this bug report.
Comment 2 devsk 2014-11-10 01:14:25 UTC
# x86_64-pc-linux-gnu-emerge --info
Portage 2.2.14 (python 2.7.8-final-0, unavailable, gcc-4.9.2, glibc-2.20, 3.16.4 x86_64)
=================================================================
System uname: Linux-3.16.4-x86_64-Intel-R-_Core-TM-_i7_CPU_920_@_2.67GHz-with-gentoo-2.2
KiB Mem:    12297380 total,    826376 free
KiB Swap:   12582892 total,  11656260 free
Timestamp of tree: Mon, 10 Nov 2014 00:15:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
distcc 3.2rc1 i686-pc-linux-gnu [disabled]
ccache version 3.1.10 [disabled]
app-shells/bash:          4.3_p30-r1
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r2
dev-lang/python:          2.7.8, 3.3.5-r1
dev-util/ccache:          3.1.10-r1
dev-util/cmake:           3.0.2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.3
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.7.2-r1, 4.8.2-r1, 4.9.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.3-r2
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.17-r1 (virtual/os-headers)
sys-libs/glibc:           2.20
Repositories: gentoo
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS=""
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0 /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS=""
DISTDIR="/usr/portage/distfiles"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS=""
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/usr/x86_64-pc-linux-gnu/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
USE=""
Unset:  ACCEPT_KEYWORDS, CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 3 devsk 2014-11-10 01:15:34 UTC
Created attachment 388982 [details]
build.log
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2014-11-10 08:14:16 UTC
configure: error: in `/var/tmp/portage/cross-x86_64-pc-linux-gnu/glibc-2.20/work/build-x86-x86_64-pc-linux-gnu-nptl':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details

Please attach that too.
Comment 5 devsk 2014-11-11 03:28:39 UTC
Created attachment 389062 [details]
config.log

I had added the snippet of the config.log in the bug originally. And I think that snippet alone really points to the issue. The -march=x86_64 is no longer valid with 4.9.2 (this started happening after upgrade to gcc 4.9.2).
Comment 6 devsk 2015-02-10 02:44:04 UTC
Looks like the damage was done by fixes for #185404 #199334

Any plans of fixing this? Why is common.eblit auto-adding a flag which is removed in gcc-4.9.2 and compiler barfs on it?
Comment 7 SpanKY gentoo-dev 2015-05-30 04:14:15 UTC
the multilib code path isn't often tested which is why no one noticed
Comment 8 SpanKY gentoo-dev 2015-05-30 04:31:06 UTC
should be all set now in the tree; thanks for the report!

Commit message: Fix -march setting when building x86 multilib on x86_64
http://sources.gentoo.org/sys-libs/glibc/files/eblits/common.eblit?r1=1.45&r2=1.46