From patchwork Thu Aug 11 14:54:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 658249 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3s9B02682rz9s9c for ; Fri, 12 Aug 2016 00:55:28 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=bqiJJo5B; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; q=dns; s=default; b=ZQo0gR3G8q0AqniQ 9qP4L0Zh9BXK8tV3WYRYY+zlNKxghqsp9SvejhS2tsfMJhhryWjnXsu1g05Gtz9G 8SA0BK/LncGrBQmngV9FLis+dPk1uKq5iFZI3YsQ+I8+NqoSIvoMb1/pgmObUsuA 4IlbKxV0rq09q8t4WRVe8kJ2o1E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type; s=default; bh=1Tgbzh0Ingw9FOGcuA9+Ed 9Qf+0=; b=bqiJJo5BFuDdHYjhBKdgemcLJHFimHAgCdU8zs2OeO/8NVqH6bs/Da q2MnaUGaVL2hrGSJanixXWWQcYPGrLmZ8d1if2bg9H/eVzg/UsushoLHaQpvkLhe cxt6WyEXTAR8n4GEb/6CHEh7ib7UttP9TI9+r6PjqpbW4fTTNgzco= Received: (qmail 13807 invoked by alias); 11 Aug 2016 14:55:08 -0000 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 Received: (qmail 13782 invoked by uid 89); 11 Aug 2016 14:55:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=surprise X-Spam-User: qpsmtpd, 2 recipients X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Aug 2016 14:54:56 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 014052AE; Thu, 11 Aug 2016 16:54:54 +0200 (CEST) Received: from smtp.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 gtf17lMCvH73; Thu, 11 Aug 2016 16:54:52 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 144D22AD; Thu, 11 Aug 2016 16:54:52 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id u7BEspeH008739; Thu, 11 Aug 2016 16:54:51 +0200 (CEST) From: Rainer Orth To: Janne Blomqvist Cc: Jerry DeLisle , Fortran List , GCC Patches Subject: Re: [Patch, libfortran] Multi-threaded random_number References: <710d21ad-f79e-a681-bf1a-9be40c0382d6@charter.net> Date: Thu, 11 Aug 2016 16:54:51 +0200 In-Reply-To: (Janne Blomqvist's message of "Thu, 11 Aug 2016 12:01:59 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Hi Janne, > committed a slightly modified patch as r239356. Changes from the > submitted patch attached. To my surprise, it turned out that my > fallback code using __gthread_key_{create,delete} and > __ghtread_{get,set}_specific was faster than my TLS code, so I removed > the TLS configure magic and the TLS code and just left the __gthread > stuff in. this patch broke Solaris bootstrap: /vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/random.c: In function 'constructor_random': /vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/ random.c:915:45: error: 'free' undeclared (first use in this function); did you mean 'frexp'? __gthread_key_create (&rand_state_key, &free); ^~~~ frexp /vol/gcc/src/hg/trunk/local/libgfortran/intrinsics/random.c:915:45: note: each undeclared identifier is reported only once for each function it appears in You need to include for the free declaration, as this patch does. Allowed i386-pc-solaris2.12 and sparc-sun-solaris2.12 to continue. I'm going to install this as obvious. Rainer 2016-08-11 Rainer Orth libgfortran: * intrinsics/random.c: Include . diff --git a/libgfortran/intrinsics/random.c b/libgfortran/intrinsics/random.c --- a/libgfortran/intrinsics/random.c +++ b/libgfortran/intrinsics/random.c @@ -27,6 +27,7 @@ see the files COPYING3 and COPYING.RUNTI #include "libgfortran.h" #include #include +#include /* For getosrandom. */ #ifdef HAVE_SYS_TYPES_H