From patchwork Fri Feb 18 20:47:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 83646 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 C9551B711C for ; Sat, 19 Feb 2011 07:47:24 +1100 (EST) Received: (qmail 32696 invoked by alias); 18 Feb 2011 20:47:19 -0000 Received: (qmail 32675 invoked by uid 22791); 18 Feb 2011 20:47:18 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_IB, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Feb 2011 20:47:12 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1IKlBP2018903 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 18 Feb 2011 15:47:11 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p1IKl9LC024585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 18 Feb 2011 15:47:11 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p1IKl9s9019923 for ; Fri, 18 Feb 2011 21:47:09 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p1IKl9gB019921 for gcc-patches@gcc.gnu.org; Fri, 18 Feb 2011 21:47:09 +0100 Date: Fri, 18 Feb 2011 21:47:08 +0100 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [committed] Fix LD_LIBRARY_PATH setting in libgomp fortran.exp testing (PR libgomp/47804) Message-ID: <20110218204708.GN30899@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 Hi! The recent change resulted in libgfortran/.libs not being added into LD_LIBRARY_PATH for fortran libgomp testing if libquadmath didn't exist, which is wrong. Additionally, similarly to the earlier checks in fortran.exp we should test both libquadmath.a and libquadmath.${shlib_ext} presence. Bootstrapped/regtested on x86_64-linux and i686-linux, manually tested with removing libquadmath.a, then also libquadmath.so, committed to trunk. 2011-02-18 Jakub Jelinek PR libgomp/47804 * testsuite/libgomp.fortran/fortran.exp: Check for both libquadmath.a and libquadmath.${shlib_ext}. If neither exists, but $blddir != "", still append ${blddir}/${lang_library_path} to ld_library_path. Jakub --- libgomp/testsuite/libgomp.fortran/fortran.exp.jj 2011-02-18 08:49:27.000000000 +0100 +++ libgomp/testsuite/libgomp.fortran/fortran.exp 2011-02-18 18:29:07.000000000 +0100 @@ -37,11 +37,16 @@ if { $lang_test_file_found } { # Gather a list of all tests. set tests [lsort [find $srcdir/$subdir *.\[fF\]{,90,95,03,08}]] - if { ($blddir != "") && [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"] } { - lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/" - # Allow for spec subsitution. - lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/" - set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}:${blddir}/${quadmath_library_path}" + if { $blddir != "" } { + if { [file exists "${blddir}/${quadmath_library_path}/libquadmath.a"] + || [file exists "${blddir}/${quadmath_library_path}/libquadmath.${shlib_ext}"] } { + lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/${quadmath_library_path}/" + # Allow for spec subsitution. + lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/${quadmath_library_path}/" + set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}:${blddir}/${quadmath_library_path}" + } else { + set ld_library_path "$always_ld_library_path:${blddir}/${lang_library_path}" + } } else { set ld_library_path "$always_ld_library_path" }