[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] autoconf help



On 27 Mar 2001 21:58:04 +0100, ross wrote:
> > And.. why can't you do the compile on the MIPs machine? Or is that too
> > easy???
> 
> i suppose it would be possible.... havn't located any tools for the device at 
> the mo..... but vr4100  [at]  66mhz won't exactly provide a speedy comile ;-)

Ahh, we're talking about a pda here? Now I see ;-)

> > Given you're using autoconf, is there any reason why:
> >
> >     ./configure --target=mipsel-linuxelf
> >
> > .. doesn't work?
> >
> 
> i havn't tried to be honest as linuxelf is not listed as an explicit option. 
> the configure.in gives the following options

When you cross-compile, it's not just about targetting the architecture.
That just means you're producing valid object files, nothing more. You
need to be able to get the operating system to execute that file, for
example, so you need to target that too. For example, it's perfectly
possible for me on i386-linux to target i386-win32, and build windows
programs from my linux box. A lot of wxWindows developers do that.


> if test "$GCC" = yes
> then
>     if test -z "$arch"
>     then
>       case "$host" in
>           i386-*)           ;;
>           i?86-*)           arch="-m486" ;;
>           arm*-empeg-*)     arch="-march=armv4 -mtune=strongarm1100" ;;
>           armv4*-*)         arch="-march=armv4 -mtune=strongarm" ;;
>           powerpc-*)        ;;
>           mips*-agenda-*)   arch="-mcpu=vr4100" ;;
>           mips*-luxsonor-*) arch="-mips1 -mcpu=r3000 -Wa,-m4010" ;;
>       esac
>     fi
> 
> i've tried ./configure --build=mips and several variations (including 
> --target=) with no joy should i be looking at the 'mips*-agenda-*)' or 
> -'mcpu=vr4100' ?

Yep, you want mips*-agenda-*. But - the * denotes a wildcard, and in
this case, it's masking the OS portions of the target. So, I would
expect mipsel-agenda-linux to match that. You could try that. Somewhere
in the docs you got with it, I would expect that they would tell you
what the target is though, rather than trying to guess! mipsel-agenda-vr
might work, or mipsel-agenda-linux-vr. 

You could also configure for Linux, build the Makefile, and alter it for
mipsel-linux. That would mean setting CC in the Makefile to
mipsel-linux-gcc rather than gcc, etc. etc. Since you're just
retargetting for CPU rather than OS (pretty much) that will do the job.
You'll also need to point the linker at the mipsel libraries, rather
than the i386 ones, and at the agenda kernel headers (those are bound to
be different).

Cheers,

Alex.
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word 
 "unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.