From patchwork Mon Jul 18 11:53:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 105251 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 8CB4CB6F84 for ; Mon, 18 Jul 2011 21:54:24 +1000 (EST) Received: (qmail 2512 invoked by alias); 18 Jul 2011 11:54:04 -0000 Received: (qmail 2502 invoked by uid 22791); 18 Jul 2011 11:54:04 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Jul 2011 11:53:44 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 4B53B53B; Mon, 18 Jul 2011 13:53:43 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id yCRduuGPZiTN; Mon, 18 Jul 2011 13:53:41 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id C5B4A53A; Mon, 18 Jul 2011 13:53:41 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p6IBreJ5011442; Mon, 18 Jul 2011 13:53:40 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Jakub Jelinek Subject: [testsuite] Don't explicitly link libgomp tests with -lgomp (PR target/49541) Date: Mon, 18 Jul 2011 13:53:40 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 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 As described in the PR, the fact that the libgomp testsuite always links with -lgomp, even with -fno-openmp, causes testsuite failures on targets (like Solaris) that need special options when linking libgomp. With -fgomp, this is taken care of by the relevant specs (like adding -pthread), but not so otherwise. I found no reason for that explicit -lgomp since this is already dealt with by -fopenmp. The following patch fixes the failures on Solaris 8 and was tested with make check in libgomp on sparc-sun-solaris2.8, i386-pc-solaris2.10, and x86_64-unknown-linux-gnu. Ok for mainline and 4.6 branch? Rainer 2011-07-15 Rainer Orth PR target/49541 * testsuite/lib/libgomp.exp (libgomp_init): Don't add -lgomp to ldflags. diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -137,7 +137,6 @@ proc libgomp_init { args } { lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs" } lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.." - lappend ALWAYS_CFLAGS "ldflags=-lgomp" # We use atomic operations in the testcases to validate results. if { ([istarget i?86-*-*] || [istarget x86_64-*-*])