Bug 69853 - Patches to build java/jdk14 with GCC 3.4
Summary: Patches to build java/jdk14 with GCC 3.4
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: java (show other bugs)
Version: 5.2-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: Alexey Zelkin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-31 19:40 UTC by Jake Hamby
Modified: 2004-08-12 22:58 UTC (History)
0 users

See Also:


Attachments
patch-awt_fontmanager_t2kScalaerContext.cpp (870 bytes, text/plain)
2004-07-31 19:40 UTC, Jake Hamby
no flags Details
file.diff (1.01 KB, patch)
2004-07-31 19:40 UTC, Jake Hamby
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jake Hamby 2004-07-31 19:40:28 UTC
JDK 1.4.2p6_4 doesn't build under GCC 3.4.2 due to stricter type checking
(patches attached).

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.

How-To-Repeat: 
Build java/jdk-1.4.2p6_4 using GCC 3.4.2 recently committed to -current.
Comment 1 Greg Lewis freebsd_committer freebsd_triage 2004-08-05 15:47:05 UTC
Responsible Changed
From-To: freebsd-java->phantom

Over to maintainer.
Comment 2 Greg Lewis freebsd_committer freebsd_triage 2004-08-12 22:58:12 UTC
State Changed
From-To: open->closed

Committed, thanks!