From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13330 invoked by alias); 20 Sep 2005 19:14:19 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 13297 invoked by uid 22791); 20 Sep 2005 19:14:09 -0000 Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Tue, 20 Sep 2005 19:14:09 +0000 Received: from drow by nevyn.them.org with local (Exim 4.52) id 1EHnZA-000786-2t; Tue, 20 Sep 2005 15:14:08 -0400 Date: Tue, 20 Sep 2005 19:14:00 -0000 From: Daniel Jacobowitz To: David Highley Cc: gdb@sources.redhat.com Subject: Re: GDB problem with statically linked application Message-ID: <20050920191408.GA27365@nevyn.them.org> Mail-Followup-To: David Highley , gdb@sources.redhat.com References: <1127242220.7875@horse.he.net> <200509201908.j8KJ838m017649@douglas.highley-recommended.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200509201908.j8KJ838m017649@douglas.highley-recommended.com> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-09/txt/msg00142.txt.bz2 On Tue, Sep 20, 2005 at 12:08:03PM -0700, David Highley wrote: > I see that you have fallen into the same compiler trap we have just > discovered. It appears to never be correct to use the flag "-lpthread" > when using the compiler. You should always use "-pthread". This flag is > used in the preprocessor to turn on different code generation and the > reentrancy options. But.... Sorry, but welcome to the modern world. On most platforms -pthread does nothing useful except -lpthread. It also defines -D_REENTRANT, and on GNU/Linux this flag does nothing at all. On some other operating systems (Solaris maybe?) it does more. In that case using -pthread is correct, or defining the relevant options (found in the system documentation) yourself. -- Daniel Jacobowitz CodeSourcery, LLC