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

Problems configuring rtems-cygwin-m68k




Tim Riches wrote:
> 
> I'm having problems configuring Rtems for m68k-elf.
> 
> Environment:
> cygwin 1.1.6 under NT4 SP6
> binutils package (2000-1221-1)
> newlib package  (1.9.0)
> gcc  (2.95.2-5)
> rtems (4.5.0)
> PATH  /bin    /usr/local/bin    /usr
> 
> I have successfully built the binutils with configure options:
> /home/build-bin
> /binutils-20001221-1/configure --target=m68k-elf --prefix=/usr/local
> make
> make install
> 
> I have also built gcc successfully(?) having previously set up links for
> newlib, libgloss, include, gcc.
> /home/build-gcc
> /gcc-2.95.2-5/configure --target=m68k-elf --prefix=/usr/local
> --enable-languages=c,c++  --with-newlib --with-as=/usr/local/m68k-elf/bin/as
> --with-ld=/usr/local/m68k-elf/bin/ld  -v
> make
> make install
> 
> [I used the --with-as= in the hope that calling gcc(cross-compiler) would
> hard code the path for its as and ld]
> 
> When I come to configure the rtems it appears to check the native compiler
> then later the cross-compiler, the second check fails.
> 
> configure options for rtems:
> /home/build-rtems
> /rtems-4.5.0/configure --target=m68k-elf --prefix=/usr/local
> --enable-rtemsbsp=gen68360  --program-prefix=m68k-elf-
> Output listing:
> ##########################################################
> checking if cpu m68k is supported... yes
> checking for m68k-elf-gcc... /usr/local/bin/m68k-elf-gcc
> checking whether the C compiler (/usr/local/bin/m68k-elf-gcc  ) works... no
> configure: error: installation or configuration problem: C compiler cannot
> create executables.
> configure: error: /rtems-4.5.0/c/make/configure failed for make
> configure: error: /rtems-4.5.0/c/configure failed for c
> ###########################################################
> Interesting thing is that m68k-elf-gcc does work! - in as much as it
> compiled a small program which ran on our target hardware without
> problems.

I don't think this is exactly what Chris ran into since I don't 
think you have gotten that far.  This test tries to do this:

XXX-gcc -o contest conftest.c

where conftest.c is

main(){return 0;}

If that compiles and links successfully, then it will try to execute
./conftest.  You appear to be failing on the link.  Chris can link
a program but cygwin on NT/2K will actually execute the resulting
executable and lock up.  You can launch another window and kill
it but (unlike UNIX), cygwin does not refuse to execute foriegn 
executables.  

In general terms, you should be using the real m68k-rtems target.
Although it is very similar to and based upon m68k-elf, there are
likely to be subtle differences in gcc configuration.  For newlib,
the differences are NOT subtle!! You will end up without the
.h files from newlib/libc/sys/rtems installed. :)

> Any ideas/suggestions would be appreciated.
> 
> ==========================================
> Tim Riches
> Principal Design Engineer
> 
> Westbridge Design Ltd
> Hurst Barns
> Hurst Lane
> Privett, Alton
> Hants
> GU34 3PL
> UK
> 
> e-mail: tim.riches at westbridge-design.co.uk
> Tel: +44 (0)1730 828111
> Fax: +44 (0)1730 828123

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985