Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GCC 4.2 available

48 views
Skip to first unread message

Vincent Rivière

unread,
Jul 2, 2007, 2:05:16 AM7/2/07
to
Hello, ST lovers !

A new port of GCC 4.2 and binutils 2.17 for the Atari ST is available here:
http://vincent.riviere.free.fr/soft/m68k-atari-mint/

Cygwin binaries are included, allowing you to cross-build ST software from
Windows.

Vincent Rivière
vincent...@freesbee.fr

Bernd Mueller

unread,
Jul 2, 2007, 4:08:16 PM7/2/07
to
Hi there,
Vincent Rivière schrieb:
> ...

> Cygwin binaries are included, allowing you to cross-build ST software from
> Windows.

Anyone successfully compiled them for linux? i gave up at the binutils with some
errors.

Bye
Bernd

Vincent Rivière

unread,
Jul 3, 2007, 2:42:49 PM7/3/07
to
Hello.

> Anyone successfully compiled them for linux? i gave up at the binutils
> with some errors.

I recently compiled the patched binutils on Debian, without any problem.
Could you post a detailed error log, please ?

Regards,

Vincent Rivière
vincent...@freesbee.fr

Bernd Mueller

unread,
Jul 3, 2007, 11:23:30 PM7/3/07
to
Hi there,

Vincent Rivière schrieb:
> Hello.


> I recently compiled the patched binutils on Debian, without any problem.
> Could you post a detailed error log, please ?

Sure, here are the last lines from make:


make[4]: Entering directory `/home/ragnar/src/gcc-atari/binutils-2.17/bfd'
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -I.
-I.././bfd -I.././bfd/../include -I.././bfd/../intl -I../intl -W -Wall
-Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o prg-mint.lo prg-mint.c
gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -I. -I.././bfd -I.././bfd/../include
-I.././bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes
-Werror -g -O2 -c prg-mint.c -o prg-mint.o
cc1: warnings being treated as errors
prg-mint.c: In function 'write_dri_symbol':
prg-mint.c:1536: warning: pointer targets in initialization differ in signedness
make[4]: *** [prg-mint.lo] Fehler 1
make[4]: Leaving directory `/home/ragnar/src/gcc-atari/binutils-2.17/bfd'
make[3]: *** [all-recursive] Fehler 1
make[3]: Leaving directory `/home/ragnar/src/gcc-atari/binutils-2.17/bfd'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/home/ragnar/src/gcc-atari/binutils-2.17/bfd'
make[1]: *** [all-bfd] Fehler 2
make[1]: Leaving directory `/home/ragnar/src/gcc-atari/binutils-2.17'
make: *** [all] Fehler 2


I'm running Fedora 7 and my compiler is gcc ( version : gcc-Version 4.1.2
20070502 (Red Hat 4.1.2-12) )

bye from Germany
Bernd

Vincent Rivière

unread,
Jul 4, 2007, 4:53:31 PM7/4/07
to
> prg-mint.c: In function 'write_dri_symbol':
> prg-mint.c:1536: warning: pointer targets in initialization differ in
> signedness

You're right, I saw the same problem yesterday.
This was not a problem for GCC 3.4.4, the current version on Cygwin.

This problem is trivial to fix. It is just a missing cast.
You just have to modify the line 1536 as this :
char* ptr = (char*)sym.a_name;

Then you will be able to complete your compilation !

I'll upload a new patch containing this fix.

Good luck.

Vincent

Bernd Mueller

unread,
Jul 5, 2007, 12:37:05 AM7/5/07
to
Vincent Rivière schrieb:
> ...

> Then you will be able to complete your compilation !

Yes, it works now! But now i'm back with an other error. This time, gcc does not
compile. Here are again the last lines from configure ( while compiling gcc ):


checking float.h usability... no
checking float.h presence... yes
configure: WARNING: float.h: present but cannot be compiled
configure: WARNING: float.h: check for missing prerequisite headers?
configure: WARNING: float.h: see the Autoconf documentation
configure: WARNING: float.h: section "Present But Cannot Be Compiled"
configure: WARNING: float.h: proceeding with the preprocessor's result
configure: WARNING: float.h: in the future, the compiler will take precedence
configure: WARNING: ## ----------------------------------------- ##
configure: WARNING: ## Report this to the package-unused lists. ##
configure: WARNING: ## ----------------------------------------- ##
checking for float.h... yes
checking endian.h usability... no
checking endian.h presence... no
checking for endian.h... no
checking for inttypes.h... (cached) no
checking for stdint.h... (cached) no
checking for ld version... 21700
checking for ld that supports -Wl,--gc-sections... configure: error: Link tests
are not allowed after GCC_NO_EXECUTABLES.
make[1]: *** [configure-target-libstdc++-v3] Fehler 1
make[1]: Leaving directory `/home/ragnar/src/gcc-atari/gcc-4.2.0'


make: *** [all] Fehler 2


bye from Germany
Bernd

ggn...@gmail.com

unread,
Jul 5, 2007, 2:19:08 AM7/5/07
to
On Jul 2, 9:05 am, "Vincent Rivière" <vincent.rivi...@freesbee.fr>
wrote:
> vincent.rivi...@freesbee.fr

Cool! Not a C fan myself, but this is a good thing for the Atari
platform :)

Thanks for sharing :)

Vincent Rivière

unread,
Jul 5, 2007, 2:48:35 PM7/5/07
to
> Yes, it works now!

I've uploaded a new patch with the missing cast.
Thank you for the bug report !

> This time, gcc
> does not compile. Here are again the last lines from configure ( while
> compiling gcc ):
>

> ...


> Link tests are not allowed after GCC_NO_EXECUTABLES.
> make[1]: *** [configure-target-libstdc++-v3] Fehler 1
> make[1]: Leaving directory `/home/ragnar/src/gcc-atari/gcc-4.2.0'
> make: *** [all] Fehler 2

You're wrong, you just have compiled gcc !
From your gcc build directory, type "gcc/xgcc --version" to get the proof !

More explications :
I put the build scripts online, but I didn't describe the whole building
process (I plan to do it later).

The problem is that the gcc package contains the compiler, as well as
libraries dependent on libc (such as libstdc++-v3). But the libc is not
provided by GCC ! We must use the MiNTLib as libc (Linux uses glibc,
Cygwin uses Newlib). The MiNTLib cannot be compiled if gcc is not
installed. The package gcc cannot be compiled if the MiNTLib is not
installed :-\

You encountered an error because you tried to compile libstdc++-v3 (from
the gcc package) before having installed MiNTLib and PML.

Here is the solution.

Step 1 : binutils
Compile *and install* the binutils. Update your PATH variable to include
/usr/local/m68k-atari-mint/bin. You must be able to run
m68k-atari-mint-as from any directory.

Step 2 : gcc (Part 1 - Compiler)
Make only the gcc compiler. The key is to use "make all-gcc" instead of
"make". You just have to follow my build script up to the comment "Now,
compile and install the MiNTlib"

Then you'll build the libraries with this partially compiled gcc package.

Step 3 : MiNTLib
Just follow the build script to compile *and install* the MiNTLib.

Step 4 : PML
Just follow the build script to compile *and install* PML.

Step 5 : gcc (Part 2 - Libraries)
You can now build the remaining stuff in the package gcc with "make".
Just follow the build script where you stopped in Step 2. Install gcc.

That's all ! You should be able to to run m68k-atari-mint-gcc.

In my binaries, I left multilib enabled. It means that all libraries are
built multiple times, with some variants and combinations : standard,
-mshort, -g, -m68020-60... So building step 5 is very long. When the
patches and the build procedure are good, it is not a problem, you just
have to wait. But when you are struggling for making it work it is
easier and faster to disable multilib. This can be done by appending
--disable-multilib on the gcc configure command line. You'll get only
68000 libraries, without FPU, and with sizeof(int) == 4.

Good luck !

Vincent

Vincent Rivière

unread,
Jul 8, 2007, 10:37:27 AM7/8/07
to
> You just have to follow my build script up to the comment "Now,
> compile and install the MiNTlib"

Just a word about what I call "follow the build script".
I qualified the build scripts as "semi-automatic" because they are not
intended to be run directly. They sometimes need some manual
interventions. And they don't support error checking.

I simply open a console (rxvt under Cygwin) and I copy/paste every line
(or group of lines) then I wait for the result. It is quick and easy.
But sure, a Makefile would be better.

I have just uploaded a new patch for the MiNTLib. My initial one,
combined with the settings of GCC 4.2, resulted in a bad return value of
memcpy. Now it seems to be quite correct, I've been able to
cross-compile native binutils for MiNT.

Good luck.

Vincent

0 new messages