On 4 Jun, Vladimir Grebenschikov wrote: > java/jdk14 also fails to build. I managed to rebuild jdk14 even after "make delete-old-libs" using the gcc34 port and bootstrapping using the Linux JDK. I haven't yet had a chance to see if the plugin communicates with Firefox built with the system compiler or if there will be an ABI mismatch. In the process I discovered two interesting quirks. The first is that there are a number of places that set $(CXX), assuming that this is c++ compiler, and $(CPP), assuming that this is the preprocessor. This isn't entirely true, because the hotspot build uses $(CPP) as the c++ compiler (see hotspot/build/*/makefiles/adlc.make). The linker bails out when it encounters a .o file that is actually just source code that has been run through the preprocessor. The second quirk is that overriding $(CC) in MAKE_ARGS isn't sufficient to get the j2se portion of the build to work, because j2se/make/common/Defs-bsd.gmk doesn't allow $(CC) to be overridden. I added this to MAKE_ARGS in pkgtools.conf: 'java/jdk14' => [ 'WITH_LINUX_BOOTSTRAP=yes', 'USE_GCC=3.4', 'MAKE_FLAGS="CC=/usr/local/bin/gcc34 CXX=/usr/local/bin/c++34 CPP=/ usr/local/bin/c++34"', ], and I had to apply this patch (to a patch): Index: java/jdk14/files/patch-common::Defs-bsd.gmk =================================================================== RCS file: /home/ncvs/ports/java/jdk14/files/patch-common::Defs-bsd.gmk,v retrieving revision 1.9 diff -u -r1.9 patch-common::Defs-bsd.gmk --- java/jdk14/files/patch-common::Defs-bsd.gmk 8 Dec 2006 22:36:15 -0000 1.9 +++ java/jdk14/files/patch-common::Defs-bsd.gmk 3 Jun 2007 18:08:47 -0000 _at__at_ -1,7 +1,26 _at__at_ $FreeBSD: ports/java/jdk14/files/patch-common::Defs-bsd.gmk,v 1.9 2006/12/08 22:36:15 glewis Exp $ - ---- ../../j2se/make/common/Defs-bsd.gmk.orig Fri Dec 8 11:50:23 2006 -+++ ../../j2se/make/common/Defs-bsd.gmk Fri Dec 8 11:58:29 2006 +--- ../../j2se/make/common/Defs-bsd.gmk.orig Sun Jun 3 10:46:29 2007 ++++ ../../j2se/make/common/Defs-bsd.gmk Sun Jun 3 11:04:08 2007 +_at__at_ -40,15 +40,15 _at__at_ + BASENAME = $(USRBIN_PATH)basename + CAT = $(UNIXCOMMAND_PATH)cat + ifneq ($(TRUE_PLATFORM), OpenBSD) +-CC = $(COMPILER_PATH)gcc +-CPP = $(COMPILER_PATH)gcc -E ++CC ?= $(COMPILER_PATH)gcc ++CPP ?= $(COMPILER_PATH)gcc -E + ifeq ($(STATIC_CXX),true) + # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" + # We need to use gcc to statically link the C++ runtime. gcc and g++ use + # the same subprocess to compile C++ files, so it is OK to build using gcc. +-CXX = $(COMPILER_PATH)gcc ++CXX ?= $(COMPILER_PATH)gcc + else +-CXX = $(COMPILER_PATH)g++ ++CXX ?= $(COMPILER_PATH)g++ + endif + else + # Allow ports/pkgsrc infrastructure to override CC, CPP and CXX. _at__at_ -192,7 +192,7 _at__at_ ifeq ($(TRUE_PLATFORM), NetBSD) DEVTOOLS_PATH = /usr/pkg/bin/Received on Mon Jun 04 2007 - 18:16:26 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:11 UTC