From patchwork Sun Aug 14 12:59:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 659029 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 3sBzGr0k8nz9s9G for ; Sun, 14 Aug 2016 22:59:31 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=kMGXoCgs; 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:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; q=dns; s=default; b= SUnPVkrgI0PX6G0h9xnxZEAgCagDVxJVT+ejQ+MP71inj1AI3+i8yOlmU8wNCxPj IohXW6T9UNe8MV4rvZ9Y3GfbuN+oT5ZHC7njWLI3+vbecqU/BTlalyfHqs38Ta2i yxJO0/wAynzMiJLyG3iP2JOSqJ+3vIsgWVDXaibyWeY= 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:to:subject:mime-version:content-type :content-transfer-encoding:message-id:from; s=default; bh=i6Q6O8 XK7SGCkLQjDT75uoCt1FQ=; b=kMGXoCgsslMAKpU5X4kiQZrFvvb7WSlniG7Z+/ OSYJp3INq4QoE9U0Utx9STz7twnvcLdQAOLx31pbK2rSsTvvQnJEn+Oy/cOx6eJo 9idz+mluqRJpCZUhYVFmZwTWF/J3TOzwU64Tq3DBC4S3d4/iVqUWukcr7uYmplQb 8RBAk= Received: (qmail 14059 invoked by alias); 14 Aug 2016 12:59:25 -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 14044 invoked by uid 89); 14 Aug 2016 12:59:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=1207, ptw, PTW, msync X-HELO: mx1.redhat.com Date: Sun, 14 Aug 2016 14:59:20 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] Remove the ptw-% patterns User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20160814125920.B4929402B79E8@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) Nothing depends on the PTW macro anymore, so the mechanism to define PTW for recompliations of libc routines is no longer needed. (Reducing the number of pattern rules in sysd-rules is critical for improving make performance.) 2016-08-14 Florian Weimer Remove support for compiling wrappers with PTW. * sysdeps/nptl/Makeconfig: Drop ptw- support. * nptl/Makefile (pthread-compat-wrappers): Define. (libpthread-routines): Use pthread-compat-wrappers. * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines, libpthread-shared-only-routines): Remove ptw- prefix. * sysdeps/s390/nptl/Makefile (libpthread-routines, libpthread-shared-only-routines): Likewise. * sysdeps/ia64/nptl/Makefile (libpthread-routines, libpthread-shared-only-routines): Likewise. * sysdeps/nacl/Makefile (libpthread-routines): Use pthread-compat-wrappers to filter the routines list instead of the ptw- prefix. diff --git a/nptl/Makefile b/nptl/Makefile index 2ddcd2b..e8de1bc 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -33,6 +33,18 @@ routines = alloca_cutoff forward libc-lowlevellock libc-cancellation \ register-atfork unregister-atfork shared-only-routines = forward +# We need to provide certain routines for compatibility with existing +# binaries. +pthread-compat-wrappers = \ + write read close fcntl accept \ + connect recv recvfrom send \ + sendto fsync lseek llseek \ + msync nanosleep open open64 pause \ + pread pread64 pwrite pwrite64 \ + tcdrain wait waitpid msgrcv msgsnd \ + sigwait sigsuspend \ + recvmsg sendmsg + libpthread-routines = nptl-init vars events version pt-interp \ pthread_create pthread_exit pthread_detach \ pthread_join pthread_tryjoin pthread_timedjoin \ @@ -108,14 +120,7 @@ libpthread-routines = nptl-init vars events version pt-interp \ lowlevellock lowlevelrobustlock \ lll_timedlock_wait lll_timedwait_tid \ pt-fork pt-vfork \ - ptw-write ptw-read ptw-close ptw-fcntl ptw-accept \ - ptw-connect ptw-recv ptw-recvfrom ptw-send \ - ptw-sendto ptw-fsync ptw-lseek ptw-llseek \ - ptw-msync ptw-nanosleep ptw-open ptw-open64 ptw-pause \ - ptw-pread ptw-pread64 ptw-pwrite ptw-pwrite64 \ - ptw-tcdrain ptw-wait ptw-waitpid ptw-msgrcv ptw-msgsnd \ - ptw-sigwait ptw-sigsuspend \ - ptw-recvmsg ptw-sendmsg \ + $(pthread-compat-wrappers) \ pt-raise pt-system \ flockfile ftrylockfile funlockfile \ sigaction \ diff --git a/sysdeps/ia64/nptl/Makefile b/sysdeps/ia64/nptl/Makefile index 1e6be8e..4bc1a18 100644 --- a/sysdeps/ia64/nptl/Makefile +++ b/sysdeps/ia64/nptl/Makefile @@ -20,6 +20,6 @@ gen-as-const-headers += tcb-offsets.sym endif ifeq ($(subdir),nptl) -libpthread-routines += ptw-sysdep ptw-sigblock ptw-sigprocmask -libpthread-shared-only-routines += ptw-sysdep ptw-sigblock ptw-sigprocmask +libpthread-routines += sysdep sigblock sigprocmask +libpthread-shared-only-routines += sysdep sigblock sigprocmask endif diff --git a/sysdeps/nacl/Makefile b/sysdeps/nacl/Makefile index 71a4f8f..a25bd69 100644 --- a/sysdeps/nacl/Makefile +++ b/sysdeps/nacl/Makefile @@ -123,7 +123,8 @@ endif ifeq ($(subdir),nptl) # We do not need any wrappers in libpthread. -libpthread-routines := $(filter-out ptw-%,$(libpthread-routines)) +libpthread-routines := \ + $(filter-out $(pthread-compat-wrappers),$(libpthread-routines)) endif ifeq ($(subdir),misc) diff --git a/sysdeps/nptl/Makeconfig b/sysdeps/nptl/Makeconfig index 2f4918d..babee94 100644 --- a/sysdeps/nptl/Makeconfig +++ b/sysdeps/nptl/Makeconfig @@ -26,7 +26,3 @@ shared-thread-library = $(common-objpfx)nptl/libpthread_nonshared.a \ static-thread-library = $(common-objpfx)nptl/libpthread.a rpath-dirs += nptl - -# This makes for ptw-*.? object rules in sysd-rules. -ptw-CPPFLAGS := -DPTW -sysd-rules-patterns += ptw-%:% diff --git a/sysdeps/s390/nptl/Makefile b/sysdeps/s390/nptl/Makefile index 3a391c8..352edc0 100644 --- a/sysdeps/s390/nptl/Makefile +++ b/sysdeps/s390/nptl/Makefile @@ -20,6 +20,6 @@ gen-as-const-headers += tcb-offsets.sym endif ifeq ($(subdir),nptl) -libpthread-routines += ptw-sysdep -libpthread-shared-only-routines += ptw-sysdep +libpthread-routines += sysdep +libpthread-shared-only-routines += sysdep endif diff --git a/sysdeps/unix/sysv/linux/alpha/Makefile b/sysdeps/unix/sysv/linux/alpha/Makefile index 3b523b7..1e858ce 100644 --- a/sysdeps/unix/sysv/linux/alpha/Makefile +++ b/sysdeps/unix/sysv/linux/alpha/Makefile @@ -39,6 +39,6 @@ endif # math ifeq ($(subdir),nptl) # pull in __syscall_error routine, __sigprocmask, __syscall_rt_sigaction -libpthread-routines += ptw-sysdep ptw-sigprocmask ptw-rt_sigaction -libpthread-shared-only-routines += ptw-sysdep ptw-sigprocmask ptw-rt_sigaction +libpthread-routines += sysdep sigprocmask rt_sigaction +libpthread-shared-only-routines += sysdep sigprocmask rt_sigaction endif