Gentoo Archives: gentoo-alt

From: Michael Weiser <michael@×××××××××××××××.net>
To: gentoo-alt <gentoo-alt@l.g.o>
Subject: [gentoo-alt] ld wrapper and cross-binutils
Date: Sun, 03 Apr 2016 17:00:30
Message-Id: 20160403161806.GA16241@weiser.dinsnail.net
1 Hi again, ;)
2
3 I'm once again looking into building cross toolchains on OS X using
4 Prefix and crossdev. Thanks to his Greg's patch to crossdev at
5 https://github.com/gmt/crossdev-prefix-compat-fixes/tree/master/portage_diffs
6 I have a much less bleak outlook on trying than last time. I haven't got
7 a working toolchain yet but want to share my experiences early so I
8 don't waste time on things that can never work.
9
10 For now I ran into one quite basic problem: The ld wrapper from
11 binutils-config-5 does not support distinguishing between CHOST and
12 CTARGET. So after successfully installing e.g.
13 cross-arm-something-or-other/binutils it will report
14
15 michael@osx1011:~ # arm-something-or-other-ld
16 sh: binutils-config: command not found
17 arm-something-or-other-ld: failed to locate the real ld!
18
19 dtruss -n ld show that it's looking for
20 EPREFIX/usr/CHOST/binutils-bin/CURRENT-from-etc-env.d-bintuils-config-CHOST/arm-something-or-other-ld
21 which obviously is quite wrong.
22
23 I've generated a patch that makes ldwrapper look at all the config-*
24 files in /etc/env.d/binutils and compare their names to the name it was
25 called with. If a match is found the name of that config is used as
26 CTARGET for constructing paths to ld which makes the above call work as
27 expected.
28
29 Would there be any interest in adding this functionality to Prefix?
30 --
31 Micha
32 Dagegen!

Replies

Subject Author
Re: [gentoo-alt] ld wrapper and cross-binutils Fabian Groffen <grobian@g.o>