Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 323319 - sys-devel/binutils-2.20.1 and probably also other versions not providing BFD targets
Summary: sys-devel/binutils-2.20.1 and probably also other versions not providing BFD ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-09 10:24 UTC by Martin Jansa
Modified: 2010-06-09 20:43 UTC (History)
0 users

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


Attachments
toolchain-binutils.eclass.patch (toolchain-binutils.eclass.patch,384 bytes, patch)
2010-06-09 10:28 UTC, Martin Jansa
Details | Diff
binutils-2.20.51.0.8.patch (binutils.patch,631 bytes, patch)
2010-06-09 10:30 UTC, Martin Jansa
Details | Diff
log.do_compile.OK (log.do_compile.21206,364.58 KB, text/plain)
2010-06-09 11:57 UTC, Martin Jansa
Details
log.do_compile.FAIL (fail.log.txt,221.58 KB, text/plain)
2010-06-09 11:58 UTC, Martin Jansa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jansa 2010-06-09 10:24:35 UTC
When building shared binutils-cross with OpenEmbedded I got this error:

ar: can't set BFD default target to `x86_64-pc-linux-gnu': Invalid bfd target

First I was trying to enable USE flag multitarget, but that didn't help. So I tried newer binutils snapshosts 2.20.51.0.8 and 2.20.51.0.9, both failed but 2.20.51.0.8 was quite easy to fix (I'll attach used patch), but still BFD targets weren't available.

In this 2.20.51.0.9 announcement
http://gcc.gnu.org/ml/gcc/2010-05/msg00632.html
I noticed "IA-32 binary and X64_64 binary tar balls are configured with
--enable-gold=both/ld --enable-plugins --enable-threads.", so I tried to add --enable-plugins --enable-threads to toolchain-binutils.eclass. Now building binutils-cross works OK, but would be great to resolve it properly in all binutils versions.

Some more details:
http://article.gmane.org/gmane.comp.handhelds.openembedded/33294/match=latest+binutils

I'm using masked gcc-4.5, but I had confirmation from other OpenEmbedded user that he has the same issue on his stable x86 gentoo ("ar: can't set BFD default target to `i686-pc-linux-gnu': Invalid bfd target" for him).


Portage 2.2_rc67 (default/linux/amd64/10.0, gcc-4.5.0, glibc-2.11.2-r0, 2.6.34-JaMa x86_64)
=================================================================
System uname: Linux-2.6.34-JaMa-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.0.1
Timestamp of tree: Wed, 09 Jun 2010 07:00:22 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-python/pycrypto: 2.1.0
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.1-r1
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65
sys-devel/automake:  1.11.1
sys-devel/binutils:  2.20.51.0.8
sys-devel/gcc:       4.5.0
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.8
virtual/os-headers:  2.6.33
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=barcelona -pipe -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -march=barcelona -pipe -ftree-vectorize -fvisibility-inlines-hidden -fvisibility=hidden"
DISTDIR="/tmp/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch usersandbox"
GENTOO_MIRRORS="http://gentoo.mirror.web4u.cz/distfiles/"
LANG="en_GB"
LC_ALL="cs_CZ.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
LINGUAS="en_GB en cs"
MAKEOPTS="-j1"
PKGDIR="/tmp/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp/tmpwork"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl amd64 bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 mmx modules mudflap multilib ncurses nptl nptlonly openmp pam pcre pppd readline reflection session spl sse sse2 ssl sysfs tcpd unicode xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB en cs" QEMU_SOFTMMU_TARGETS="arm" QEMU_USER_TARGETS="arm armeb" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Martin Jansa 2010-06-09 10:28:25 UTC
Created attachment 234687 [details, diff]
toolchain-binutils.eclass.patch

enable plugins and threads in for binutils in toolchain-binutils
Comment 2 Martin Jansa 2010-06-09 10:30:40 UTC
Created attachment 234689 [details, diff]
binutils-2.20.51.0.8.patch

Version 2.20.1-r1 had similar patch ./patches/binutils-error-9.patch, which is changing the similar problem on more places, maybe this whole patch is still needed for binutils-2.20.51.0.8.
Comment 3 Michael Weber (RETIRED) gentoo-dev 2010-06-09 11:44:35 UTC
Hello Martin,

can you please provide the full build.log, just for the record.

thanks for the patch, Michael
Comment 4 Martin Jansa 2010-06-09 11:57:24 UTC
Created attachment 234693 [details]
log.do_compile.OK

successful log.do_compile from OE with "fixed" 2.20.51.0.8
Comment 5 Martin Jansa 2010-06-09 11:58:56 UTC
Created attachment 234695 [details]
log.do_compile.FAIL

failing log.do_compile from OE with unmodified 2.20.1-r1
Comment 6 Martin Jansa 2010-06-09 12:03:47 UTC
(In reply to comment #3)
> Hello Martin,
> 
> can you please provide the full build.log, just for the record.
> 
> thanks for the patch, Michael

Attached, but to be clear:
I'm building binutils-cross with OpenEmbedded (not from some ebuild), but gentoo binutils is used to link it and building shared binutils-cross was just first place exposing this "bug" in gentoo binutils.

Maybe this issue is related to #76436 #203124
Comment 7 SpanKY gentoo-dev 2010-06-09 20:43:19 UTC
most likely you're hitting an upstream bug.  not a problem with Gentoo.

http://sourceware.org/bugzilla/show_bug.cgi?id=4970