From owner-freebsd-java@FreeBSD.ORG Sat Jul 31 18:40:28 2004 Return-Path: Delivered-To: freebsd-java@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A84F316A4CF for ; Sat, 31 Jul 2004 18:40:28 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82B5743D5F for ; Sat, 31 Jul 2004 18:40:28 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i6VIeS2C062405 for ; Sat, 31 Jul 2004 18:40:28 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i6VIeSJP062404; Sat, 31 Jul 2004 18:40:28 GMT (envelope-from gnats) Resent-Date: Sat, 31 Jul 2004 18:40:28 GMT Resent-Message-Id: <200407311840.i6VIeSJP062404@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-java@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jake Hamby Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F09D216A4CE for ; Sat, 31 Jul 2004 18:33:00 +0000 (GMT) Received: from bronco.gopix.net (gopix.net [38.118.153.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE3A543D4C for ; Sat, 31 Jul 2004 18:33:00 +0000 (GMT) (envelope-from jhamby@anobject.com) Received: from localhost.my.domain (ar39.lsanca2-4.16.240.235.lsanca2.elnk.dsl.genuity.net [4.16.240.235]) by bronco.gopix.net (8.12.11/8.12.11) with ESMTP id i6VIab3P019681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 31 Jul 2004 11:36:38 -0700 Received: (from jhamby@localhost) by localhost.my.domain (8.12.11/8.12.11/Submit) id i6VIWvnd012723; Sat, 31 Jul 2004 11:32:57 -0700 (PDT) (envelope-from jhamby) Message-Id: <200407311832.i6VIWvnd012723@localhost.my.domain> Date: Sat, 31 Jul 2004 11:32:57 -0700 (PDT) From: Jake Hamby To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: java/69853: Patches to build java/jdk14 with GCC 3.4 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jake Hamby List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Jul 2004 18:40:28 -0000 >Number: 69853 >Category: java >Synopsis: Patches to build java/jdk14 with GCC 3.4 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-java >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 31 18:40:28 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Jake Hamby >Release: FreeBSD 5.2-CURRENT i386 >Organization: anObject >Environment: System: FreeBSD atheros 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Thu Jul 29 17:26:29 PDT 2004 root@atheros:/usr/home/work/ATHEROS i386 gcc (GCC) 3.4.2 [FreeBSD] 20040728 >Description: JDK 1.4.2p6_4 doesn't build under GCC 3.4.2 due to stricter type checking (patches attached). >How-To-Repeat: Build java/jdk-1.4.2p6_4 using GCC 3.4.2 recently committed to -current. >Fix: Some notes on the patches. The first one is the only patch needed for the JDK itself (it's casting away a const, but needs to be (byte*&) rather than (byte*) or else GCC 3.4 won't find the matching member function). The second patch is a bit of a hack for the Netscape 6/Mozilla plugin (which I've verified will load and works okay for both mozilla-1.7.1,2 and firefox-0.9.1_1). For UNIX, the correct HAVE_CPP_* macros are supposed to be defined by autoconf in, for example, "xpcom/xpcom-config.h" (according to the headers installed by Mozilla). But this file is missing altogether from the version of the headers installed by the BSD JDK patches, and GCC 3.4 really needs HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX defined or else it fails because "template<>" isn't being inserted in the right spots. Since both GCC 3.4 and the Metrowerks compiler support all of the HAVE_CPP features, I cheated and reused those defines for the NS_UNIX build. --- patch-awt_fontmanager_t2kScalaerContext.cpp begins here --- --- ../../j2se/src/share/native/sun/awt/font/fontmanager/fontobjects/t2kScalerContext.cpp.orig Fri Jul 30 18:00:09 2004 +++ ../../j2se/src/share/native/sun/awt/font/fontmanager/fontobjects/t2kScalerContext.cpp Fri Jul 30 22:11:36 2004 @@ -937,14 +937,14 @@ CMAPMapper::CharsToGlyphs( int count, const Unicode16 unicodes[], UInt32 glyphs[]) const { - ConvertUnicodeToGlyphs(*font, (unsigned char *)cmap, count, unicodes, glyphs); + ConvertUnicodeToGlyphs(*font, (byte*&)cmap, count, unicodes, glyphs); } void CMAPMapper::CharsToGlyphs( int count, const Unicode32 unicodes[], UInt32 glyphs[]) const { - ConvertUnicodeToGlyphs(*font, (unsigned char *)cmap, count, unicodes, glyphs); + ConvertUnicodeToGlyphs(*font, (byte*&)cmap, count, unicodes, glyphs); } ////////////////////////////////////////////////////////////////////////////// --- patch-awt_fontmanager_t2kScalaerContext.cpp ends here --- --- patch-plugin::include::nscore.h begins here --- --- ../../deploy/src/plugin/oji-plugin/include/mozilla_headers_ns610/nscore.h.orig Fri Jul 30 18:00:05 2004 +++ ../../deploy/src/plugin/oji-plugin/include/mozilla_headers_ns610/nscore.h Fri Jul 30 23:23:36 2004 @@ -163,7 +163,7 @@ */ /* under Metrowerks (Mac), we don't have autoconf yet */ -#ifdef __MWERKS__ +#if defined(__MWERKS__) || defined(NS_UNIX) #define HAVE_CPP_SPECIALIZATION #define HAVE_CPP_PARTIAL_SPECIALIZATION #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX --- ../../deploy/src/plugin/oji-plugin/include/mozilla_headers_ns600/nscore.h.orig Fri Jul 30 18:00:04 2004 +++ ../../deploy/src/plugin/oji-plugin/include/mozilla_headers_ns600/nscore.h Fri Jul 30 23:32:31 2004 @@ -163,7 +163,7 @@ */ /* under Metrowerks (Mac), we don't have autoconf yet */ -#ifdef __MWERKS__ +#if defined(__MWERKS__) || defined(NS_UNIX) #define HAVE_CPP_SPECIALIZATION #define HAVE_CPP_PARTIAL_SPECIALIZATION #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX --- patch-plugin::include::nscore.h ends here --- >Release-Note: >Audit-Trail: >Unformatted: