* Generating a movable SDK
@ 2012-06-19 17:03 Steve English
2012-06-19 20:33 ` Khem Raj
0 siblings, 1 reply; 7+ messages in thread
From: Steve English @ 2012-06-19 17:03 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]
Hi,
I've generated a cross compiling ARM SDK
(angstrom-eglibc-x86_64-armv7a-v2012.05-toolchain.tar.bz2) that works great
if installed in /usr/local/oecore-x86_64. I would like to move these
binaries and run them from under my home directory (on this and other host
machines).
I can tweak the PATH and use --sysroot where appropriate, but the ELF
binaries themselves specify a loader of
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/lib/ld-linux-x86-64.so.2
in their .interp header. Is it possible to generate an SDK that uses the
standard host loader, or at least uses a relative path for the built loader?
I have also asked this question (in a slightly more generic form) on Stack
Overflow http://stackoverflow.com/q/11104609/307745
Thanks,
Steve
[-- Attachment #2: Type: text/html, Size: 862 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Generating a movable SDK
2012-06-19 17:03 Generating a movable SDK Steve English
@ 2012-06-19 20:33 ` Khem Raj
2012-06-20 6:03 ` Tasslehoff Kjappfot
0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2012-06-19 20:33 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 999 bytes --]
On Tuesday, June 19, 2012, Steve English <steve.english@navetas.com> wrote:
> Hi,
> I've generated a cross compiling ARM SDK
(angstrom-eglibc-x86_64-armv7a-v2012.05-toolchain.tar.bz2) that works great
if installed in /usr/local/oecore-x86_64. I would like to move these
binaries and run them from under my home directory (on this and other host
machines).
>
> I can tweak the PATH and use --sysroot where appropriate, but the ELF
binaries themselves specify a loader of
/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/lib/ld-linux-x86-64.so.2
in their .interp header. Is it possible to generate an SDK that uses the
standard host loader, or at least uses a relative path for the built loader?
Sdk is not install time relocatable yet there is a feature enhancement
request in yo to bugzilla for the same
M>
> I have also asked this question (in a slightly more generic form) on
Stack Overflow http://stackoverflow.com/q/11104609/307745
>
> Thanks,
>
> Steve
>
[-- Attachment #2: Type: text/html, Size: 1180 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Generating a movable SDK
2012-06-19 20:33 ` Khem Raj
@ 2012-06-20 6:03 ` Tasslehoff Kjappfot
2012-06-20 11:02 ` Steve English
2012-07-04 6:43 ` Tasslehoff Kjappfot
0 siblings, 2 replies; 7+ messages in thread
From: Tasslehoff Kjappfot @ 2012-06-20 6:03 UTC (permalink / raw)
To: openembedded-core
On 06/19/2012 10:33 PM, Khem Raj wrote:
>
>
> On Tuesday, June 19, 2012, Steve English <steve.english@navetas.com
> <mailto:steve.english@navetas.com>> wrote:
> > Hi,
> > I've generated a cross compiling ARM SDK
> (angstrom-eglibc-x86_64-armv7a-v2012.05-toolchain.tar.bz2) that works
> great if installed in /usr/local/oecore-x86_64. I would like to move
> these binaries and run them from under my home directory (on this and
> other host machines).
> >
> > I can tweak the PATH and use --sysroot where appropriate, but the ELF
> binaries themselves specify a loader of
> /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/lib/ld-linux-x86-64.so.2
> in their .interp header. Is it possible to generate an SDK that uses the
> standard host loader, or at least uses a relative path for the built loader?
>
>
> Sdk is not install time relocatable yet there is a feature enhancement
> request in yo to bugzilla for the same
>
That request is mine, I think. I have gotten around this by making
/usr/local/oecore-i686 a symlink to where I want to keep the toolchain
(in a vcs). Works like a charm.
- Tasslehoff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Generating a movable SDK
2012-06-20 6:03 ` Tasslehoff Kjappfot
@ 2012-06-20 11:02 ` Steve English
2012-07-04 6:43 ` Tasslehoff Kjappfot
1 sibling, 0 replies; 7+ messages in thread
From: Steve English @ 2012-06-20 11:02 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 1757 bytes --]
On Wed, Jun 20, 2012 at 7:03 AM, Tasslehoff Kjappfot <tasskjapp@gmail.com>wrote:
> On 06/19/2012 10:33 PM, Khem Raj wrote:
>
>> Sdk is not install time relocatable yet there is a feature enhancement
>> request in yo to bugzilla for the same
>>
>> That request is mine, I think. I have gotten around this by making
> /usr/local/oecore-i686 a symlink to where I want to keep the toolchain (in
> a vcs). Works like a charm.
>
I've got it to run by:
1. Changing the dynamic loader to the system loader and making RPATH
directives use relative paths in the elf files in:
*
x86_64-angstromsdk-linux/usr/libexec/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/
* x86_64-angstromsdk-linux/usr/bin/armv7a-angstrom-linux-gnueabi
with patchelf (http://nixos.org/patchelf.html):
for x in *; do echo $x; patchelf --set-interpreter
/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 $x; patchelf --set-rpath
"\$ORIGIN/../../lib/armv7a-angstrom-linux-gnueabi/:\$ORIGIN/../../../lib/:\$ORIGIN/../../lib"
$x; done
2. Making the symlinks in
x86_64-angstromsdk-linux/usr/libexec/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4/
use relative paths:
x86_64-angstromsdk-linux/usr/libexec/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4$
cat tweak_target.sh
#!/bin/bash
FILE=`basename $1`
ln -f -s ../../../../../bin/armv7a-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-$FILE
$FILE
x86_64-angstromsdk-linux/usr/libexec/armv7a-angstrom-linux-gnueabi/gcc/arm-angstrom-linux-gnueabi/4.5.4$
find . -type l -exec ./tweak_target.sh {} \;
This feels like a rather unpleasant hack so I'm going to use the
codesourcery compiler for now, but this does appear to work.
Thanks,
Steve
[-- Attachment #2: Type: text/html, Size: 2248 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Generating a movable SDK
2012-06-20 6:03 ` Tasslehoff Kjappfot
2012-06-20 11:02 ` Steve English
@ 2012-07-04 6:43 ` Tasslehoff Kjappfot
2012-07-05 18:02 ` McClintock Matthew-B29882
2012-07-05 19:21 ` Richard Purdie
1 sibling, 2 replies; 7+ messages in thread
From: Tasslehoff Kjappfot @ 2012-07-04 6:43 UTC (permalink / raw)
To: openembedded-core
On 06/20/2012 08:03 AM, Tasslehoff Kjappfot wrote:
> On 06/19/2012 10:33 PM, Khem Raj wrote:
>>
>>
>> On Tuesday, June 19, 2012, Steve English <steve.english@navetas.com
>> <mailto:steve.english@navetas.com>> wrote:
>> > Hi,
>> > I've generated a cross compiling ARM SDK
>> (angstrom-eglibc-x86_64-armv7a-v2012.05-toolchain.tar.bz2) that works
>> great if installed in /usr/local/oecore-x86_64. I would like to move
>> these binaries and run them from under my home directory (on this and
>> other host machines).
>> >
>> > I can tweak the PATH and use --sysroot where appropriate, but the ELF
>> binaries themselves specify a loader of
>> /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/lib/ld-linux-x86-64.so.2
>>
>> in their .interp header. Is it possible to generate an SDK that uses the
>> standard host loader, or at least uses a relative path for the built
>> loader?
>>
>>
>> Sdk is not install time relocatable yet there is a feature enhancement
>> request in yo to bugzilla for the same
>>
> That request is mine, I think. I have gotten around this by making
> /usr/local/oecore-i686 a symlink to where I want to keep the toolchain
> (in a vcs). Works like a charm.
>
> - Tasslehoff
But now I wish the sdk was relocatable again.
As I said we have the sdk in our vcs, and a symlink in /usr/local to
make the toolchain binaries happy. We have a build server that does
continous builds, and she has multiple trees checked out, so the
symlink-approach is not ideal.
Any clever workaround for this (or even better, a fix to make the sdk
relocatable)?
- Tasslehoff
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Generating a movable SDK
2012-07-04 6:43 ` Tasslehoff Kjappfot
@ 2012-07-05 18:02 ` McClintock Matthew-B29882
2012-07-05 19:21 ` Richard Purdie
1 sibling, 0 replies; 7+ messages in thread
From: McClintock Matthew-B29882 @ 2012-07-05 18:02 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Wed, Jul 4, 2012 at 1:43 AM, Tasslehoff Kjappfot <tasskjapp@gmail.com> wrote:
> On 06/20/2012 08:03 AM, Tasslehoff Kjappfot wrote:
>>
>> On 06/19/2012 10:33 PM, Khem Raj wrote:
>>>
>>>
>>>
>>> On Tuesday, June 19, 2012, Steve English <steve.english@navetas.com
>>> <mailto:steve.english@navetas.com>> wrote:
>>> > Hi,
>>> > I've generated a cross compiling ARM SDK
>>> (angstrom-eglibc-x86_64-armv7a-v2012.05-toolchain.tar.bz2) that works
>>> great if installed in /usr/local/oecore-x86_64. I would like to move
>>> these binaries and run them from under my home directory (on this and
>>> other host machines).
>>> >
>>> > I can tweak the PATH and use --sysroot where appropriate, but the ELF
>>> binaries themselves specify a loader of
>>>
>>> /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/lib/ld-linux-x86-64.so.2
>>>
>>> in their .interp header. Is it possible to generate an SDK that uses the
>>> standard host loader, or at least uses a relative path for the built
>>> loader?
>>>
>>>
>>> Sdk is not install time relocatable yet there is a feature enhancement
>>> request in yo to bugzilla for the same
>>>
>> That request is mine, I think. I have gotten around this by making
>> /usr/local/oecore-i686 a symlink to where I want to keep the toolchain
>> (in a vcs). Works like a charm.
>>
>> - Tasslehoff
>
>
> But now I wish the sdk was relocatable again.
>
> As I said we have the sdk in our vcs, and a symlink in /usr/local to make
> the toolchain binaries happy. We have a build server that does continous
> builds, and she has multiple trees checked out, so the symlink-approach is
> not ideal.
>
> Any clever workaround for this (or even better, a fix to make the sdk
> relocatable)?
chroot jail could work for you... a bit more effort though.
-M
>
>
> - Tasslehoff
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Generating a movable SDK
2012-07-04 6:43 ` Tasslehoff Kjappfot
2012-07-05 18:02 ` McClintock Matthew-B29882
@ 2012-07-05 19:21 ` Richard Purdie
1 sibling, 0 replies; 7+ messages in thread
From: Richard Purdie @ 2012-07-05 19:21 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Wed, 2012-07-04 at 08:43 +0200, Tasslehoff Kjappfot wrote:
> On 06/20/2012 08:03 AM, Tasslehoff Kjappfot wrote:
> > On 06/19/2012 10:33 PM, Khem Raj wrote:
> >>
> >>
> >> On Tuesday, June 19, 2012, Steve English <steve.english@navetas.com
> >> <mailto:steve.english@navetas.com>> wrote:
> >> > Hi,
> >> > I've generated a cross compiling ARM SDK
> >> (angstrom-eglibc-x86_64-armv7a-v2012.05-toolchain.tar.bz2) that works
> >> great if installed in /usr/local/oecore-x86_64. I would like to move
> >> these binaries and run them from under my home directory (on this and
> >> other host machines).
> >> >
> >> > I can tweak the PATH and use --sysroot where appropriate, but the ELF
> >> binaries themselves specify a loader of
> >> /usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-linux/lib/ld-linux-x86-64.so.2
> >>
> >> in their .interp header. Is it possible to generate an SDK that uses the
> >> standard host loader, or at least uses a relative path for the built
> >> loader?
> >>
> >>
> >> Sdk is not install time relocatable yet there is a feature enhancement
> >> request in yo to bugzilla for the same
> >>
> > That request is mine, I think. I have gotten around this by making
> > /usr/local/oecore-i686 a symlink to where I want to keep the toolchain
> > (in a vcs). Works like a charm.
> >
> > - Tasslehoff
>
> But now I wish the sdk was relocatable again.
>
> As I said we have the sdk in our vcs, and a symlink in /usr/local to
> make the toolchain binaries happy. We have a build server that does
> continous builds, and she has multiple trees checked out, so the
> symlink-approach is not ideal.
>
> Any clever workaround for this (or even better, a fix to make the sdk
> relocatable)?
There is work underway to make it relocatable as part of the 1.3
release:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=2383
Cheers,
Richard
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-07-05 19:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-19 17:03 Generating a movable SDK Steve English
2012-06-19 20:33 ` Khem Raj
2012-06-20 6:03 ` Tasslehoff Kjappfot
2012-06-20 11:02 ` Steve English
2012-07-04 6:43 ` Tasslehoff Kjappfot
2012-07-05 18:02 ` McClintock Matthew-B29882
2012-07-05 19:21 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox