New Crosscompiler? +attached geometry code

Hello again!

I forgot to ask: Are there any plans for releasing a
new Linux->Win32 crosscompiler binary?

It seems that the current EGCS based one might have
bugs which gives me trouble… There’s a new GCC-95
series release now, which is the merge between GCC
and EGCS (which you are problably already aware of):
http://egcs.cygnus.com/

At least there are a couple of bugs that I know that
EGCS 1.0.* and 1.1.* had:

It crashed when assigning one structure to another
and when calling a function where a structure is
either passed by value or returned by value,
such as in the code I have attached (which
you might find useful btw :slight_smile:

So I couldn’t use the attached code with EGCS,
but it works fine with GCC-95.1 (and they even
just released v. 95.2 which I haven’t tried).

And as for compiling a crosscompiler myself…
I’m afraid that it might break/interfere
with my native Linux compiler, and I have
more than enough trouble messing with 2 C-compilers
and 6 ML compilers at the same time already :slight_smile:

Cheers–
http://www.HardcoreProcessing.com
-------------- next part --------------
A non-text attachment was scrubbed…
Name: geomUtil.hh
Type: application/x-unknown-content-type-hh_auto_file
Size: 3220 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/19991105/9370fa72/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed…
Name: geomUtil.cc
Type: application/x-unknown-content-type-cc_auto_file
Size: 8644 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/19991105/9370fa72/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed…
Name: geom.hh
Type: application/x-unknown-content-type-hh_auto_file
Size: 563 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/19991105/9370fa72/attachment-0002.bin

For starters, the latest and greatest release of gcc is 2.95.2 not 95.2.

As for building a cross compiler, the only think that could break is if
you installed your linux cross win32 compiler on top of the default gcc
installation, which wouldn’t happen with the default configure settings.
To make a long story short, if you install the cross compiler to
/usr/local/cross-tools (which SDL 0.11.2+ assumes anyway if you’re cross
compiling SDL to win32) and make sure /usr/local/cross-tools is on your
path, then you shouldn’t have anything to worry about.

A linux cross mingw32 (or win32) compiler is a little involved, as you
will want to patch it with certain patches that will fix certain issues
with the compiler, as well as with generating code for win32 itself. The
patches for gcc-2.95 are on Mumit Khan’s site, he also has howto’s on
building a cross mingw32 compiler which describes the process much better
than I could. I can’t remember his site per se, checkout
http://sourceware.cygnus.com/cygwin/ and look under “Related Sites”. I
don’t beleive Mumit has patches for gcc-2.95.2 - yet.

Building cross compilers is, in my experience, fun and exciting,
especially when you can zip right over to the target machine to test your
program. Unfortunately the mingw32 target for SDL is a little busted
right now (see my earlier posts about native win32 for details).

Good luck.

MarcusOn Fri, 5 Nov 1999, ANOQ of the Sun wrote:

Hello again!

I forgot to ask: Are there any plans for releasing a
new Linux->Win32 crosscompiler binary?

It seems that the current EGCS based one might have
bugs which gives me trouble… There’s a new GCC-95
series release now, which is the merge between GCC
and EGCS (which you are problably already aware of):
http://egcs.cygnus.com/

At least there are a couple of bugs that I know that
EGCS 1.0.* and 1.1.* had:

It crashed when assigning one structure to another
and when calling a function where a structure is
either passed by value or returned by value,
such as in the code I have attached (which
you might find useful btw :slight_smile:

So I couldn’t use the attached code with EGCS,
but it works fine with GCC-95.1 (and they even
just released v. 95.2 which I haven’t tried).

And as for compiling a crosscompiler myself…
I’m afraid that it might break/interfere
with my native Linux compiler, and I have
more than enough trouble messing with 2 C-compilers
and 6 ML compilers at the same time already :slight_smile:

Cheers

http://www.HardcoreProcessing.com

“M. R. Brown” wrote:

For starters, the latest and greatest release of gcc is 2.95.2 not 95.2.

OK, sorry :slight_smile:

As for building a cross compiler, the only think that could break is if
you installed your linux cross win32 compiler on top of the default gcc

Thanks for the info…
The problem with the win32 cross compiler (EGCS?) was that aparently
it expands macro’s on record fields!

When I wrote:

state->environ = environ;

And environ being some POSIX macro, it expanded both
sides of the assignment!
Changing it to

state->environment = environ;

helped…

Building cross compilers is, in my experience, fun and exciting,
especially when you can zip right over to the target machine to test your
program.

Yes, unless there are deadlines and things are not working :slight_smile:
But seeing it work is really great…

Unfortunately the mingw32 target for SDL is a little busted
right now (see my earlier posts about native win32 for details).

Well, I’m still hangin’ on to the good ole’ SDL 0.9.9 release…

And I’ve got the MLTon compiler working now! :slight_smile:

I just included SDL_mangle.h to fix the WinMain problem…

Cheers–
http://www.HardcoreProcessing.com

Hello again!

I forgot to ask: Are there any plans for releasing a
new Linux->Win32 crosscompiler binary?

Yes, I already have it built, but libtool generates libraries of the form:
SDL-0_11_2-0-0-1.dll

I’m trying to figure out how to fix this. :slight_smile:

I’ll release it as soon as I can fix this. Any ideas?

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec