summaryrefslogtreecommitdiff
path: root/libjava/scripts
diff options
context:
space:
mode:
authordaney <daney@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-31 16:17:21 +0000
committerdaney <daney@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-31 16:17:21 +0000
commit6e29f747fdc59495bec2506c276951c1ea7e02e0 (patch)
tree6dc577fa9ea387e1b09b0eeec8e6facca682d8c6 /libjava/scripts
parent249f93223c78cbc8786ea33c9c0d4dd9cd69c06d (diff)
downloadgcc-6e29f747fdc59495bec2506c276951c1ea7e02e0.tar.gz
* configure.ac (INTERPRETER): New AM_CONDITIONAL.
* scripts/makemake.tcl (package_map): Mark jdwp and jvmti packages as being for interpreter only. Place interpreter related files in 'if INTERPRETER' block. (interpreter_package_files): New list. (interpreter_header_vars): Ditto. (emit_package_rule_to_list): Renamed from emit_package_rule with new target list parameter. (emit_package_rule): Rewritten to call emit_package_rule_to_list. (emit_interpreter_rule): New function. (emit_source_var): Place interpreter related files in interpreter_header_vars. * Makefile.am (ACLOCAL_AMFLAGS): Add -I libltdl. (libgcj_interpret_source_files): New variable. (libgcj_la_SOURCES): Move jvmti.cc and interpret.cc to libgcj_interpret_source_files and include libgcj_interpret_source_files. (nat_jdwp_source_files): New variable. (nat_jvmti_source_files): Ditto. (nat_source_files): Move jdwp and jvmti related files to nat_jdwp_source_files and nat_jvmti_source_files and include nat_jdwp_source_files and nat_jvmti_source_files. * Makefile.in: Regenerate. * include/Makefile.in: Ditto. * testsuite/Makefile.in: Ditto. * gcj/Makefile.in: Ditto. * sources.am: Ditto. * configure: Ditto. * include/config.h.in: Ditto. * interpret.cc: Remove #ifdef INTERPRETER block. * stacktrace.cc (UnwindTraceFn): Do not handle proxy frames if interpreter disabled. * include/java-interp.h (_Jv_FrameType): Move outside of #ifdef INTERPRETER block. * include/execution.h (_Jv_IndirectCompiledEngine::do_get_closure_list, _Jv_InterpreterEngine, _Jv_soleInterpreterEngine): Place in #ifdef INTERPRETER block. * jni.cc (jvmti.h, jvmti-int.h): Only include if INTERPRETER is defined. (_Jv_JNI_PopSystemFrame, _Jv_JNI_GetEnv): Only do jvmti processing if INTERPRETER is defined. * prims.cc (jvmti.h, jvmti-int.h, Jdwp.h, VMVirtualMachine.h): Only include if INTERPRETER is defined. (defaultJdwpOptions, jdwpOptions, jvmti_agent_onload_func, jvmti_agent_onunload_func, jvmti_agentonload, jvmti_agentonunload, jvmti_agent_opts, load_jvmti_agent): Only define if INTERPRETER is defined. (parse_x_arg): Only process 'runjdwp:' if INTERPRETER is defined. (parse_init_args): Only process jvmti related options if INTERPRETER is defined. (_Jv_CreateJavaVM): Only call _Jv_JVMTI_Init if INTERPRETER is defined. (_Jv_RunMain): Only do jvmti and jdwp processing if INTERPRETER is defined. * link.cc (jvmti.h, jvmti-int.h): Only include if INTERPRETER is defined. (_Jv_ThrowNoClassDefFoundError, _Jv_Linker::create_error_method): Define if if INTERPRETER is not defined. (_Jv_Linker::wait_for_state): Only do jvmti proccessing if INTERPRETER is defined. * boehm.cc (closure_list_pointer, finalize_closure_list, _Jv_ClosureListFinalizer): Only define if INTERPRETER is defined. * java/lang/natThread.cc (jvmti.h, jvmti-int.h): Only include if INTERPRETER is defined. (finish_, _Jv_NotifyThreadStart): Only do jvmti proccessing if INTERPRETER is defined. * java/lang/Class.h (_Jv_InterpreterEngine): Move declaration and friend declaration inside #ifdef INTERPRETER block. * java/lang/natClass.cc (_Jv_ClosureList::releaseClosures, _Jv_ClosureList::registerClosure, _Jv_GetInterpClassSourceFile): Only define if INTERPRETER is defined. * java/lang/reflect/natVMProxy.cc (UnsupportedOperationException.h): Include. (generateProxyClass): Throw UnsupportedOperationException unless INTERPRETER is defined. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127097 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/scripts')
-rwxr-xr-xlibjava/scripts/makemake.tcl66
1 files changed, 61 insertions, 5 deletions
diff --git a/libjava/scripts/makemake.tcl b/libjava/scripts/makemake.tcl
index ab8a85d2c29..b1789a16d89 100755
--- a/libjava/scripts/makemake.tcl
+++ b/libjava/scripts/makemake.tcl
@@ -36,6 +36,11 @@ proc verbose {text} {
# objects in this package are not used. Note however that
# most ignored files are actually handled by listing them in
# 'standard.omit'
+# * interpreter
+# objects in this package (and possibly sub-packages,
+# if they do not appear in the map) are only compiled if
+# the interpreter is enabled. They are compiled as with the
+# 'package' specifier.
#
# If a package does not appear in the map, the default is 'package'.
global package_map
@@ -93,6 +98,19 @@ set package_map(gnu/javax/swing/text/html/parser/support) package
set package_map(gnu/gcj/xlib) package
set package_map(gnu/awt/xlib) package
+# These packages should only be included if the interpreter is
+# enabled.
+set package_map(gnu/classpath/jdwp) interpreter
+set package_map(gnu/classpath/jdwp/event) interpreter
+set package_map(gnu/classpath/jdwp/event/filters) interpreter
+set package_map(gnu/classpath/jdwp/exception) interpreter
+set package_map(gnu/classpath/jdwp/id) interpreter
+set package_map(gnu/classpath/jdwp/processor) interpreter
+set package_map(gnu/classpath/jdwp/transport) interpreter
+set package_map(gnu/classpath/jdwp/util) interpreter
+set package_map(gnu/classpath/jdwp/value) interpreter
+set package_map(gnu/gcj/jvmti) interpreter
+
# Some BC ABI packages have classes which must not be compiled BC.
# This maps such packages to a grep expression for excluding such
# classes.
@@ -138,9 +156,16 @@ set properties_files {}
# List of all '@' files that we are going to compile.
set package_files {}
+# List of all '@' files that we are going to compile if the
+# interpreter is enabled.
+set interpreter_package_files {}
+
# List of all header file variables.
set header_vars {}
+# List of all header file variables for interpreter packages.
+set interpreter_header_vars {}
+
# List of all BC object files.
set bc_objects {}
@@ -300,8 +325,8 @@ proc emit_bc_rule {package} {
}
# Emit a rule for a 'package' package.
-proc emit_package_rule {package} {
- global package_map exclusion_map package_files
+proc emit_package_rule_to_list {package package_files_list} {
+ global package_map exclusion_map $package_files_list
if {$package == "."} {
set pkgname ordinary
@@ -333,10 +358,20 @@ proc emit_package_rule {package} {
if {$pkgname != "gnu/gcj/xlib" && $pkgname != "gnu/awt/xlib"
&& $pkgname != "gnu/gcj/tools/gcj_dbtool"} {
- lappend package_files $lname
+ lappend $package_files_list $lname
}
}
+proc emit_package_rule {package} {
+ global package_files
+ emit_package_rule_to_list $package package_files
+}
+
+proc emit_interpreter_rule {package} {
+ global interpreter_package_files
+ emit_package_rule_to_list $package interpreter_package_files
+}
+
# Emit a rule to build a package full of 'ordinary' files, that is,
# one .o for each .java.
proc emit_ordinary_rule {package} {
@@ -382,7 +417,7 @@ proc emit_process_package_rule {platform} {
# Emit a source file variable for a package, and corresponding header
# file variable, if needed.
proc emit_source_var {package} {
- global package_map name_map dir_map header_vars
+ global package_map name_map dir_map header_vars interpreter_header_vars
if {$package == "."} {
set pkgname ordinary
@@ -428,7 +463,11 @@ proc emit_source_var {package} {
puts "${uname}_header_files = $result"
puts ""
if {$pkgname != "gnu/gcj/xlib" && $pkgname != "gnu/awt/xlib"} {
- lappend header_vars "${uname}_header_files"
+ if {$package_map($package) == "interpreter"} {
+ lappend interpreter_header_vars "${uname}_header_files"
+ } else {
+ lappend header_vars "${uname}_header_files"
+ }
}
}
}
@@ -490,6 +529,8 @@ foreach package [lsort [array names package_map]] {
emit_ordinary_rule $package
} elseif {$package_map($package) == "package"} {
emit_package_rule $package
+ } elseif {$package_map($package) == "interpreter"} {
+ emit_interpreter_rule $package
} else {
error "unrecognized type: $package_map($package)"
}
@@ -499,6 +540,21 @@ emit_process_package_rule Ecos
emit_process_package_rule Win32
emit_process_package_rule Posix
+puts "if INTERPRETER"
+pp_var interpreter_packages_source_files $interpreter_package_files
+pp_var interpreter_header_files $interpreter_header_vars "\$(" ")"
+puts ""
+puts "else"
+puts ""
+puts "interpreter_packages_source_files="
+puts ""
+puts "interpreter_header_files="
+puts ""
+puts "endif"
+
+lappend package_files {$(interpreter_packages_source_files)}
+lappend header_vars interpreter_header_files
+
pp_var all_packages_source_files $package_files
pp_var ordinary_header_files $header_vars "\$(" ")"
pp_var bc_objects $bc_objects