libjava.exp (libjava_find_lib): New proc.
* lib/libjava.exp (libjava_find_lib): New proc. (libjava_arguments): Use it. Force static linking. From-SVN: r26651
This commit is contained in:
parent
66deb2be59
commit
844f90bc2c
3 changed files with 35 additions and 31 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
1999-04-26 Tom Tromey <tromey@cygnus.com>
|
||||||
|
|
||||||
|
* lib/libjava.exp (libjava_find_lib): New proc.
|
||||||
|
(libjava_arguments): Use it. Force static linking.
|
||||||
|
|
||||||
Thu Apr 22 14:19:35 1999 Anthony Green <green@cygnus.com>
|
Thu Apr 22 14:19:35 1999 Anthony Green <green@cygnus.com>
|
||||||
|
|
||||||
* libjava.compile/OperatorBenchmark.java: New file.
|
* libjava.compile/OperatorBenchmark.java: New file.
|
||||||
|
|
|
@ -71,17 +71,22 @@ COMPPATH = @COMPPATH@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CXX = @CXX@
|
CXX = @CXX@
|
||||||
CXXCPP = @CXXCPP@
|
CXXCPP = @CXXCPP@
|
||||||
|
DLLTOOL = @DLLTOOL@
|
||||||
EH_COMMON_INCLUDE = @EH_COMMON_INCLUDE@
|
EH_COMMON_INCLUDE = @EH_COMMON_INCLUDE@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
GCDEPS = @GCDEPS@
|
GCDEPS = @GCDEPS@
|
||||||
GCINCS = @GCINCS@
|
GCINCS = @GCINCS@
|
||||||
GCLIBS = @GCLIBS@
|
GCLIBS = @GCLIBS@
|
||||||
GCOBJS = @GCOBJS@
|
GCOBJS = @GCOBJS@
|
||||||
|
LD = @LD@
|
||||||
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
|
LIBGCJ_CFLAGS = @LIBGCJ_CFLAGS@
|
||||||
LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@
|
LIBGCJ_CXXFLAGS = @LIBGCJ_CXXFLAGS@
|
||||||
LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@
|
LIBGCJ_JAVAFLAGS = @LIBGCJ_JAVAFLAGS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LN_S = @LN_S@
|
||||||
MAINT = @MAINT@
|
MAINT = @MAINT@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
|
NM = @NM@
|
||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
PERL = @PERL@
|
PERL = @PERL@
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
|
@ -229,6 +234,7 @@ clean-am: clean-generic mostlyclean-am
|
||||||
clean: clean-am
|
clean: clean-am
|
||||||
|
|
||||||
distclean-am: distclean-generic clean-am
|
distclean-am: distclean-generic clean-am
|
||||||
|
-rm -f libtool
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-am
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,26 @@ proc libjava_init { args } {
|
||||||
set libjava_initialized 1
|
set libjava_initialized 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Find a library. We know where libtool puts the actual libraries,
|
||||||
|
# and we look there.
|
||||||
|
proc libjava_find_lib {dir name} {
|
||||||
|
global base_dir
|
||||||
|
set gp [get_multilibs]
|
||||||
|
foreach sub {.libs _libs} {
|
||||||
|
if {$gp != ""} {
|
||||||
|
if {[file exists $gp/$dir/$sub/lib${name}.a]} then {
|
||||||
|
return "-L$gp/$dir/$sub -l$name"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set lib [findfile $base_dir/../../$dir/$sub/lib${name}.a \
|
||||||
|
"-L$base_dir/../../$dir/$sub -l$name" ""]
|
||||||
|
if {$lib != ""} {
|
||||||
|
return $lib
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
# Compute arguments needed for compiler.
|
# Compute arguments needed for compiler.
|
||||||
proc libjava_arguments {} {
|
proc libjava_arguments {} {
|
||||||
global base_dir
|
global base_dir
|
||||||
|
@ -93,47 +113,19 @@ proc libjava_arguments {} {
|
||||||
if [info exists LIBJAVA] {
|
if [info exists LIBJAVA] {
|
||||||
set libjava $LIBJAVA;
|
set libjava $LIBJAVA;
|
||||||
} else {
|
} else {
|
||||||
set gp [get_multilibs];
|
set libjava [libjava_find_lib libjava gcj]
|
||||||
if { $gp != "" } {
|
|
||||||
if [file exists "$gp/libjava/libgcj.a"] {
|
|
||||||
set libjava "-L$gp/libjava -lgcj";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ![info exists libjava] {
|
|
||||||
set libjava [findfile $base_dir/../../libjava/libgcj.a "-L$base_dir/../../libjava -lgcj" -lgcj]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [info exists LIBGC] {
|
if [info exists LIBGC] {
|
||||||
set libgc $LIBGC;
|
set libgc $LIBGC;
|
||||||
} else {
|
} else {
|
||||||
set gp [get_multilibs];
|
set libgc [libjava_find_lib boehm-gc gcjgc]
|
||||||
if { $gp != "" } {
|
|
||||||
if [file exists "$gp/boehm-gc/libgcjgc.a"] {
|
|
||||||
set libgc "-L$gp/boehm-gc -lgcjgc";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ![info exists libgc] {
|
|
||||||
set libgc [findfile $base_dir/../../boehm-gc/libgcjgc.a \
|
|
||||||
"-L$base_dir/../../boehm-gc -lgcjgc" \
|
|
||||||
{}]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [info exists LIBQTHREADS] {
|
if [info exists LIBQTHREADS] {
|
||||||
set libqthreads $LIBQTHREADS
|
set libqthreads $LIBQTHREADS
|
||||||
} else {
|
} else {
|
||||||
set gp [get_multilibs]
|
set libqthreads [libjava_find_lib qthreads gcjcoop]
|
||||||
if { $gp != "" } {
|
|
||||||
if [file exists "$gp/qthreads/libgcjcoop.a"] {
|
|
||||||
set libqthreads "-L$gp/qthreads -lgcjcoop";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ![info exists libqthreads] {
|
|
||||||
set libqthreads [findfile $base_dir/../../qthreads/libgcjcoop.a \
|
|
||||||
"-L$base_dir/../../qthreads -lgcjcoop" \
|
|
||||||
{}]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# FIXME: there's no way to determine whether -lpthread is
|
# FIXME: there's no way to determine whether -lpthread is
|
||||||
|
@ -175,6 +167,7 @@ proc libjava_arguments {} {
|
||||||
|
|
||||||
global wrapper_file wrap_compile_flags;
|
global wrapper_file wrap_compile_flags;
|
||||||
lappend args "additional_flags=$wrap_compile_flags";
|
lappend args "additional_flags=$wrap_compile_flags";
|
||||||
|
lappend args "additional_flags=-static"
|
||||||
lappend args "libs=$wrapper_file";
|
lappend args "libs=$wrapper_file";
|
||||||
lappend args "libs=$libjava";
|
lappend args "libs=$libjava";
|
||||||
lappend args "libs=$libgc";
|
lappend args "libs=$libgc";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue