* [Buildroot] Relocate uClibc toolchain question
@ 2012-09-10 18:21 Rishi
2012-09-10 20:14 ` Samuel Martin
2012-09-11 10:29 ` Grant Edwards
0 siblings, 2 replies; 4+ messages in thread
From: Rishi @ 2012-09-10 18:21 UTC (permalink / raw)
To: buildroot
Hello,
I have built a uClibc toolchain using Buildroot 2012.05.
- uClibc 0.9.33
- gcc 4.6.x
- C++ support
The toolchain works perfectly but I want to move it from my home
directory to a directory that can be shared with the team, like
/opt/arm_uClibc/..
I performed a "cp -rf output/host/ /opt/arm_uClibc" and then attempted
to use this compiler by passing the --sysroot option as suggested in
Documentation.
(http://buildroot.uclibc.org/downloads/manual/manual.html#_using_the_generated_toolchain_outside_buildroot)
This seemed to be working but as soon as I performed a distclean in my
buildroot area the toolchain broke; it could not find libmpc.so.2 as
well as C standard include headers.
Executing command:
arm-linux-g++ -c -Wall --sysroot=/opt/arm_uClibc main.cpp
2 questions:
1. Any ideas on how to fix this? Codesourcery toolchain does not have
libmpc.so.2, so I was a bit puzzled.
2. Why doesn't CodeSourcery's toolchain require this sysroot thing? I
can move their compiler anywhere and it works perfectly fine.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Relocate uClibc toolchain question
2012-09-10 18:21 [Buildroot] Relocate uClibc toolchain question Rishi
@ 2012-09-10 20:14 ` Samuel Martin
2012-09-10 20:31 ` Yann E. MORIN
2012-09-11 10:29 ` Grant Edwards
1 sibling, 1 reply; 4+ messages in thread
From: Samuel Martin @ 2012-09-10 20:14 UTC (permalink / raw)
To: buildroot
Hello,
2012/9/10 Rishi <rishid+mailman@gmail.com>:
> Hello,
>
> I have built a uClibc toolchain using Buildroot 2012.05.
> - uClibc 0.9.33
> - gcc 4.6.x
> - C++ support
>
> The toolchain works perfectly but I want to move it from my home
> directory to a directory that can be shared with the team, like
> /opt/arm_uClibc/..
>
> I performed a "cp -rf output/host/ /opt/arm_uClibc" and then attempted
> to use this compiler by passing the --sysroot option as suggested in
> Documentation.
> (http://buildroot.uclibc.org/downloads/manual/manual.html#_using_the_generated_toolchain_outside_buildroot)
Afaik, Buildroot toolchain are not yet fully relocatable (personally,
I would not trust the 3rd paragraph of the section).
However, both solutions (based on adding output/host/usr/bin to your
PATH or changing the host directory location) should works.
I'd suggest to not move the toolchain built by Buildroot since some
stuff (such as RPATH and so on) are set with absolute pathes.
>
> This seemed to be working but as soon as I performed a distclean in my
> buildroot area the toolchain broke; it could not find libmpc.so.2 as
> well as C standard include headers.
>
> Executing command:
> arm-linux-g++ -c -Wall --sysroot=/opt/arm_uClibc main.cpp
>
> 2 questions:
> 1. Any ideas on how to fix this? Codesourcery toolchain does not have
> libmpc.so.2, so I was a bit puzzled.
Afaik, libmpc is not a mandatory for a toolchain (you don't need it
for building the toolchain itself).
> 2. Why doesn't CodeSourcery's toolchain require this sysroot thing? I
> can move their compiler anywhere and it works perfectly fine.
Sourcery guys manage to build fully relocatable toolchains since
anything (from the toolchain) referring to other part of the toolchain
does use relative path or is able to resolve the absolute path from
the location where it is installed.
If you have a CodeSourcery's toolchain, try to run :
./ia32-2011.09/bin/i686-pc-linux-gnu-gcc -print-sysroot
Btw, this is on the Buildroot todo list:
http://elinux.org/Buildroot#Core_Buildroot_infrastructure
Cheers,
--
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Relocate uClibc toolchain question
2012-09-10 20:14 ` Samuel Martin
@ 2012-09-10 20:31 ` Yann E. MORIN
0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2012-09-10 20:31 UTC (permalink / raw)
To: buildroot
Sameul, Rishi, All,
On Monday 10 September 2012 22:14:42 Samuel Martin wrote:
> 2012/9/10 Rishi <rishid+mailman@gmail.com>:
> > I performed a "cp -rf output/host/ /opt/arm_uClibc" and then attempted
> > to use this compiler by passing the --sysroot option as suggested in
> > Documentation.
> > (http://buildroot.uclibc.org/downloads/manual/manual.html#_using_the_generated_toolchain_outside_buildroot)
> Afaik, Buildroot toolchain are not yet fully relocatable
IIRC, that's right.
> However, both solutions (based on adding output/host/usr/bin to your
> PATH or changing the host directory location) should works.
Right again. In Rishi's case, I'd suggest (s)he sets the host directory
location, and rebuilds from scratch.
> > 1. Any ideas on how to fix this? Codesourcery toolchain does not have
> > libmpc.so.2, so I was a bit puzzled.
> Afaik, libmpc is not a mandatory for a toolchain (you don't need it
> for building the toolchain itself).
Wrong. gcc needs mpc to do calculations on complex numbers. gcc needs a few
other such libraries (which I call "companion libraries"):
gmp GNU Multi-Precision arithmetic library
mpfr Multiple-Precision Floating-point with correct Rounding
mpc Multiple-Precision on Complex numbers
ppl Parma-Polyhedral Library
cloog/ppl Chunky LOOp Generator with PPL as backend
And I would guess CS toolchain are statically linked against libmpc, hence
the reason there's no such lib in their toolchain, as they do for the other
companion libraries.
Static linking against the companion libraries is also what crosstool-NG
does.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Relocate uClibc toolchain question
2012-09-10 18:21 [Buildroot] Relocate uClibc toolchain question Rishi
2012-09-10 20:14 ` Samuel Martin
@ 2012-09-11 10:29 ` Grant Edwards
1 sibling, 0 replies; 4+ messages in thread
From: Grant Edwards @ 2012-09-11 10:29 UTC (permalink / raw)
To: buildroot
On 2012-09-10, Rishi <rishid+mailman@gmail.com> wrote:
> Hello,
>
> I have built a uClibc toolchain using Buildroot 2012.05.
> - uClibc 0.9.33
> - gcc 4.6.x
> - C++ support
>
> The toolchain works perfectly but I want to move it from my home
> directory to a directory that can be shared with the team, like
> /opt/arm_uClibc/..
In that case, it might be easier to use Crosstool-NG to build a
toolchain. AFAICT, the toolchains it generates can be moved anywhere
(even to different machines). [Though I think you do need the
sysroot option when you run a relocated ctng toolchain.]
--
Grant
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-11 10:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-10 18:21 [Buildroot] Relocate uClibc toolchain question Rishi
2012-09-10 20:14 ` Samuel Martin
2012-09-10 20:31 ` Yann E. MORIN
2012-09-11 10:29 ` Grant Edwards
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox