Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Sep 2003 08:52:18 +0000
From:      Jens Rehsack <rehsack@liwing.de>
To:        Alexey Zelkin <phantom@FreeBSD.org.ua>
Cc:        freebsd-java@freebsd.org
Subject:   Re: jdk-1.4 on 5.1-current
Message-ID:  <3F5C4342.4050200@liwing.de>
In-Reply-To: <20030908115507.A61581@phantom.cris.net>
References:  <3F573110.90106@liwing.de> <20030908115507.A61581@phantom.cris.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------010406070107010903070204
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Alexey Zelkin wrote:
> hi,
> 
> On Thu, Sep 04, 2003 at 12:33:20PM +0000, Jens Rehsack wrote:
> 
>>Hi all,
>>
>>as all others I have problems getting jdk-1.4 compiled under -current.
>>The preprocessor problems I could solve on my own, but later in the 
>>progress I'm getting a bus error with a core dump.
> 
> 
> This is strange.  I did not expirienced any such problems with latest
> gcc imported.

I get:

[...]
/usr/ports/java/jdk14/work/control/build/bsd-i586/bin/java -classpath 
../../../tools/strip StripProperties < 
../../../../src/share/javac/com/sun/tools/javac/v8/resources/compiler.properties 
 > 
/usr/ports/java/jdk14/work/control/build/bsd-i586/gensrc/com/sun/tools/javac/v8/resources/compiler.properties
Bus error (core dumped)
gmake[5]: *** 
[/usr/ports/java/jdk14/work/control/build/bsd-i586/gensrc/com/sun/tools/javac/v8/resources/compiler.properties] 
Error 138
gmake[5]: Leaving directory 
`/usr/ports/java/jdk14/work/j2se/make/sun/javac/sources'
gmake[4]: *** [all] Error 1
gmake[4]: Leaving directory `/usr/ports/java/jdk14/work/j2se/make/sun/javac'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory 
`/usr/ports/java/jdk14/work/j2se/make/java/javac'
gmake[2]: *** [all] Error 1
gmake[2]: Leaving directory `/usr/ports/java/jdk14/work/j2se/make/java'
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory `/usr/ports/java/jdk14/work/j2se/make'
gmake: *** [j2se-build] Error 2
*** Error code 2

I modified them using attached 4 files. I get even the same result.
And no output :-(

>>It seems, the patchset is adding a flag "-O3" which is known to be
>>broken in all gcc3 variants, eg.:
>>- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11319
>>- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11741
> 
> 
> Hmm...  I'll look into.  Thanks for the reference.
> 
> 
>>My questions are:
>>1) How can I enable the output of the compile instruction
>>    which is executed (how can I enable verbose_echo)?
> 
> 
> Comment line 86 in hotspot/build/bsd/makefiles/vm.make.  Or
> just set environment variable 'MAKE_VERBOSE' to 'YES'.

Thanks, I give it a try.

> 
>>2) How can I modify the c/c++-compiler flags which are used
>>    to build java?
> 
> 
> See hotspot/build/bsd/makefiles/{vm,gcc}.make files.  All compiler
> options are set there.

I already tried. Maybe I'm to stupid :-) But I'm afraid I'm not but
made another mistake.

--------------010406070107010903070204
Content-Type: text/plain;
 name="build-jdk"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="build-jdk"

#!/bin/sh

export FORBID_OPT=yes
export FORBID_PROC_OPT=yes
export USE_DEBUG=yes

cd /usr/ports/java/jdk14

if [ -d work ]
then
	rm -rf work
fi

make patch

for a in diff-*
do
	patch <$a
done

nice -n +10 make build

--------------010406070107010903070204
Content-Type: text/plain;
 name="diff-aa"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="diff-aa"

--- work/hotspot/build/bsd/makefiles/vm.make.orig	Thu Sep  4 11:56:09 2003
+++ work/hotspot/build/bsd/makefiles/vm.make	Thu Sep  4 12:00:17 2003
@@ -0,0 +1,227 @@
+# 
+# @(#)vm.make	1.9 02/01/17 10:10:20
+# 
+# Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
+# SUN PROPRIETARY/CONFIDENTIAL.  Use is subject to license terms.
+# 
+
+# This makefile (vm.make) is included from the vm.make in the
+# build directories.
+# It knows how to compile and link the VM.
+
+# It assumes the following flags are set:
+# CFLAGS Platform_file, Src_Dirs, SYSDEFS, AOUT, LIB, Obj_Files, Lib_H_Files, Lib_C_Files
+
+# And it assumes that the deps and incls have already been built.
+
+# -- D. Ungar (5/97) from a file by Bill Bush
+
+# build whole VM by default, I can also build foo.o or foo.i
+
+AOUT   = gamma$(G_SUFFIX)
+
+JSIG = jsig$(G_SUFFIX)
+LIBJSIG = lib$(JSIG).so
+
+default: $(AOUT) $(LIBJSIG)
+
+
+GENERATED  = ../generated
+
+# read a generated file defining the set of .o's and the .o .h dependencies
+
+include $(GENERATED)/Dependencies
+Obj_Files += $(EXTRA_OBJS)
+
+
+# read machine-specific adjustments (%%% should do this via buildATree?)
+
+include $(GAMMADIR)/build/bsd/makefiles/$(Platform_arch).make
+
+# tell make that .cpp is important
+
+.SUFFIXES: .cpp $(SUFFIXES)
+
+
+# set VPATH so make knows where to look for source files
+# Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm
+# The incls directory contains generated header file lists for inclusion.
+# The adfiles directory contains ad_<arch>.[ch]pp.
+
+Src_Dirs_V = $(GENERATED)/adfiles ${Src_Dirs} $(GENERATED)/incls
+VPATH    += $(Src_Dirs_V:%=%:)
+
+# set INCLUDES for C preprocessor
+
+Src_Dirs_I = $(GENERATED)/adfiles ${Src_Dirs} $(GENERATED) 
+INCLUDES += $(Src_Dirs_I:%=-I%)
+
+# Bill had this, I don't know why
+# SYSDEFS += -Dvolatile=''
+
+# Bill had this, I don't know why
+# SYSDEFS += -DNOASM
+
+BUILD_VERSION = -DHOTSPOT_BUILD_VERSION="\"$(HOTSPOT_BUILD_VERSION)\""
+BUILD_VERSION$(HOTSPOT_BUILD_VERSION) = 
+
+CPPFLAGS = ${SYSDEFS} ${INCLUDES} ${BUILD_VERSION}
+
+# Suppress warnings (for now)
+CFLAGS += -w
+
+# do not include shared lib path in a.outs
+#AOUT_FLAGS += -norunpath
+
+COMPILE   = ${CPP} ${CPPFLAGS} ${CFLAGS}
+LINK_LIB  = ${CPP} -shared -mimpure-text
+LINK      = ${CPP} ${AOUT_FLAGS}
+
+
+COMPILE.s = ${COMPILE} -S
+COMPILE.o = ${COMPILE} -c
+COMPILE.i = ${COMPILE} -E
+
+verbose-echo = echo
+verbose-echo$(MAKE_VERBOSE) = :
+
+# Compiling
+
+# Generate Disassembly for Inspection
+%.s: %.cpp
+	@echo Compiling $< ; \
+	rm -f $@ ; \
+	$(verbose-echo) \
+	${COMPILE.s} $<
+	${COMPILE.s} $<
+	@rm -f c++filt.out;	\
+	cat $@ | c++filt > c++filt.out; \
+	rm -f $@;	\
+	mv c++filt.out $@
+
+%.o: %.cpp
+	@echo Compiling $< ; \
+	rm -f $@ ; \
+	$(verbose-echo) \
+	${COMPILE.o} $<
+	${COMPILE.o} $< && \
+	case "$(MFLAGS)" in *j*) echo Done with $<;; esac
+
+%.o: %.S
+	@echo Assembling-cpp $< ; \
+	rm -f $@ ; \
+	$(verbose-echo) \
+	${COMPILE.o} $<
+	${COMPILE.o} $< && \
+	case "$(MFLAGS)" in *j*) echo Done with $<;; esac
+
+%.o: %.s
+	@echo Assembling $< ; \
+	rm -f $@ ; \
+	$(verbose-echo) \
+	${COMPILE.o} $<
+	${COMPILE.o} $< && \
+	case "$(MFLAGS)" in *j*) echo Done with $<;; esac
+
+# Intermediate files (for debugging macros)
+
+%.i: %.cpp
+	@echo Preprocessing $< to $@; \
+	$(verbose-echo) \
+	${COMPILE.i} $< >$@
+	${COMPILE.i} $< >$@
+
+
+# The whole megilla:
+
+ifeq ($(FREEBSD_4STABLE), true)
+LIBS += -lm -pthread
+else
+ifeq ($(TRUE_PLATFORM), NetBSD)
+LIBS += -lm -pthread
+else
+LIBS += -lm -lc_r
+endif
+endif
+
+JVM = jvm$(G_SUFFIX)
+LIBJVM = lib$(JVM).so
+
+ifeq ("${G_SUFFIX}", "_g")
+LN_LIBJVM = libjvm.so
+else
+LN_LIBJVM = libjvm_g.so
+endif
+
+# By default, link the *.o into the library, not the executable.
+LINK_INTO$(LINK_INTO) = LIBJVM
+
+
+# making launch:
+
+AOUT.o = $(AOUT.o/LINK_INTO_$(LINK_INTO))
+AOUT.o/LINK_INTO_AOUT    = $(Obj_Files)
+AOUT.o/LINK_INTO_LIBJVM  =
+
+# For now, build a copy of the JDK1.2beta4 launcher.
+# This is useful, because the development cycle goes faster
+# if we can use ild to statically link the VM into the launcher.
+# Eventually, we should expunge all use of $(AOUT) from the makefiles.
+# The optimized (product) build should certainly avoid making a new launcher.
+AOUT.o += launcher.o
+
+LAUNCHER = $(GAMMADIR)/src/os/$(Platform_os_family)/launcher
+LAUNCHERFLAGS = -I$(LAUNCHER) -I$(GAMMADIR)/src/share/vm/prims
+launcher.o: launcher.c $(LAUNCHER)/java.c $(LAUNCHER)/java_md.c
+	$(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS)
+
+# Figure out how to turn this off:
+#LAUNCHERFLAGS += -DOLDJAVA
+
+
+launcher.c:
+	@rm -f $@ $@+
+	echo '#define debug launcher_debug'          >>$@+
+	echo '#include "java.c"'                     >>$@+
+	echo '#include "java_md.c"'                  >>$@+
+	mv $@+ $@
+
+$(AOUT): $(AOUT.o) $(LIBJVM)
+	@echo Linking launcher... ; \
+	$(verbose-echo) \
+	${LINK} -o $@ ${AOUT_FLAGS} $(AOUT.o) -L `pwd` -L ${JAVA_HOME}/jre/lib/$(Platform_gnu_dis_arch) -L ${JAVA_HOME}/lib/$(Platform_gnu_dis_arch) -l$(JVM) $(LIBS) ; \
+	${LINK} -o $@ ${AOUT_FLAGS} $(AOUT.o) -L `pwd` -L ${JAVA_HOME}/jre/lib/$(Platform_gnu_dis_arch) -L ${JAVA_HOME}/lib/$(Platform_gnu_dis_arch) -l$(JVM) $(LIBS)
+
+# making the library:
+
+LIBJVM.o = $(LIBJVM.o/LINK_INTO_$(LINK_INTO))
+LIBJVM.o/LINK_INTO_AOUT    =
+LIBJVM.o/LINK_INTO_LIBJVM  = $(Obj_Files)
+
+
+$(LIBJVM): $(LIBJVM.o)
+	echo Linking vm...
+ifeq ($(TRUE_PLATFORM), FreeBSD)
+
+	${LINK_LIB} ${LIB_FLAGS} -z noversion -o $@ $(LIBJVM.o) $(LIBS)
+else
+	${LINK_LIB} ${LIB_FLAGS} -o $@ $(LIBJVM.o) $(LIBS)
+endif
+#	@rm -f $@.1; ln -s $@ $@.1
+#	@rm -f ${LN_LIBJVM}; ln -s $@ ${LN_LIBJVM}
+#	@rm -f ${LN_LIBJVM}.1; ln -s ${LN_LIBJVM} ${LN_LIBJVM}.1
+
+# making libjsig
+
+JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm
+ifeq ("${G_SUFFIX}", "_g")
+SYMFLAG = -g
+else
+SYMFLAG =
+endif
+
+$(LIBJSIG): $(JSIGSRCDIR)/jsig.c
+	echo Making signal interposition lib...; \
+	$(CC) $(SYMFLAG) -D_GNU_SOURCE -D_REENTRANT -shared -fPIC -o $@ $(JSIGSRCDIR)/jsig.c
+
+.PHONY: default

--------------010406070107010903070204
Content-Type: text/plain;
 name="diff-ab"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="diff-ab"

--- work/hotspot/build/bsd/makefiles/adlc.make.orig	Thu Sep  4 11:56:08 2003
+++ work/hotspot/build/bsd/makefiles/adlc.make	Thu Sep  4 12:01:11 2003
@@ -0,0 +1,229 @@
+# 
+# @(#)adlc.make	1.4 01/12/07 15:06:59
+# 
+# Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
+# SUN PROPRIETARY/CONFIDENTIAL.  Use is subject to license terms.
+#
+
+# This makefile (adlc.make) is included from the adlc.make in the
+# build directories.
+# It knows how to compile, link, and run the adlc.
+
+# #########################################################################
+
+# OUTDIR must be the same as AD_Dir = $(GENERATED)/adfiles in top.make:
+OUTDIR  = ../generated/adfiles
+
+ARCH = $(Platform_arch)
+OS = $(Platform_os_family)
+
+SOURCE.AD = $(OUTDIR)/$(OS)_$(ARCH).ad 
+
+SOURCES.AD = $(GAMMADIR)/src/cpu/$(ARCH)/vm/$(ARCH).ad \
+	     $(GAMMADIR)/src/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(ARCH).ad 
+
+Src_Dirs += $(GAMMADIR)/src/share/vm/adlc
+
+EXEC	= $(OUTDIR)/adlc
+
+all:
+
+# #########################################################################
+# THE FOLLOWING IS TAKEN FROM VM.MAKE
+
+# tell make that .cpp is important
+
+.SUFFIXES: .cpp $(SUFFIXES)
+
+
+# set VPATH so make knows where to look for source files
+
+Src_Dirs_V = ${Src_Dirs} $(GENERATED)/incls
+VPATH    += $(Src_Dirs_V:%=%:)
+
+
+# set INCLUDES for C preprocessor
+
+Src_Dirs_I = ${Src_Dirs} $(GENERATED)
+INCLUDES += $(Src_Dirs_I:%=-I%)
+
+# Suppress warnings (for now)
+CFLAGS += -w
+
+# #########################################################################
+
+
+#  /usr/ccs/bin/make
+#  /usr/dist/share/devpro/5.x-sparc/bin/CC
+#  man -M /usr/dist/share/devpro/5.x-sparc/man CC
+
+CPP       = g++
+CPPFLAGS  = -DASSERT -g -o $@
+# -o      object file-name
+# +w      Additional warnings: Nonportable, Likely mistakes or inefficient
+# -xwe    Treat all warnings as errors (skipped for now)
+# +p      Use -features=no%anachronisms.
+# -E      Runs a source file through the preprocessor, output to stdout
+# 
+# $<      first component of target name
+# $@      target name
+
+CPPFLAGS += ${SYSDEFS} ${INCLUDES}
+
+OBJECTNAMES = \
+	adlparse.o \
+	archDesc.o \
+	arena.o \
+	dfa.o \
+	dict2.o \
+	filebuff.o \
+	forms.o \
+	formsopt.o \
+	formssel.o \
+	main.o \
+	adlc-opcodes.o \
+	output_c.o \
+	output_h.o \
+
+OBJECTS = $(OBJECTNAMES:%=$(OUTDIR)/%)
+
+GENERATEDNAMES = \
+        ad_$(ARCH).cpp \
+        ad_$(ARCH).hpp \
+        ad_$(ARCH)_clone.cpp \
+        ad_$(ARCH)_expand.cpp \
+        ad_$(ARCH)_format.cpp \
+        ad_$(ARCH)_gen.cpp \
+        ad_$(ARCH)_misc.cpp \
+        ad_$(ARCH)_peephole.cpp \
+        ad_$(ARCH)_pipeline.cpp \
+        adGlobals_$(ARCH).hpp \
+        dfa_$(ARCH).cpp \
+
+GENERATEDFILES = $(GENERATEDNAMES:%=$(OUTDIR)/%)
+
+# Random dependencies:
+$(OBJECTS): opcodes.hpp classes.hpp adlc.hpp adlcVMDeps.hpp adlparse.hpp archDesc.hpp arena.hpp dict2.hpp filebuff.hpp forms.hpp formsopt.hpp formssel.hpp
+
+# #########################################################################
+
+all: $(EXEC)
+
+$(EXEC) : $(OBJECTS)
+	@echo Making adlc
+	@$(CPP) $(DFLAGS) $(LFLAGS) $(OBJECTS) -o $(EXEC)
+
+# The source files refer to ostream.h, which sparcworks calls iostream.h
+$(OBJECTS): ostream.h
+ostream.h :
+	@echo >$@ '#include <iostream.h>'
+
+dump:
+	: OUTDIR=$(OUTDIR)
+	: OBJECTS=$(OBJECTS)
+	: products = $(OUTDIR)/ad_$(ARCH).cpp $(OUTDIR)/ad_$(ARCH).hpp $(OUTDIR)/dfa_$(ARCH).cpp
+
+all: $(GENERATEDFILES)
+
+$(GENERATEDFILES): refresh_adfiles
+
+# Get a unique temporary directory name, so multiple makes can run in parallel.
+# Note that product files are updated via "mv", which is atomic.
+TEMPDIR := $(OUTDIR)/mktmp$(shell echo $$$$)
+
+verbose-echo = echo
+verbose-echo$(MAKE_VERBOSE) = :
+
+#
+# adlc_updater is a simple sh script, under sccs control. It is
+# used to selectively update generated adlc files. This should
+# provide a nice compilation speed improvement.
+#
+ADLC_UPDATER_DIRECTORY = $(GAMMADIR)/build/bsd
+ADLC_UPDATER = adlc_updater
+
+# This action refreshes all generated adlc files simultaneously.
+# The way it works is this:
+# 1) create a scratch directory to work in.
+# 2) if the current working directory does not have $(ADLC_UPDATER), copy it.
+# 3) run the compiled adlc executable. This will create new adlc files in the scratch directory.
+# 4) call $(ADLC_UPDATER) on each generated adlc file. It will selectively update changed or missing files.
+# 5) If we actually updated any files, echo a notice.
+#
+
+refresh_adfiles: $(EXEC) $(SOURCE.AD)
+	@rm -rf $(TEMPDIR); mkdir $(TEMPDIR)
+	@ [ -f $(ADLC_UPDATER) ] || ( cp $(ADLC_UPDATER_DIRECTORY)/$(ADLC_UPDATER) . ; chmod +x $(ADLC_UPDATER) )
+	@$(verbose-echo) \
+	 $(EXEC) -q -T $(SOURCE.AD) \
+ -c$(TEMPDIR)/ad_$(ARCH).cpp -h$(TEMPDIR)/ad_$(ARCH).hpp -a$(TEMPDIR)/dfa_$(ARCH).cpp -v$(TEMPDIR)/adGlobals_$(ARCH).hpp
+	@$(EXEC) -q -T $(SOURCE.AD) \
+ -c$(TEMPDIR)/ad_$(ARCH).cpp -h$(TEMPDIR)/ad_$(ARCH).hpp -a$(TEMPDIR)/dfa_$(ARCH).cpp -v$(TEMPDIR)/adGlobals_$(ARCH).hpp \
+	    || { rm -rf $(TEMPDIR); exit 1; }
+	@ ./$(ADLC_UPDATER) ad_$(ARCH).cpp $(TEMPDIR) $(OUTDIR)
+	@ ./$(ADLC_UPDATER) ad_$(ARCH).hpp $(TEMPDIR) $(OUTDIR)
+	@ ./$(ADLC_UPDATER) ad_$(ARCH)_clone.cpp $(TEMPDIR) $(OUTDIR)
+	@ ./$(ADLC_UPDATER) ad_$(ARCH)_expand.cpp $(TEMPDIR) $(OUTDIR)
+	@ ./$(ADLC_UPDATER) ad_$(ARCH)_format.cpp $(TEMPDIR) $(OUTDIR)
+	@ ./$(ADLC_UPDATER) ad_$(ARCH)_gen.cpp $(TEMPDIR) $(OUTDIR)
+	@ ./$(ADLC_UPDATER) ad_$(ARCH)_misc.cpp $(TEMPDIR) $(OUTDIR)
+	@ ./$(ADLC_UPDATER) ad_$(ARCH)_peephole.cpp $(TEMPDIR) $(OUTDIR)
+	@ ./$(ADLC_UPDATER) ad_$(ARCH)_pipeline.cpp $(TEMPDIR) $(OUTDIR)
+	@ ./$(ADLC_UPDATER) adGlobals_$(ARCH).hpp $(TEMPDIR) $(OUTDIR)
+	@ ./$(ADLC_UPDATER) dfa_$(ARCH).cpp $(TEMPDIR) $(OUTDIR)
+	@[ -f $(TEMPDIR)/made-change ] \
+		|| echo "Rescanned $(SOURCE.AD) but encountered no changes."
+
+	@rm -rf $(TEMPDIR)
+		       
+
+# #########################################################################
+
+$(SOURCE.AD): $(SOURCES.AD)
+	@cat $(SOURCES.AD) > $(SOURCE.AD)
+
+COMPILE   = ${CPP} ${CPPFLAGS} ${CFLAGS}
+
+COMPILE.o = ${COMPILE} -c
+COMPILE.i = ${COMPILE} -E
+
+verbose-echo = echo
+verbose-echo$(MAKE_VERBOSE) = :
+
+$(OUTDIR)/%.o: %.cpp
+	@echo Compiling $< ; \
+	rm -f $@ ; \
+	$(verbose-echo) \
+	${COMPILE.o} $<
+	${COMPILE.o} $< && \
+	case "$(MFLAGS)" in *j*) echo Done with $<;; esac
+
+# Some object files are given a prefix, to disambiguate
+# them from objects of the same name built for the VM.
+$(OUTDIR)/adlc-%.o: %.cpp
+	@echo Compiling $< ; \
+	rm -f $@ ; \
+	$(verbose-echo) \
+	${COMPILE.o} $<
+	${COMPILE.o} $<
+
+# Intermediate files (for debugging macros)
+
+%.i: %.cpp
+	@echo Preprocessing $< to $@; \
+	$(verbose-echo) \
+	${COMPILE.i} $< >$@
+	${COMPILE.i} $< >$@
+
+# #########################################################################
+
+clean	:
+	rm $(OBJECTS)
+
+cleanall :
+	rm $(OBJECTS) $(EXEC)
+
+# #########################################################################
+
+
+.PHONY: all dump refresh_adfiles clean cleanall

--------------010406070107010903070204
Content-Type: text/plain;
 name="diff-ac"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="diff-ac"

--- work/hotspot/build/bsd/makefiles/gcc.make.orig	Thu Sep  4 11:56:08 2003
+++ work/hotspot/build/bsd/makefiles/gcc.make	Thu Sep  4 12:05:21 2003
@@ -0,0 +1,87 @@
+# 
+# @(#)gcc.make	1.18 02/04/15 16:51:57
+# 
+# Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
+# SUN PROPRIETARY/CONFIDENTIAL.  Use is subject to license terms.
+# 
+
+# put the *.o files in the a.out, not the shared library
+LINK_INTO = $(LINK_INTO/$(VERSION))
+LINK_INTO/debug     = AOUT
+#LINK_INTO/optimized = AOUT
+LINK_INTO/optimized = LIBJVM
+
+# apply this setting to link into the shared library even in the debug version:
+LINK_INTO = LIBJVM
+
+# If MAKE_OPTO is null, then we will compile with the -DOPTO.
+# That switch, despite its name, has the effect of __disabling__ OPTO.
+$(MAKE_OPTO)CFLAGS += -DOPTO
+
+ifdef CC_INTERP
+CFLAGS += -DCC_INTERP 
+endif
+ifdef NEED_ASM
+CFLAGS += -save-temps
+endif
+
+# XXX: someday we'll need to take a look into warnings generated by hotspot
+#      compile (with -W or -Wall).  --phantom
+#
+CFLAGS += -Winline
+CFLAGS += -fPIC
+CFLAGS += -fwritable-strings
+CFLAGS += -fno-rtti
+#CFLAGS += -fno-exceptions
+CFLAGS += -D__STDC__=1 -D_LARGEFILE64_SOURCE
+CFLAGS += -D__GNU__ -D_REENTRANT -D_THREAD_SAFE
+#CFLAGS += -fcheck-new
+CFLAGS += -pipe
+
+ifeq ($(FREEBSD_4STABLE), true)
+CFLAGS += -pthread
+endif
+
+# Set GCC_SAVE_TEMPS=-save-temps to keep temporary files (.ii, .s).
+CFLAGS += $(GCC_SAVE_TEMPS)
+
+# The flags to use for an Optimized g++ build
+# XXXBSD: optimization issues
+# OPT_CFLAGS += -O3 
+OPT_CFLAGS += -O
+# Hotspot uses very unstrict aliasing turn this optimization off
+OPT_CFLAGS += -fno-strict-aliasing
+
+# The gcc compiler segv's on ia64 when compiling cInterpreter.cpp 
+# if we use expensive-optimizations 
+ifeq ($(ARCH), ia64)
+OPT_CFLAGS += -fno-expensive-optimizations
+endif
+
+OPT_CFLAGS/NOOPT=-O0
+
+# Set the environment variable HOTSPARC_HOTSPARC_GENERIC to "true"
+# to inhibit the effect of the previous line on CFLAGS.
+
+ifdef USE_EGCS
+CPP = egcs
+CC  = egcs
+else
+# Linux version of gcc.make says:
+#
+# : unlike g++, gcc statically links libstdc++ (add 83K in filesize), so people 
+# : without gcc/2.91 (or whatever version we use to build the binaries) can 
+# : run java without installing the compatibility libstdc++
+#
+# but unfortunatelly at FreeBSD 5.x gcc does not link against libstdc++ at all
+# and linking process fails. XXXBSD: to be revised later
+ifeq ($(FREEBSD_4STABLE), true)
+CPP = gcc
+else
+CPP = g++
+endif
+CC  = gcc
+endif
+
+AOUT_FLAGS += -export-dynamic 
+DEBUG_CFLAGS += -g

--------------010406070107010903070204--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F5C4342.4050200>