From patchwork Fri Jun 25 13:24:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 56910 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 3AD3AB6F17 for ; Fri, 25 Jun 2010 23:24:47 +1000 (EST) Received: (qmail 12662 invoked by alias); 25 Jun 2010 13:24:44 -0000 Received: (qmail 12643 invoked by uid 22791); 25 Jun 2010 13:24:43 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, TW_BJ, TW_CX, TW_GC, TW_IB, TW_LG, TW_XX, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Fri, 25 Jun 2010 13:24:38 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id A19F7B005C; Fri, 25 Jun 2010 09:24:36 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id o5PDOaNN028925; Fri, 25 Jun 2010 09:24:36 -0400 Date: Fri, 25 Jun 2010 09:24:36 -0400 From: Jack Howarth To: gcc-patches@gcc.gnu.org Cc: mikestump@comcast.net, iains@gcc.gnu.org Subject: [PATCH][Revised] Backport PR 43839 fix for darwin to gcc 4.5.1 Message-ID: <20100625132436.GA28923@bromo.med.uc.edu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org The attached patch backports r159009 which eliminated PR43839 on darwin where alternative libiconv locations weren't being honored in the libjava testsuite. Tested on x86_64-apple-darwin10. Okay for gcc 4.5.1? Jack ps Same as previous posting but with fixed ChangeLog entry. 2010-06-24 Jack Howarth Backport from mainline 2010-05-03 Jack Howarth PR java/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. Index: libjava/testsuite/Makefile.in =================================================================== --- libjava/testsuite/Makefile.in (revision 161355) +++ libjava/testsuite/Makefile.in (working copy) @@ -388,25 +388,6 @@ 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 @@ .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: libjava/testsuite/libjava.jni/jni.exp =================================================================== --- libjava/testsuite/libjava.jni/jni.exp (revision 161355) +++ libjava/testsuite/libjava.jni/jni.exp (working copy) @@ -251,7 +251,11 @@ } 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 @@ # 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*"] } { Index: libjava/testsuite/Makefile.am =================================================================== --- libjava/testsuite/Makefile.am (revision 161355) +++ libjava/testsuite/Makefile.am (working copy) @@ -24,6 +24,31 @@ .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: