From patchwork Mon Feb 12 11:15:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 871986 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-473065-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Wqh6Pslj"; dkim-atps=neutral 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 3zg34v3Y5jz9t34 for ; Mon, 12 Feb 2018 22:15:58 +1100 (AEDT) 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:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=ipZJKnvyZ/N7B+Ng6Qz7A6spE4Xjpw9oy2vSNRlXA0dsrQYSLFSDv X6aLhSNY75R2jS7IMRzZNxnp3APkQaipGfRYFgenCpI/H/RKJr1O5WqcnmZx/xqH Eqy6uY8GTCliN1PgTepFi4GlTU3DsH9eqP/5ioVoLDLkXn+KMNetbg= 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:subject:date:message-id:mime-version:content-type; s= default; bh=RkUx9TfP2dr1VRpc5AEfkct1sdA=; b=Wqh6PsljcZTleFBPBsJV oScv4lz4S1m2ERcoK+uvhbMjS0H50KTiSUlekOvVdtOIxxIXRH2DZo5buyK1E9Qd XYXHbDKEy2uI21sdT8Iiw6XYxwNEDqiemnnbQRfmJ8B52mNnPX/CIWykOlhBVBlq RSrCv7x+N2xodG2TnZFGhJ4= Received: (qmail 52869 invoked by alias); 12 Feb 2018 11:15:47 -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 52766 invoked by uid 89); 12 Feb 2018 11:15:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, TIME_LIMIT_EXCEEDED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 spammy= X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Feb 2018 11:15:21 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B4BBFAD45 for ; Mon, 12 Feb 2018 11:15:17 +0000 (UTC) From: Andreas Schwab To: gcc-patches@gcc.gnu.org Subject: [PATCH] RISC-V: define _REENTRANT with -pthread X-Yow: Let's climb to the TOP of that MOUNTAIN and think about STRIP MINING!! Date: Mon, 12 Feb 2018 12:15:17 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (gnu/linux) MIME-Version: 1.0 This is expected by the AX_PTHREAD autoconf macro from . * config/riscv/linux.h (CPP_SPEC): Define. diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h index 1da1b0a74e..ad03654e8d 100644 --- a/gcc/config/riscv/linux.h +++ b/gcc/config/riscv/linux.h @@ -47,6 +47,8 @@ along with GCC; see the file COPYING3. If not see #define ICACHE_FLUSH_FUNC "__riscv_flush_icache" +#define CPP_SPEC "%{pthread:-D_REENTRANT}" + #define LINK_SPEC "\ -melf" XLEN_SPEC "lriscv \ %{shared} \