Subject: Re: Building for both ARM V4 and ARM V5 systems
To: Richard Earnshaw <Richard.Earnshaw@buzzard.freeserve.co.uk>
From: Bucky Katz <bucky@picovex.com>
List: port-arm
Date: 08/07/2006 13:42:46
Richard Earnshaw <Richard.Earnshaw@buzzard.freeserve.co.uk> writes:

> On Mon, 07 Aug 2006 11:07:05 PDT, Bucky Katz wrote:
>
>> We're using a mk.conf file and I had thought the solution would be to
>> put CPUFLAGS+=-march=armv4t and then overide it in the kernel makefile
>> fragment.  If I'm clever and only set MAKECONF when I'm doing userland
>> builds, that works, but then I try to use build.sh to make release,
>> and that of course doesn't allow me to use that trick.
>> 
>> So my question is: How do I build a v4t userland and
>> build both v4t and v5t kernels out of the release target?
>
> Just use build.sh's -V option to set MAKECONF.  Here's the line from my 
> meta build script:
>
> nice ./build.sh -B rwe-`date +%Y%m%d` -D $build/install -O $build/src -R 
> $build/
> dist -T $build/tools -U -m $1 -X $xsrc -V MAKECONF=${conf} -x -u release > 
> $buil
> d/build.log 2>&1
>
> obviously you'll have to fill in the various variables, but I can assure 
> you that it does work.  My mk.conf contains
>
> CPUFLAGS=-mtune=xscale  -march=armv5te
> AFLAGS=-mtune=xscale -march=armv5te
>
> for one xscale board I build for, and
>
> CPUFLAGS=-mcpu=strongarm
> AFLAGS=-mcpu=strongarm
>
> for a strongarm board.

That's what I'm doing, but it doesn't work if the userland is v4t, the
kernel is v5t and you try to make relase with build.sh.

As far as I've found there's no combination of arch, cpu, and tune
flags that won't cause gcc to get heart burn. What am I missing?