X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=3i3oHVsa/mH0eYApkUe6TQYjnyI6lHkXI0Cmx35LZA8=; b=WatmpC2wnDi55seznAwIukkIHD2wNM/jYVS7VRVi4vgbq/H7S7XW56moTaKnQRZLD8 D1f8Hvj5fqHUTxGCICHT2EphqKTwoRnCh2YFUchAoel19zfr4uDyjhAu8sql1KjPpQwR IQL5Lpc+fi1T/cVagdaVIv9NXEw5yn2A5GD6GdrwqEjc0K0T+O5u2ncCZPdvXC9LcoUA LaiAzV5AD+l+wvsMowwRNrpoqajzJ4fKuIBa+smiHV82vTdjWa0A8DZwMGM0DbC/txDt 4qdYHPeb9gV9Bck/pUmUcWp6IONYPgSO6w3rsi1Pdnch7Mx8Bprc2y9mHOaXxIfklqmV HUvw== MIME-Version: 1.0 X-Received: by 10.182.48.130 with SMTP id l2mr4135524obn.44.1384819090270; Mon, 18 Nov 2013 15:58:10 -0800 (PST) In-Reply-To: <52888021.6090401@iki.fi> References: <201310162005 DOT r9GK5npk027905 AT delorie DOT com> <52754597 DOT 9000204 AT iki DOT fi> <52888021 DOT 6090401 AT iki DOT fi> Date: Mon, 18 Nov 2013 17:58:10 -0600 Message-ID: Subject: Re: ANNOUNCE: DJGPP port of GCC-4.8.2 (DJGPP v2.04 only) From: Rugxulo To: djgpp-workers AT delorie DOT com Content-Type: text/plain; charset=ISO-8859-1 Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Hi, On Sun, Nov 17, 2013 at 2:36 AM, Andris Pavenis wrote: > On 11/17/2013 01:11 AM, Rugxulo wrote: >> >> On Sat, Nov 2, 2013 at 1:33 PM, Andris Pavenis >> 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 > > 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