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]

FW: GCC on windows for 68k


Title: GCC on windows for 68k
 
 Hi, i don't know directly what you might have done wrong (although your question about the root may be the answer), so i tell you what i did here.
The following is done for a cygwin under NT....
Some things here don't need to be done if you are working under a linuxbox.
 
I went to my home directory ($ cd ~/) and made a directory 'src'.
Into 'src', I untarred the tar.gz's with "tar xfvz <file>.tar.gz" (gcc, newlib, binutils... )
(pls don't use winzip or the likes, it's better this way)
 
Then i make m68kgcc, m68kbinutils, m68knewlib.
 
If anything went *really* wrong, i just "rm -r -f" (removed) the "m68k*" directories, so nothing would get spoiled and i started from scratch.
 
into m68kbinutils, i did a
../binutils-2.10.1/configure --target=m68k-coff
make all install
 
then i went to /user/local/m68k-coff directory and did
ln -s ~/src/newlib-1.8.2/newlib/libc/include include
 
Next i went to my gcc-2.95.3 directory and searched for "texinfo".
When found, i do a "mv -i texinfo old.texinfo"
 
Then going into my "m68kgcc"
../gcc-2.95.3/configure --target=m68k-coff --enable-languages=c,c++ --with-newlib --with-included-gettext --with-gnu-as --with-gnu-ld
make
 
(it stops here with an error that has to do with some C++ stuff i guess. This is normal at this point !!)
make install after that. (don't think about errors now)
 
Next up into m68knewlib:
../newlib-1.8.2/configure --target=m68k-coff
make all install
 
At this point, you change those two files you talk about
and you go back into m68kgcc and do
../gcc-2.95.3/configure --target=m68k-coff --enable-languages=c,c++ --with-newlib --with-included-gettext --with-gnu-as --with-gnu-ld
make all install
 
That should do it i guess.
 
But remind yourself that this is the OLD way.
 
Our Bill has a much better way of making a cross-gcc toolchain, so please visit his website too.
I rebuilded m68k following his way and it's more logical and without any errors.
The idea is that you first build a core-gcc that sufficient enough for building the libraries.
And after that you make the whole gcc toolchain that needs them.
That way you don't have to edit sourcefiles or anything tricky like that...
 
If my help here gets you nowhere, it's best to try out Bill's crossgcc FAQ.
(http://crossgcc.billgatliff.com/)
 
So good luck and suc6  ( = succes) :)
Jan
 
 
-----Original Message-----
From: Tawde, Ganesh [mailto:gtawde@opentv.com]
Sent: zaterdag 23 juni 2001 4:25
To: 'Vermeulen Jan'; 'CrossGCC'
Subject: RE: GCC on windows for 68k

Hi,
 
Thanks for your suggesstions. I tried with the package versions you mentioned. There was a lot of improvement. I was able to get rid of the previous error and go ahead. But ....but ...but only to face another error.
After step 2.4.2 in the doc ( .../msg00195.html) i.e. editing the two files, I tried to make in the m68kgcc directory. It compiled for some time and then suddenly I got a system error message. The message was as follows :
 
---------------------------------------------------------------------------------------------------------------
    16 bit MS DOS subsystem                                                   
---------------------------------------------------------------------------------------------------------------
 
                            /usr/local/src/m68kgcc
 
            The NTVDM CPU had encountered an illegal instruction
            CS: 058a IP:1112 OP ff f8 22 3c 00
 
                -----------------                                       -----------------
                 Terminate                                            Ignore
                -----------------                                       -----------------
------------------------------------------------------------------------------------------------------------------
 
I got this message when the make was at the following location on the cygwin window ( snap from the attached config.log file )
 
"
configure:1749: checking whether the C compiler (/usr/local/src/m68kgcc/gcc/xgcc -B/usr/local/src/m68kgcc/gcc/ -B/usr/local/m68k-coff/bin/ -g -O2 ) works
"
 
If I hit "Ignore", I get a couple of more similar message and then the cygwin window kind of hangs. The cursor starts dancing around the screen and I can't do anything but kill the process.
 
If I hit "Terminate", the make proceeds ahead. Then again when it reaches the location where it says
"Checking for ANSI C header files...", cygwin shell hangs and the cursor starts dancing across the whole window. Again I have the only option to kill the process.
 
* I tried editing the two files (specs and libgcc1-test.c) under Windows and under Unix but still result is the same for both.
 
* To see whether the versions are proper it used -v switch to gcc and xgcc and I got hte following reponse.
 
for gcc folder is /usr/local/src/m68kgcc
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/2.95.3-5/specs
gcc version 2.95.3-5 (cygwin special)
 
for xgcc folder is /usr/local/src/m68kgcc/gcc
$ xgcc -v
Reading specs from /usr/local/lib/gcc-lib/m68k-coff/2.95.3/specs
gcc version 2.95.3 20010315 (release)
 
* While running "make install" for all the steps, the doc say "( as root )". Does that mean anything special? I run make install from the same directory I used for running make. ( for eg. in case of newlib, I used m68knewlib for make and make install ). I hope thats correct.
 
I am attaching the config.log for your reference, if it helps.
 
I am using the same files that you have mentioned. Am I doing anything wrong? I think I am missing something.
Are there any kind of environment variables to be set?
 
And what it Suc6. I am sorry but I don't know how to read it with a dutch tongue. :-( .
 
Thanks
Ganesh
 
 
-----Original Message-----
From: Vermeulen Jan [mailto:Jan.Vermeulen@siemens.atea.be]
Sent: Friday, June 22, 2001 12:38 AM
To: 'Tawde, Ganesh'; 'CrossGCC'
Subject: RE: GCC on windows for 68k

Hi Ganesh,
 
I was able to make m68k-coff with cygwin under NT as well as on a linuxbox by using the exact same URL ( .../msg00195.html)
However, i have not used any so-called "core" tar.gz. I used full GCC source-code and i recommend 2.95.3 for gcc
because many have been able to make a cross m68k-coff compiler with this version:
 
under cygwin:
binutils-2.10.1.tar.gz (7.114KB)
gcc-2.95.3.tar.gz (12.610 KB)
newlib-1.8.2.tar.gz (2.945 KB)
 
If you are only going to use C/ASM, it is not necessary to use the latest source-code. (although this is debatable)
m68k is a rather old CPU and therefor already supported in older versions of gcc/binutils/newlib.
 
If you will be using C++, i can recommend GCC-3.0 because lots of bugs/issues concerning C++ are solved.
 
Suc6. (read with dutch tongue :)
Jan
 
PS: sorry for late reply, but it's my birthday today =)
( #include <Homer_Simpson_Quote_"Woohooo!".h> )
 
-----Original Message-----
From: Tawde, Ganesh [mailto:gtawde@opentv.com]
Sent: vrijdag 22 juni 2001 4:09
To: 'Vermeulen Jan'; 'CrossGCC'
Subject: RE: GCC on windows for 68k

Hi Jan,
 
I followed the procedure you told me. Let me explain you my environment (since I am the first time user of GNU tools and not worked much on Unix platform, some things may sound stupid, please bear with me ) . I downloaded the latest Cygwin 1.3.2 and installed it on my PC with Windows NT 4.0. I got gcc3.0(gcc-core-3.0.tar.gz) ,  binutils 2.11(binutils-2.11.tar.gz), newlib 1.9.0 (newlib-1.9.0.tar.gz). Then I tried to go through the crossgcc faq. But I found another document at http://sources.redhat.com/ml/crossgcc/2000-q2/msg00195.html. I found it more descriptive and understanding so I followed the steps mentioned in there. Only I am using different versions of the packages and different target than mentioned in the doc ( m68k-coff instead of m68k-elf) . I followed everything step by step compiling the packages in the Cygwin bash shell on my PC. I could successfully make binutils and gcc. But when making newlib, I faced some internal compiler error. I am not sure as to what it is and how to get rid of it. Here is the error I got.
 
m68k-coff-gcc -B/home/gtawde/m68knewlib/m68k-coff/newlib/ -isystem /home/gtawde/
m68knewlib/m68k-coff/newlib/targ-include -isystem /home/gtawde/newlib-1.9.0/newlib/libc/include -DPACKAGE=\"newlib\" -DVERSION=\"1.9.0\"  -I. -I../../../../../newlib-1.9.0/newlib/libc/stdlib  -O2 -DMISSING_SYSCALL_NAMES -I../../targ-include
 -I../../../../../newlib-1.9.0/newlib/libc/../libc/include -fno-builtin      -g -O2 -c ../../../../../newlib-1.9.0/newlib/libc/stdlib/dtoa.c
../../../../../newlib-1.9.0/newlib/libc/stdlib/dtoa.c: In function `_dtoa_r':
../../../../../newlib-1.9.0/newlib/libc/stdlib/dtoa.c:853: Internal compiler error in update_equiv_regs, at local-alloc.c:1097
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[3]: *** [dtoa.o] Error 1
make[3]: Leaving directory `/home/gtawde/m68knewlib/m68k-coff/newlib/libc/stdlib
'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/gtawde/m68knewlib/m68k-coff/newlib/libc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gtawde/m68knewlib/m68k-coff/newlib'
make: *** [all-target-newlib] Error 2
 
 
I also tried using newlib 1.8.2 but still I was getting errors ( i lost the error log ).
 
Can anybody help me in this?
 
Thanks
Ganesh
 
 
 
-----Original Message-----
From: Vermeulen Jan [mailto:Jan.Vermeulen@siemens.atea.be]
Sent: Wednesday, June 20, 2001 11:30 PM
To: 'CrossGCC'
Subject: GCC on windows for 68k

Hello Ganesh....

First you got to download & install cygwin
at http://sources.redhat.com/cygwin/

Then you procede by taking a look at
http://crossgcc.billgatliff.com/
for his wonderful building script.
(m68k-coff is what your target will be)

By the way, if you extract the source-code from
the '*.tar.gz' with WinZip (or the likes), make
sure winzip doesn't change the <LF> to <CR><LF>.
(go to the options->configuration->miscellaneous
and make sure the 'TAR file smart CR/LF conversion'
is *not* checked)

It's better you extract it with "tar xfz <file>.tar.gz"
under cygwin.

Then you can start adjusting your Visual Studio so it
can compile with the m68k-coff-g++ or m68k-coff-gcc.

Good luck, i hope this is helpful.
Jan

-----Original Message-----
From: Tawde, Ganesh [mailto:gtawde@opentv.com]
Sent: dinsdag 19 juni 2001 20:44
To: 'crossgcc@sourceware.cygnus.com'
Subject: GCC on windows for 68k





Hi,
 I am looking for a GCC cross compiler on Windows for 68331 processor. I
want the compiler to use on a Windows NT machine and which will cross
compile for the 68331 processor.
Can anybody give me some links and some more information on how I can
proceed ?
Thanks in advance.
Ganesh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]