All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Codesourcery multi-lib selection in buildroot
@ 2011-05-04 20:52 Matias Garcia
  2011-05-05 19:10 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Matias Garcia @ 2011-05-04 20:52 UTC (permalink / raw)
  To: buildroot

I'm building an OS for a PowerPC e500v2 core. Originally, I used a stock 
buildroot toolchain (uclibc), but was not able to optimize a 
time-critical section of our application. With the CodeSourcery 
compiler, I am. Unfortunately, even setting -te500v2 in the buildroot 
optimizations (and hacking it into the TARGET_LDFLAGS) doesn't fix all 
cases. Certain packages within buildroot seem to link against the wrong 
library (linker complains that one library is compiled with hard-float 
and another with soft-float, etc). Is there a way to tell buildroot (or 
Make in general) to always link against a certain library set?

Cheers,
Matias
-- 
	*Matias Garcia*
/Embedded Software Developer/
Ross Video | Live Production Technology
www.rossvideo.com <http://www.rossvideo.com>
+1 (613) 228 1198 x4264

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] Codesourcery multi-lib selection in buildroot
  2011-05-04 20:52 [Buildroot] Codesourcery multi-lib selection in buildroot Matias Garcia
@ 2011-05-05 19:10 ` Thomas Petazzoni
  2011-05-06 18:38   ` Matias Garcia
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2011-05-05 19:10 UTC (permalink / raw)
  To: buildroot

On Wed, 04 May 2011 16:52:08 -0400
Matias Garcia <mgarcia@rossvideo.com> wrote:

> I'm building an OS for a PowerPC e500v2 core. Originally, I used a
> stock buildroot toolchain (uclibc), but was not able to optimize a 
> time-critical section of our application. With the CodeSourcery 
> compiler, I am. Unfortunately, even setting -te500v2 in the buildroot 
> optimizations (and hacking it into the TARGET_LDFLAGS) doesn't fix
> all cases. Certain packages within buildroot seem to link against the
> wrong library (linker complains that one library is compiled with
> hard-float and another with soft-float, etc). Is there a way to tell
> buildroot (or Make in general) to always link against a certain
> library set?

We have to make sure that this -te500v2 flag is passed to all packages
during their build process. Which packages are causing problems
exactly ?

Another solution is to try the recent proposal of Peter Korsgaard to
use a wrapper for external toolchain components, that would enforce the
use of selected compiler flags so that the selected sysroot would
always be correct.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] Codesourcery multi-lib selection in buildroot
  2011-05-05 19:10 ` Thomas Petazzoni
@ 2011-05-06 18:38   ` Matias Garcia
  0 siblings, 0 replies; 3+ messages in thread
From: Matias Garcia @ 2011-05-06 18:38 UTC (permalink / raw)
  To: buildroot

On 11-05-05 03:10 PM, Thomas Petazzoni wrote:
> On Wed, 04 May 2011 16:52:08 -0400
> Matias Garcia<mgarcia@rossvideo.com>  wrote:
>
>> I'm building an OS for a PowerPC e500v2 core. Originally, I used a
>> stock buildroot toolchain (uclibc), but was not able to optimize a
>> time-critical section of our application. With the CodeSourcery
>> compiler, I am. Unfortunately, even setting -te500v2 in the buildroot
>> optimizations (and hacking it into the TARGET_LDFLAGS) doesn't fix
>> all cases. Certain packages within buildroot seem to link against the
>> wrong library (linker complains that one library is compiled with
>> hard-float and another with soft-float, etc). Is there a way to tell
>> buildroot (or Make in general) to always link against a certain
>> library set?
> We have to make sure that this -te500v2 flag is passed to all packages
> during their build process. Which packages are causing problems
> exactly ?
Among others, freetype, jpeg-8b, liblockfile, libsysfs, libusb, 
libusb-compat, liblzo, and imlib2 (which I've hacked into the build 
based on ImageMagick). Most often, the error is 'Warning: 
<...>/cr[blah].o uses hard float, <...>/blah uses soft float'.
> Another solution is to try the recent proposal of Peter Korsgaard to
> use a wrapper for external toolchain components, that would enforce the
> use of selected compiler flags so that the selected sysroot would
> always be correct.
That would be magical. I'm testing Peter's patch right now with a tree 
updated to his commit removing CFLAGS (yesterday), but I've hit a snag. 
It looks to me like unless I define some variables to tell buildroot I 
want -mcpu=854[0|8] -mabi=spe -mspe -mhard-float -mgprs-float=double (if 
memory serves), the wrapper will assume I want generic powerpc, as the 
target optimizations don't seem to be passed in. I'd even prefer to tell 
the compiler that I want -te500v2 instead since it's a handy-dandy 
shortcut that CodeSourcery provides for the above options, but I'll take 
what I can get. Any suggestions for a simple solution? I've defined an 
e500 option under target arch before, but I'd rather avoid that if possible.

Thanks,
Matias

> Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-05-06 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-04 20:52 [Buildroot] Codesourcery multi-lib selection in buildroot Matias Garcia
2011-05-05 19:10 ` Thomas Petazzoni
2011-05-06 18:38   ` Matias Garcia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.