This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Sorry, forgot to cc to crossgcc. -----Original Message----- From: Johansson Mikael Sent: den 24 april 2001 12:09 To: 'Jyrki O Saarinen' Subject: RE: cross compiling from platform PC-NT to M68040 Hello again! Thank you for taking time, hopefully I will be more contributive with input in progress of time as I'm keen on learning about gcc. I think this is an excellent forum for software as it should be, FREE. background: I have installed cygwin (b19) on my computer, a PC-NT (the problem with "can't find tmp" remains though, despite my efforts to make tmp directories all over the place) Anyway the bash is working despite the warning I think. My cygwin tools are placed at: c:/cygnus/b19/H-i386-win32/........ When I start the bash and pwd it I'm located at: //C/WINNT/Profiles/mikael/Desktop (so I have to cd to c:\tmp) When I echo $PATH I get: C//Cygnus/B19/H-i386-cygwin32/bin://C/WINNT/SYSTEM32://C/WINNT: My tmp directory is placed at: c:/tmp (this is where I have the folders src, build and crossgcc to ) I have downloaded the tar.gz-files you point out (gcc, binutils and newlib). Here are the steps I've taken: I have created the three folders tmp/src ,tmp/build and tmp/crossgcc. I have downloaded gcc-2.95.3.tar-gz, binutils-2.11.tar.gz and newlib-1.9.0 to tmp/src with winzip. I have moved /tmp/src/newlib-1.9.0/newlib to /tmp/src/gcc-2.95.3 I have copied /tmp/src/gcc-2.95.3/newlib/libc/include completely to directory /tmp/crossgcc. ( How can I copy files to tmp/crossgcc if I haven't created it ) In the bash I've navigated to src/binutils-2.11/config Where I have given the command: target=m68k-coff prefix=/tmp/crossgcc (doesn't accept --target... but target...) make Now I get the responce from bash: "No targets specified and no makefile found" Mikael. -----Original Message----- From: Jyrki O Saarinen [mailto:jxsaarin@cs.Helsinki.FI] Sent: den 18 april 2001 16:18 To: Johansson Mikael Subject: RE: cross compiling from platform PC-NT to M68040 First you need to install cygwin in order to compile gcc. It is not possible under mingw-gcc, at least very easily. Then you need to donwload binutils source and gcc sources. What OS you are planning to be using on the cross target? If it's now know by gcc/binutils, you probably need to build newlib also (the standard C library). If you an OS, it probably has libraries and includes already built for m68k, so they just need to be placed to the cross-gcc installation directory, so that gcc can find them when it's building it's C support libraries. The easiest way is not to use NT at all, but some unix variant. This is how I build a cross compiler to m68k-coff: I downloaded the following files: ftp.sunet.se/pub/gnu/gcc/gcc-2.95.3.tar.gz ftp.sunet.se/pub/gnu/binutils/binutils-2.11.tar.gz newlib-1.9.0.tar.gz then I create two directories: /tmp/build and /tmp/src I unpack all downloaded packages to /tmp/src. Then I move /tmp/src/newlib-1.9.0/newlib to /tmp/src/gcc-2.95.3 so that the newlib gets built same time as gcc. Then I copy /tmp/src/gcc-2.95.3/newlib/libc/include completely to the gcc installation directory /tmp/crossgcc/m68k-coff so that gcc finds the target environment includes when it builds the cross C standard libraries. Now it's time to build binutils (linked, assembler, etc.): cd /tmp/build ../src/binutils-2.11/configure --target=m68k-coff --prefix=/tmp/crossgcc make make install now cross binutils are installed. then I add /tmp/crossgcc/bin to the path so that gcc can find the cross assembler for example. then the build directory is cleaned. now it's time to configure gcc: ../src/gcc-2.95.3/configure --target=m68k-coff --prefix=/tmp/crossgcc --with-newlib make make install now I have a working C, C++, Objective C, Fortran and Java compilers running in i386-linux compiling programs to the 680x0 family. (68000/68010, 5200, cpu32, 68020/68030, 68040 and 68060) If you install cygwin, you can do this in NT too, but it's not guaranteed that it will work. Usually it does, but when it doesn't it requires a huge amount of hacking to fix the problem. A easier solution is to get a CD ROM from a vendor I don't remember, but they have cygwin and pre-built binaries for 21 different targets running on NT. Somebody mentioned the company in comp.arch.embedded a while ago. ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |