Hallo Prof,
Am Sonntag, 28. September 2003 um 20:41 schriebst du:
On 28 Sep 2003 at 20:14, Gerrit P. Haase wrote:
[...]
More likely the latter. I found also that there is a file missing from the GPC source package, os-hacks.h, why isn't it included in the tarball if it is necessary to have it when compiling under Cygwin or MinGW?
It isn't necessary to have it. My understanding (Frank can correct this if I am wrong) is that the RTS build does not require os-hacks.h, but if it is there, it uses it.
Anyway, the build fails for me with or without this file.
I tracked the segfault down to the function which parses the options to set the correct environment for Cygwin or MinGW, it seems that there is an invalid pointer. (The function mingw_scan() in gcc-3.3.1-2/gcc/config/i386/cygwin1.c). Since it works ok with gcc.exe or g++.exe or g77.exe or gcj.exe, there must be some relevant difference in gpc.exe when it goes to parse the commandline and passes the arguments to mingw_scan().
I haven't debugged it completely yet, though.
Also, I am not sure how the Win32 os-hacks.h can be added to the GPC source distro. It is pretty much OS-specific (hence the name), and it will only cause trouble if added to the general distro. Also, if IIRC, you can have a version of os-hacks.h for any platform, and the RTS build will use it.
Well, take a look into gcc-3.3.1/config.
I have hints files there for several operating systems. Why shouldn't it be possible to have something like this in GPC too?
We have a perl/hints directory in the Perl distribution where for every system which needs some special configuration there is a file which gets included if you are on that specific platform.
I don't think that a general purpose os-hacks.h file for all platforms needs to be not available, but to implement a neat mechanism which pulls in OS specific definitions whenever they are there should be no problem.
Gerrit