Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 49934 - add binutils private use flag "multiarch"
Summary: add binutils private use flag "multiarch"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-03 23:51 UTC by Clemens Fruhwirth
Modified: 2006-07-29 18:04 UTC (History)
1 user (show)

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


Attachments
multiarch use flag. (multiarch.diff,779 bytes, patch)
2004-05-03 23:52 UTC, Clemens Fruhwirth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Clemens Fruhwirth 2004-05-03 23:51:04 UTC
for cross-arch development, it comes handy when binutils is captable of handling more executable formats than just the one on the install machine. Following Debian's example (package: binutils-multiarch) I've added a new use flag to enable  all targets binutils is captable of. Patch attached.
Comment 1 Clemens Fruhwirth 2004-05-03 23:52:13 UTC
Created attachment 30671 [details, diff]
multiarch use flag.

set multiarch to enable all bfd targets.
Comment 2 solar (RETIRED) gentoo-dev 2004-05-14 15:12:49 UTC
robbat didn't you encounter problems with doing this in the past before?
Any reason we should not support this as either a multiarch or cross USE flag?
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-05-14 15:44:50 UTC
multiarch does NOT correct describe what --enable-targets=all does.
I did have success in using binutils with all-targets for some stuff I was doing.

namely, enable-targets=all provides MOST of binutils cross-platform stuff, but not for all of the binutils programs. 'as' is a notable exception that doesn't do multiple targets (which is a great pity and I believe the binutils people were working on removing this limitation).
ld does support multiple targets, and i've used it for that before.

call the use flag 'multitarget' when you include it, as it better describes what it is. beware that it massively expands the size of installed binutils, from ~10mb to ~50mb.
Comment 4 solar (RETIRED) gentoo-dev 2004-05-16 18:05:58 UTC
Added to portage >=sys-devel/binutils-2.14.90.0.8-r1

New local USE flag.

grep multitarget *
use.local.desc:sys-devel/binutils:multitarget - Adds support to binutils for canadian cross compiling. (does not work with gas)

Note: 
 This flag has to be best effort.
 There will be a number of patches that do not get applied 
 to binutils across the board for all arches so if you use it beware.
Comment 5 SasQ 2006-07-29 17:56:29 UTC
(In reply to comment #0)
> I've added a new use flag to enable  all targets binutils is captable of.
> Patch attached.

Is it possible to use this flag to make cross-compiling tools which will be able to build Win32 EXE PE binaries [pe-i386] as well as Linux ones? If yes, how to achieve it?

> For cross-arch development, it comes handy when binutils is captable of
> handling more executable formats than just the one on the install machine.

Seems like that flag is what I want, but how to choose executable formats which I need?
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-07-29 18:04:21 UTC
SasQ: yes, but the USE flag is called 'multitarget' now.

For using LD directly, this is the most of what you need:
ld -m i386pe 

Beyond that, go and look at Wine, or the SGI VISWS 320 bootloader.