From patchwork Mon Apr 20 18:51:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 462877 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 A57791400DE for ; Tue, 21 Apr 2015 04:51:20 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=fdjPtSpl; dkim-adsp=none (unprotected policy); 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=wym9sxm3UMzCToOk+ WmddVbwPxmm5RiJmvkOt4wSvl9zLa0jadbjK6FSbhI8JLg1AOuiFExNKCGLFiJTJ Q3jTdQ7Ozl86+tIscCYinTrPC9TyJOnFalmkGAHbymxLyKQvxvksHHrm7bWMhESD 4lN60EYjoiBbsTijCAR4mme1RQ= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=ip6x7WbmSaDGsDHKaJMd7ve UQgA=; b=fdjPtSpl2JuDc4GXk6AbtJAJwnICBB9sehFGwk4wMJdLUL+6GXa1K4J 6+N8Z2qlJ5iXldWBzSHlAfdDubUpIU5x7VjkOjjQzNG3Wkso5+5ZZIx0Cm5KVbci BNlv7C+LhSw2JxNA0dRB4TsdRSbhscdqhjrX1pZfqJdK9T/HSv4M= Received: (qmail 61122 invoked by alias); 20 Apr 2015 18:51:10 -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 61029 invoked by uid 89); 20 Apr 2015 18:51:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Apr 2015 18:51:08 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-18.uk.mimecast.lan; Mon, 20 Apr 2015 19:51:05 +0100 Received: from [10.2.206.56] ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 20 Apr 2015 19:51:04 +0100 Message-ID: <55354A98.5020307@arm.com> Date: Mon, 20 Apr 2015 19:51:04 +0100 From: Szabolcs Nagy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Gregor Richards , Rich Felker , Szabolcs Nagy Subject: [PATCH 1/13] libitm fixes for musl support References: <55354A4A.4060702@arm.com> In-Reply-To: <55354A4A.4060702@arm.com> X-MC-Unique: JG7Pu8qsSziFjibnZS9Zgw-1 X-IsSubscribed: yes This are minor correctness fixes required for musl. (fcntl.h is the standard header and always available on Linux, sys/fcntl.h is just a legacy alias, so use the standard one.) libitm/Changelog: 2015-04-16 Gregor Richards * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h. * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined. diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc index a1c2cfd..ea8f023 100644 --- a/libitm/config/arm/hwcap.cc +++ b/libitm/config/arm/hwcap.cc @@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0 #ifdef __linux__ #include -#include +#include #include static void __attribute__((constructor)) diff --git a/libitm/config/linux/x86/tls.h b/libitm/config/linux/x86/tls.h index e731ab7..54ad8b6 100644 --- a/libitm/config/linux/x86/tls.h +++ b/libitm/config/linux/x86/tls.h @@ -25,16 +25,19 @@ #ifndef LIBITM_X86_TLS_H #define LIBITM_X86_TLS_H 1 -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) +#if defined(__GLIBC_PREREQ) +#if __GLIBC_PREREQ(2, 10) /* Use slots in the TCB head rather than __thread lookups. GLIBC has reserved words 10 through 13 for TM. */ #define HAVE_ARCH_GTM_THREAD 1 #define HAVE_ARCH_GTM_THREAD_DISP 1 #endif +#endif #include "config/generic/tls.h" -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) +#if defined(__GLIBC_PREREQ) +#if __GLIBC_PREREQ(2, 10) namespace GTM HIDDEN { #ifdef __x86_64__ @@ -101,5 +104,6 @@ static inline void set_abi_disp(struct abi_dispatch *x) } // namespace GTM #endif /* >= GLIBC 2.10 */ +#endif #endif // LIBITM_X86_TLS_H