From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18183 invoked by alias); 1 Jun 2009 20:21:07 -0000 Received: (qmail 18160 invoked by uid 22791); 1 Jun 2009 20:21:07 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.208.78.105) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 01 Jun 2009 20:21:02 +0000 Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.3/8.14.3) with ESMTP id n51KL13p023443; Mon, 1 Jun 2009 13:21:01 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.3/8.14.3/Submit) id n51KL0ss023442; Mon, 1 Jun 2009 13:21:00 -0700 (PDT) (envelope-from sgk) Date: Mon, 01 Jun 2009 20:21:00 -0000 From: Steve Kargl To: Janis Johnson Cc: Gerald Pfeifer , fortran@gcc.gnu.org, gcc@gcc.gnu.org Subject: Re: Fortran-related libgomp failures in case of -fno-openmp Message-ID: <20090601202100.GA23172@troutmask.apl.washington.edu> References: <20090601181431.GA22086@troutmask.apl.washington.edu> <1243885782.6140.19.camel@janis-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1243885782.6140.19.camel@janis-laptop> User-Agent: Mutt/1.4.2.3i Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00016.txt.bz2 On Mon, Jun 01, 2009 at 12:49:42PM -0700, Janis Johnson wrote: > On Mon, 2009-06-01 at 11:14 -0700, Steve Kargl wrote: > > > > If someone uses -fno-openmp and still tries to link to libgomp, > > then the -pthread option is missing and hence the test fail > > because -lpthread is not included. On FreeBSD, libgomp.so.1 > > does not show a dependency on libpthread, so the dynamic linker > > can't automagically work. > > Why doesn't libgomp.so.1 show a depedency on libpthread, isn't > that the bug? > I've never looked at how the authors of libgomp wrote the build glue nor have I tried to decipher why one would specifically suppress OpenMP with the -fno-openmp option yet still try to link to its runtime library. It does appear that libgomp/configure looks to see if -pthread (or -lpthread) is required, but then it may not use that result in actually building libgomp.so.1 -- Steve