diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-03 22:37:50 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-05-03 22:37:50 +0000 |
commit | b1417fdc54abfce7d1487f4a443472e7ffbd6f8c (patch) | |
tree | 2387c5eeb21780304270d962ecd76911de6f0191 /libjava/testsuite | |
parent | bb9c1a09933d3b672bedb16747761d478245dddc (diff) | |
download | gcc-b1417fdc54abfce7d1487f4a443472e7ffbd6f8c.tar.gz |
PR 43839
* testsuite/Makefile.am: Override automake for site.exp creation
and add entry to set libiconv.
* testsuite/Makefile.in: Regenerate.
* testsuite/libjava.jni/jni.exp (gcj_jni_get_cxxflags_invocation):
Add new global variable libiconv to handle alternative libiconv
locations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159009 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/testsuite')
-rw-r--r-- | libjava/testsuite/Makefile.am | 25 | ||||
-rw-r--r-- | libjava/testsuite/Makefile.in | 44 | ||||
-rw-r--r-- | libjava/testsuite/libjava.jni/jni.exp | 6 |
3 files changed, 55 insertions, 20 deletions
diff --git a/libjava/testsuite/Makefile.am b/libjava/testsuite/Makefile.am index fe42040d364..2aebd7c9938 100644 --- a/libjava/testsuite/Makefile.am +++ b/libjava/testsuite/Makefile.am @@ -24,6 +24,31 @@ MYGCJH = gjavah .PHONY: compile-tests +# We need more things in site.exp, but automake completely controls the +# creation of that file; there's no way to append to it without messing up +# the dependency chains. So we overrule automake. This rule is exactly +# what it would have generated, plus our own additions. +site.exp: Makefile + @echo 'Making a new site.exp file...' + @echo '## these variables are automatically generated by make ##' >site.tmp + @echo '# Do not edit here. If you wish to override these values' >>site.tmp + @echo '# edit the last section' >>site.tmp + @echo 'set srcdir $(srcdir)' >>site.tmp + @echo "set objdir `pwd`" >>site.tmp + @echo 'set build_alias "$(build_alias)"' >>site.tmp + @echo 'set build_triplet $(build_triplet)' >>site.tmp + @echo 'set host_alias "$(host_alias)"' >>site.tmp + @echo 'set host_triplet $(host_triplet)' >>site.tmp + @echo 'set target_alias "$(target_alias)"' >>site.tmp + @echo 'set target_triplet $(target_triplet)' >>site.tmp + @echo 'set libiconv "$(LIBICONV)"' >>site.tmp + @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp + @test ! -f site.exp || \ + sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @-rm -f site.bak + @test ! -f site.exp || mv site.exp site.bak + @mv site.tmp site.exp + check-am: compile-tests compile-tests: diff --git a/libjava/testsuite/Makefile.in b/libjava/testsuite/Makefile.in index fc1db70566d..a582efdd72c 100644 --- a/libjava/testsuite/Makefile.in +++ b/libjava/testsuite/Makefile.in @@ -388,25 +388,6 @@ check-DEJAGNU: site.exp else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi; \ exit $$exit_status -site.exp: Makefile - @echo 'Making a new site.exp file...' - @echo '## these variables are automatically generated by make ##' >site.tmp - @echo '# Do not edit here. If you wish to override these values' >>site.tmp - @echo '# edit the last section' >>site.tmp - @echo 'set srcdir $(srcdir)' >>site.tmp - @echo "set objdir `pwd`" >>site.tmp - @echo 'set build_alias "$(build_alias)"' >>site.tmp - @echo 'set build_triplet $(build_triplet)' >>site.tmp - @echo 'set host_alias "$(host_alias)"' >>site.tmp - @echo 'set host_triplet $(host_triplet)' >>site.tmp - @echo 'set target_alias "$(target_alias)"' >>site.tmp - @echo 'set target_triplet $(target_triplet)' >>site.tmp - @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp - @test ! -f site.exp || \ - sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp - @-rm -f site.bak - @test ! -f site.exp || mv site.exp site.bak - @mv site.tmp site.exp distclean-DEJAGNU: -rm -f site.exp site.bak @@ -557,6 +538,31 @@ uninstall-am: .PHONY: compile-tests +# We need more things in site.exp, but automake completely controls the +# creation of that file; there's no way to append to it without messing up +# the dependency chains. So we overrule automake. This rule is exactly +# what it would have generated, plus our own additions. +site.exp: Makefile + @echo 'Making a new site.exp file...' + @echo '## these variables are automatically generated by make ##' >site.tmp + @echo '# Do not edit here. If you wish to override these values' >>site.tmp + @echo '# edit the last section' >>site.tmp + @echo 'set srcdir $(srcdir)' >>site.tmp + @echo "set objdir `pwd`" >>site.tmp + @echo 'set build_alias "$(build_alias)"' >>site.tmp + @echo 'set build_triplet $(build_triplet)' >>site.tmp + @echo 'set host_alias "$(host_alias)"' >>site.tmp + @echo 'set host_triplet $(host_triplet)' >>site.tmp + @echo 'set target_alias "$(target_alias)"' >>site.tmp + @echo 'set target_triplet $(target_triplet)' >>site.tmp + @echo 'set libiconv "$(LIBICONV)"' >>site.tmp + @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp + @test ! -f site.exp || \ + sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @-rm -f site.bak + @test ! -f site.exp || mv site.exp site.bak + @mv site.tmp site.exp + check-am: compile-tests compile-tests: diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp index 68dbd279033..dbeced481a8 100644 --- a/libjava/testsuite/libjava.jni/jni.exp +++ b/libjava/testsuite/libjava.jni/jni.exp @@ -251,7 +251,11 @@ proc gcj_jni_invocation_compile_c_to_binary {file {options {}}} { } proc gcj_jni_get_cxxflags_invocation {} { + global libiconv global LIBJAVA + if {$libiconv == ""} { + set libiconv "-liconv" + } if [info exists LIBJAVA] { set libjava $LIBJAVA; } else { @@ -267,7 +271,7 @@ proc gcj_jni_get_cxxflags_invocation {} { # to just make the linker find libgcc using -L options. # Similar logic applies to libgcj. if { [istarget "*-*-darwin*"] } { - lappend cxxflags -shared-libgcc -lgcj -liconv + eval lappend cxxflags "-shared-libgcc -lgcj $libiconv" } if { [istarget "*-*-solaris*"] } { |