From patchwork Wed Sep 29 12:18:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerald Pfeifer X-Patchwork-Id: 66064 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 88502B6F10 for ; Wed, 29 Sep 2010 22:19:03 +1000 (EST) Received: (qmail 27600 invoked by alias); 29 Sep 2010 12:19:01 -0000 Received: (qmail 27586 invoked by uid 22791); 29 Sep 2010 12:19:00 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from vexpert.dbai.tuwien.ac.at (HELO vexpert.dbai.tuwien.ac.at) (128.131.111.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Sep 2010 12:18:56 +0000 Received: from acrux.dbai.tuwien.ac.at (acrux.dbai.tuwien.ac.at [128.131.111.60]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by vexpert.dbai.tuwien.ac.at (Postfix) with ESMTPS id E50B61E05D; Wed, 29 Sep 2010 14:18:52 +0200 (CEST) Date: Wed, 29 Sep 2010 14:18:55 +0200 (CEST) From: Gerald Pfeifer To: gcc-patches@gcc.gnu.org, Loren James Rittle cc: Andriy Gapon Subject: Re: update -pthread specs for FreeBSD In-Reply-To: <4C94F738.1050300@freebsd.org> Message-ID: References: <4C94F5EA.9070106@freebsd.org> <4C94F658.6050000@freebsd.org> <4C94F738.1050300@freebsd.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) 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 On Sat, 18 Sep 2010, Andriy Gapon wrote: >>> Please consider the attached patch that fixes what -pthread should >>> expand too on modern version of FreeBSD. The patch is based on the >>> changes that are made locally to a copy of GCC (4.2) in FreeBSD source >>> tree: >>> http://svn.freebsd.org/viewvc/base/head/contrib/gcc/config/freebsd-spec.h?revision=200038&view=markup I bootstrapped and tested Andriy's patch on amd64-unknown-freebsd8.1 without regressions: http://gcc.gnu.org/ml/gcc-testresults/2010-09/msg02492.html (without) http://gcc.gnu.org/ml/gcc-testresults/2010-09/msg02490.html (with) (In fact, libgomp and libmudflap each lost warnings and failure, respectively, but I believe that was timing issues.) If approved, I can commit this to HEAD and the 4.5 branch. For the record, below the original patch with a ChangeLog of mine. Gerald 2010-09-29 Andriy Gapon PR target/45808 * config/freebsd-spec.h (FBSD_LIB_SPEC): Handle the shared case. --- gcc/config/freebsd-spec.h.orig 2010-09-13 14:35:06.151574339 +0300 +++ gcc/config/freebsd-spec.h 2010-09-13 14:35:08.171465130 +0300 @@ -139,6 +139,9 @@ %{!shared: \ %{!pg: %{pthread:-lpthread} -lc} \ %{pg: %{pthread:-lpthread_p} -lc_p} \ + } \ + %{shared: \ + %{pthread:-lpthread} -lc \ }" #endif #endif