Thanks, Michael, that's the sort of thing I was hoping for. And it almost worked :)

The Dapper desktop VMWare appliance I got from Ubuntu didn't have these needed packages: bison, curl, flex, and texinfo. So I needed to install them.

Without curl, the downloads won't happen.

Without texinfo, makeinfo isn't found, which comes out looking like a warning, but it does fail the build.

Without bison and flex, you get a funky build failure for binutils -- it tries to link both sysinfo.o and syslex.o into sysinfo (which results in two main()'s being defined).

I needed to get and build tar-1.22, since your tar command uses -a, which the tar that comes with Dapper doesn't have. (Not sure when it was introduced, so I just went with the version that was on my lucid, since that one has it.)

There is no binutils_2.21.0.20110302.orig.tar.gz -- it's binutils_2.21.0.20110322.orig.tar.gz

Needed to get and build gmp, mpfr, and mpc, and add --with-gmp, --with-mpfr, and --with-mpc to GCCFLAGS.

The build got pretty far, but eventually failed with:

make[4]: Entering directory `/home/ubuntu/work/build/gcc/libiberty/testsuite'
make[4]: Nothing to be done for `install'.
make[4]: Leaving directory `/home/ubuntu/work/build/gcc/libiberty/testsuite'
make[3]: Leaving directory `/home/ubuntu/work/build/gcc/libiberty'
/bin/sh: line 3: cd: arm-linux-gnueabi/libstdc++-v3: No such file or directory
make[2]: *** [install-target-libstdc++-v3] Error 1
make[2]: Leaving directory `/home/ubuntu/work/build/gcc'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/ubuntu/work/build/gcc'
make: *** [stamp/gcc-install] Error 2

Any idea what I need to do about that? (I tried adding --enable-languages=c,c++ but that didn't help.)

Thanks,
Diane

On Sun, Mar 27, 2011 at 12:31 PM, Michael Hope <michael.hope@linaro.org> wrote:
On Sun, Mar 27, 2011 at 12:00 PM, Diane Holt <holt.diane@gmail.com> wrote:
> 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.

Hi Diane.  The toolchain working group has assignees from
CodeSourcery, IBM, ARM, and Canonical.  We often get access to
improvements that CodeSourcery have done internally, and help get
those upstream and get them tested by using them in real products such
as Ubuntu.  CodeSourcery are free to pick up optimisations that Linaro
do up in the FSF trunk, such as the NEON improvements that Richard and
Ira are working on. The short story is that there's good
cross-pollination there.

Regarding building a new cross-compiler, have a look at my cross-build scripts:
 https://code.launchpad.net/~michaelh1/+junk/cross-build

and especially the cross-gcc directory.  This does a single stage
cross compiler build against a prebuilt binary sysroot like you have
at the moment.  Set PREFIX to where you want the compiler to install
to and modify SYSROOT and the $(stamp)sysroot-extract rule to point
the build at your scratchbox header files and includes.

It'll need a little bit of work.  If it turns out, could you send some
instructions to the list?

-- Michael