Sorry, I should have been more specific. Yes, a cross-compiler for ARM (we're building for cortex-a8, which is why we're interested in the neon optimizations). As I mentioned, I can't use the one that's available as a debian pkg built by Linaro, because I need to use the toolchain in Scratchbox, which has a rather old libc (in its host_shared/lib), and the Linaro one was built against a very new libc. I checked with scratchbox.org, and there are no current plans to update the host_shared libc, so, if the CS 4.5.1 doesn't have those same neon optimizations, then my only other recourse is to try and build the linaro 4.5.2 myself (since I need this "yesterday" :P ). So I was hoping the build process that's being used to build the cross for ARM would be documented somewhere, so I could do the same steps, just on an earlier Ubuntu (dapper), but I wasn't able to find anything on the Linaro site.

Thanks,
Diane

On Sat, Mar 26, 2011 at 3:18 AM, Andrew Stubbs <ams@codesourcery.com> wrote:
On 25/03/11 21:48, Diane Holt wrote:
I hope you don't mind me sending you mail, but I'm a bit stuck...I've
been told I need the Linaro 4.5.2 toolchain because it has some "neon
optimizations" that the CS 4.5.1 doesn't have.

In general, you'd be better addressing these questions on the Linaro Toolchain mailing list: linaro-toolchain@lists.linaro.org (I've copied it in).

Not least because I'm on vacation for the next week. :)


> Unfortunately, the Linaro
4.5.2 that's available for download (already built) won't work in my
Scratchbox environment, since it was compiled against a glibc that's too
new. The CS 4.5.1 works fine -- but I'm not allowed to use it, because
of the neon stuff.

The CS and Linaro compilers are really very similar, but CodeSourcery has not made a release since the autumn, so Linaro will have some extra features.


Do you know whether CS actually does have (or will have) the same neon
optimizations Linaro has?

It depends which optimizations you are referring to? The existing CS release had the latest improvements at the time it was released, and I believe that the upcoming release will probably be very similar to Linaro (at least, with respect to ARMv7 - there'll be many differences for other architecture variants), but I'm not promising that.

Sorry if that's a bit vague, but I the contents of the next CS release is still not finalised.


If it doesn't (and won't), then I'm going to have to build the Linaro
one from source. Unfortunately, I've not been able to find any detailed
information on how to go about doing that. Do you know if that's
documented anywhere?

Are you talking about building native compiler, or a cross-compiler? The former is very simple (provided you have all the dependencies), while the latter is more involved.

Here's the recipe to build a native compiler:

  tar xf gcc-linaro.....tar.bz2
  mkdir objdir
  cd objdir
  ../gcc-linaro....../configure --prefix=<your-install-path> <opts>
  make bootstrap
  make install

You can copy the configure <opts> from another compiler using 'gcc -v' and './configure --help' in the source tree should tell you what they mean.

If you want to build a cross compiler, I suggest you look at crosstool or crosstool-ng, or OpenEmbedded. Building cross-toolchains is non-trivial.

Hope that helps.

Andrew