]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR java/43839 (libjava incorrectly uses -liconv in testsuite, jni.exp when using...
authorJack Howarth <howarth@bromo.med.uc.edu>
Mon, 3 May 2010 22:37:50 +0000 (22:37 +0000)
committerMike Stump <mrs@gcc.gnu.org>
Mon, 3 May 2010 22:37:50 +0000 (22:37 +0000)
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.

From-SVN: r159009

libjava/ChangeLog
libjava/testsuite/Makefile.am
libjava/testsuite/Makefile.in
libjava/testsuite/libjava.jni/jni.exp

index c986d1092c70fcfd23098bef4b52447cfd979283..b1fe9cdeef288225f048f3c26a336ed18ddfbbfd 100644 (file)
@@ -1,3 +1,13 @@
+2010-05-03  Jack Howarth <howarth@bromo.med.uc.edu>
+
+       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.
+
 2010-04-19  Andrew Haley  <aph@redhat.com>
 
        PR libgcj/40860
index fe42040d364d3afa82a722cb305d20402e2f7475..2aebd7c993846a200d5128e84bb4a45409bb099a 100644 (file)
@@ -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:
index fc1db70566deb58465735a75c0443ea732766c12..a582efdd72cf9e5811b79cc0bb80db9e5a6eb6f9 100644 (file)
@@ -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:
index 68dbd279033de35ffff058c4fa3084fab4106731..dbeced481a824858cd6092c84a6a0a7abd33b5cc 100644 (file)
@@ -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*"] } {