On 3/15/07, Richard Frith-Macdonald <[EMAIL PROTECTED]> wrote:
Presumably you failed to use the --enable-native-objc-exceptions when configuring gnustep-make. It's hardly surprising that the wrong flags are being passed to the compiler and the wrong config options being set if the system was not configured to use native exceptions.
I compiled gnustep-make with the ports system, so I didn't actually configure it manually. However, just now I added --enable-native-objc-exceptions to CONFIGURE_ARGS in gnustep-make's Makefile, and configure promptly bailed on me: checking whether we should use native ObjC exceptions... Abort trap (core dumped) no configure: Native objective-c exceptions were requested, but the compiler configure: doesn't support them. configure: error: compiler doesn't support native objective-c exceptions I've got gcc-4.1.3_20070305, also compiled from ports, and it should definitely support native ObjC exceptions (especially since I was able to get them to work with the command in my first email). I've attached gnustep-make's config.log, but I found something interesting about the failed program: #include <stdlib.h> #include <objc/Object.h> int main(int argc, char **argv) { Object *o=nil; @try { o=[Object new]; @throw o; } @catch (id foo) { if (o!=foo) return 1; } return 0; } I saved this as 'conftest.c' and then compiled with the same command that configure used: gcc41 -o conftest -O2 -pipe -x objective-c -I. -fgnu-runtime -fobjc-exceptions conftest.c -lobjc -pthread The program crashed, as expected. However, on a whim I renamed 'conftest.c' to 'conftest.m', recompiled, and it ran! I thought the file extension didn't matter when the language is manually specified with -x as above, so what could be going on here? I'm also emailing my config.log to the FreeBSD port's maintainer, but at this point I'm not sure whether it's an issue with gnustep-make, its FreeBSD port, or even gcc itself. Can somebody shine some light on this? -Michael _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org http://lists.gnu.org/mailman/listinfo/gnustep-dev