Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 604766 - sys-devel/binutils[multitarget]: conflicts with COFF and PE while building XEN
Summary: sys-devel/binutils[multitarget]: conflicts with COFF and PE while building XEN
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-05 16:14 UTC by Doug Goldstein (RETIRED)
Modified: 2017-02-15 08:38 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Goldstein (RETIRED) gentoo-dev 2017-01-05 16:14:12 UTC
Our binutils is setup to have some conflicts. This is Xen from git.

[ebuild   R    ] sys-devel/binutils-2.25.1-r1:2.25.1::gentoo  USE="cxx multitarget nls zlib -static-libs {-test} -vanilla"


ld -mi386pep --subsystem=10 --image-base=0xffff82d080000000 --stack=0,0 --heap=0,0 --strip-debug --section-alignment=0x200000 --file-alignment=0x20 --major-image-version=4 --minor-image-version=9 --major-os-version=2 --minor-os-version=0 --major-subsystem-version=2 --minor-subsystem-version=0 --build-id=sha1 -T efi.lds -N prelink-efi.o efi/relocs-dummy.o /home/cardoe/work/xen/xen/common/symbols-dummy.o efi/buildid.o -o /home/cardoe/work/xen/xen/.xen.efi.0xffff82d080000000.0 &&   ld -mi386pep --subsystem=10 --image-base=0xffff82d0c0000000 --stack=0,0 --heap=0,0 --strip-debug --section-alignment=0x200000 --file-alignment=0x20 --major-image-version=4 --minor-image-version=9 --major-os-version=2 --minor-os-version=0 --major-subsystem-version=2 --minor-subsystem-version=0 --build-id=sha1 -T efi.lds -N prelink-efi.o efi/relocs-dummy.o /home/cardoe/work/xen/xen/common/symbols-dummy.o efi/buildid.o -o /home/cardoe/work/xen/xen/.xen.efi.0xffff82d0c0000000.0 && :
efi/buildid.o: file not recognized: File format is ambiguous
efi/buildid.o: matching formats: coff-x86-64 pe-x86-64


Here's the Xen EFI maintainer requesting some info from the binutils maintainers:

https://sourceware.org/ml/binutils/2016-12/msg00374.html

Here's the thread on the Xen mailing list about it: https://lists.xenproject.org/archives/html/xen-devel/2016-12/msg00799.html

The maintainer suggested a change to how we build binutils: https://lists.xenproject.org/archives/html/xen-devel/2017-01/msg00404.html
Comment 1 Anthony Basile gentoo-dev 2017-01-06 15:51:02 UTC
I can't reproduce this.  Basically I only get `ld -melf_x86_64 ...` and `ld -melf_i386 ...` on my ABI="amd64 x86" system.  These seem to be driven by XEN_TARGET_ARCH=x86_64 and x86_32.  The build system selects makefile rules from config/x86_64.mk and config/x86_32.mk which set LDFLAGS_DIRECT fed to ld.  But I didn't really dig any deeper to figure out how these are detected.  However, I'm pretty sure there's nothing to fix in binutils.
Comment 2 SpanKY gentoo-dev 2017-02-15 08:38:55 UTC
you've built with USE=multitarget which means you have a linker that supports all possible emulations.  if XEN can't figure out how to pass a proper -m flag to ld, there isn't much we can do about it.

you can always try building w/out USE=multitarget.