Mail Archives: djgpp-workers/2013/11/18/19:04:25
Hi,
On Sun, Nov 17, 2013 at 2:36 AM, Andris Pavenis <andris DOT pavenis AT iki DOT fi> wrote:
> On 11/17/2013 01:11 AM, Rugxulo wrote:
>>
>> On Sat, Nov 2, 2013 at 1:33 PM, Andris Pavenis <andris DOT pavenis AT iki DOT fi>
>> wrote:
>>>
>>> On 10/16/2013 10:54 PM, Andris Pavenis wrote:
>>>>
>>>> This is announcement of DJGPP port of GCC-4.8.2
>>
>> I'm a little worried about broken functionality that isn't tested.
>> In particular, this time I'm wondering if ObjC works at all (for us).
>
> It seems that I have however identical behavior with native compiler
> for Linux and DJGPP (for examples I succeeded to build at all)
>
> For example (hello.h):
> =============================
> ... (snip) ...
>
> [andris AT ap objc]$ i586-pc-msdosdjgpp-gcc -c -Wall -O0 -g hello.m
>
> =============================
> Compiled program crashes both under Linux (Fedora 19 x86_64, gcc-4.8.2) and
> for DJGPP (gcc-4.8.2).
The other day I (naively) rebuilt GCC 4.8.2 on Linux as well (for
other wimpy reasons), and it similarly crashed for what I tried.
However, it could be that I built GCC incorrectly or didn't use the
correct flags or point to includes or libs correctly (since it was not
in a standard dir structure, I adjusted --prefix). Though you could be
right, it's totally possible that it's GCC's bug, but user error is
also very likely. Everything is overly complicated nowadays.
It might be interesting to test on a distro where ObjC is
semi-supported (as opposed to some where their GCC only supports C/C++
by default). Even somebody made a GNUstep liveCD a while back (2009?),
not that I've tried it, but that doesn't help clarify this problem as
it undoubtedly uses an older GCC (4.42, according to Distrowatch).
http://distrowatch.com/table.php?distribution=gnustep
http://wiki.gnustep.org/index.php/GNUstep_Live_CD
> For DJGPP I'm getting at first error message:
> (class) Hello does not recognize new
> Abort!
I don't see that here now, but I think I saw similar the other day.
For me, under DJGPP 2.04, when using GDB 7.6 or bfdsymify, it shows
that it's choking on __objc_forward(). Maybe it has something to do
with exceptions, I have no idea.
> It compiles however without warnings and works in CentOS 6.4 x86_64
> (RHEL 6.4 clone) compiled with gcc-4.4.7 (RedHat version not FSF one)
Like I said, 4.7.0 removed the deprecated parts of traditional in
favor of modern. I think they were trying to catch up / keep up with
ObjC 2.0 features, but I don't know if they ever finished.
GCC seems to focus mainly on C and C++ for releases, so other stuff
may not be as well supported. Though I don't claim to understand the
relationship with Apple (who apparently was and still is the major
party interested in ObjC), esp. since they seem to have avoided
versions newer than (patched) GCC 4.2 and now prefer Clang. Again, I
doubt anybody majorly cares except for exclusive use with Cocoa or
GNUstep frameworks.
http://gcc.gnu.org/viewcvs/gcc/trunk/MAINTAINERS?view=markup
That only lists two maintainers (but I wisely don't wish to pester
them without reason), which isn't a lot.
However, if you search the bug database, it seems like some major ObjC
bugs exist but haven't even been assigned nor confirmed.
http://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=objc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57428
Bug 57428 - Objective C exceptions completely broken in gcc 4.7 (in
bright red text)
57428 gcc objc unassigned UNCO --- Objective C exceptions completely
broken in gcc 4.7
> Found another simpler example (taken from internet with small modifications after that)
> =============================
> [andris AT ap objc]$ cat hello2.m
> #import <stdio.h>
>
> int main (void)
> {
> printf ("Hello world!\n");
> return 0;
> }
> =============================
> It compiles and works for both Linux (same distribution) and DJGPP
This is a false success. In fact, if you compile this as plain C, it
produces the exact same (byte identical, same md5sum) .EXE. So it's
not using the ObjC runtime at all.
> So this problem seems to be generic GCC one but not specially DJGPP one.
Apparently there is a test suite that I overlooked, but it probably
doesn't help that we can't (easily) run DejaGNU (Expect? Tcl?). No
idea if "dosemu -dumb" would help testing when cross-compiling, kinda
doubt it.
http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/testsuite/
http://gcc.gnu.org/install/test.html
- Raw text -