This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
- From: "howarth at nitro dot med dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Apr 2010 02:00:55 -0000
- Subject: [Bug java/43839] libjava incorrectly uses -liconv in testsuite, jni.exp when using --with-libiconv-prefix
- References: <bug-43839-12293@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from howarth at nitro dot med dot uc dot edu 2010-04-22 02:00 -------
This almost works...
Index: testsuite/Makefile.in
===================================================================
--- testsuite/Makefile.in (revision 158624)
+++ testsuite/Makefile.in (working copy)
@@ -401,6 +401,7 @@
@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
Index: testsuite/libjava.jni/jni.exp
===================================================================
--- testsuite/libjava.jni/jni.exp (revision 158624)
+++ testsuite/libjava.jni/jni.exp (working copy)
@@ -251,6 +251,7 @@
}
proc gcj_jni_get_cxxflags_invocation {} {
+ global libiconv
global LIBJAVA
if [info exists LIBJAVA] {
set libjava $LIBJAVA;
@@ -267,7 +268,7 @@
# to just make the linker find libgcc using -L options.
# Similar logic applies to libgcj.
if { [istarget "*-*-darwin*"] } {
- lappend cxxflags -shared-libgcc -lgcj -liconv
+ lappend cxxflags "-shared-libgcc -lgcj $libiconv"
}
if { [istarget "*-*-solaris*"] } {
However it ends up compiling...
xecuting on host:
/sw/src/fink.build/gcc46-4.5.999-20100421/darwin_objdir/gcc/xgcc
-B/sw/src/fink.build/gcc46-4.5.999-20100421/darwin_objdir/gcc/
/sw/src/fink.build/gcc46-4.5.999-20100421/gcc-4.6-20100421/libjava/testsuite/libjava.jni/invocation/PR16923.c
-bind_at_load -multiply_defined suppress -I. -I..
-I/sw/src/fink.build/gcc46-4.5.999-20100421/gcc-4.6-20100421/libjava/testsuite/libjava.jni
-I/sw/src/fink.build/gcc46-4.5.999-20100421/gcc-4.6-20100421/libjava/testsuite/../include
-I/sw/src/fink.build/gcc46-4.5.999-20100421/gcc-4.6-20100421/libjava/testsuite/../classpath/include
-fdollars-in-identifiers
-L/sw/src/fink.build/gcc46-4.5.999-20100421/darwin_objdir/x86_64-apple-darwin10.3.0/./libjava/.libs
-ljvm {-shared-libgcc -lgcj -L/sw/lib -liconv} -lm -o PR16923 (timeout =
300)
xgcc: unrecognized option '-shared-libgcc -lgcj -L/sw/lib -liconv'^M
output is:
xgcc: unrecognized option '-shared-libgcc -lgcj -L/sw/lib -liconv'^M
I don't understand why $libiconv in jni.exp gets expanded as...
{-shared-libgcc -lgcj -L/sw/lib -liconv}
instead of just...
-shared-libgcc -lgcj -L/sw/lib -liconv.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43839