From patchwork Wed Jul 15 22:21:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 496009 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 B2BB9140778 for ; Thu, 16 Jul 2015 08:22:08 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=NLAZgYsV; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:to:subject:from:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=auP AbIjQEosRQnYBoyMERiI8ZeHAFRBkKLLC1/m9g4/QgE4kTLqHMQWh971k0cip5s2 m2ujpoBLQSmB7kEAlwSQIufkWLvWlUr2CxHcL1HIu5z5Mwn4+R8nCzWPLmzKU5RD 7QU53IYDr8xxUxD5z8+lIr7WP/P3m3DPnj446NHY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:message-id:to:subject:from:mime-version :content-type:content-transfer-encoding; s=default; bh=/79FVh2RU sz7ly7U3nyV+CCYrX8=; b=NLAZgYsVUstLCacQbonqe8tgKAqTvu5GxhtLqUhoO kmWX9Vocj/dPuiX9BoeihFwWDj0OOl8CKMDboClrQk59d7ETUCFviqZlfFXOMXWY UWl0Lto68XqKvb6XOZqmPVxqmqfpV0eFDtMKubvg5vHjc2kwYl8yl8oTRAmGqEul 6I= Received: (qmail 77096 invoked by alias); 15 Jul 2015 22:22:02 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 77080 invoked by uid 89); 15 Jul 2015 22:22:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL, BAYES_05, KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: shards.monkeyblade.net Date: Wed, 15 Jul 2015 15:21:57 -0700 (PDT) Message-Id: <20150715.152157.1923341079641036124.davem@davemloft.net> To: libc-alpha@sourceware.org Subject: [PATCH] Fix sparc build From: David Miller Mime-Version: 1.0 Sparc hasn't built in a month or so, this cures everything I've hit so far. I need to do a math test regen as well. Ok to commit? 2015-07-15 David S. Miller * sysdeps/sparc/nptl/pthread_barrier_init.c: Include futex-intenal.h * sysdeps/sparc/sparc32/sparcv9/Makefile (nscd): Add cpu_relax. * sysdeps/sparc/sparc64/Makefile: Likewise. * sysdeps/sparc/sparc32/sparcv9/bits/atomic.h (atomic_spin_nop): Remove space from macro define. * sysdeps/sparc/sparc64/bits/atomic.h (atomic_spin_nop): Likewise. diff --git a/sysdeps/sparc/nptl/pthread_barrier_init.c b/sysdeps/sparc/nptl/pthread_barrier_init.c index 86ec7d0..d13c32a 100644 --- a/sysdeps/sparc/nptl/pthread_barrier_init.c +++ b/sysdeps/sparc/nptl/pthread_barrier_init.c @@ -19,6 +19,7 @@ #include #include "pthreadP.h" #include +#include #include int diff --git a/sysdeps/sparc/sparc32/sparcv9/Makefile b/sysdeps/sparc/sparc32/sparcv9/Makefile index 925fa4f..5baaf2b 100644 --- a/sysdeps/sparc/sparc32/sparcv9/Makefile +++ b/sysdeps/sparc/sparc32/sparcv9/Makefile @@ -14,6 +14,10 @@ ASFLAGS-.og += -Wa,-Av9a ASFLAGS-.oS += -Wa,-Av9a endif +ifeq ($(subdir),nscd) +routines += cpu_relax +endif + ifeq ($(subdir), nptl) libpthread-routines += cpu_relax endif diff --git a/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h b/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h index 2122afb..0ff5dcd 100644 --- a/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h +++ b/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h @@ -102,4 +102,4 @@ typedef uintmax_t uatomic_max_t; __asm __volatile ("membar #LoadStore | #StoreStore" : : : "memory") extern void __cpu_relax (void); -#define atomic_spin_nop () __cpu_relax () +#define atomic_spin_nop() __cpu_relax () diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile index dfc118c..13eb1c3 100644 --- a/sysdeps/sparc/sparc64/Makefile +++ b/sysdeps/sparc/sparc64/Makefile @@ -10,6 +10,10 @@ ASFLAGS-.og += -Wa,-Av9d ASFLAGS-.oS += -Wa,-Av9d endif +ifeq ($(subdir),nscd) +routines += cpu_relax +endif + ifeq ($(subdir),nptl) libpthread-routines += cpu_relax endif diff --git a/sysdeps/sparc/sparc64/bits/atomic.h b/sysdeps/sparc/sparc64/bits/atomic.h index 48b7fd6..79f4a1d 100644 --- a/sysdeps/sparc/sparc64/bits/atomic.h +++ b/sysdeps/sparc/sparc64/bits/atomic.h @@ -123,4 +123,4 @@ typedef uintmax_t uatomic_max_t; __asm __volatile ("membar #LoadStore | #StoreStore" : : : "memory") extern void __cpu_relax (void); -#define atomic_spin_nop () __cpu_relax () +#define atomic_spin_nop() __cpu_relax ()