From patchwork Tue Sep 15 03:18:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 517653 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 7974C140770 for ; Tue, 15 Sep 2015 13:19:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=MilIpb3y; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 53353896BA; Tue, 15 Sep 2015 03:19:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id C864kepmV6oG; Tue, 15 Sep 2015 03:19:29 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8FB5E8829E; Tue, 15 Sep 2015 03:19:29 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 900751C2962 for ; Tue, 15 Sep 2015 03:19:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8B78B961C0 for ; Tue, 15 Sep 2015 03:19:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yrIqIofFzGkA for ; Tue, 15 Sep 2015 03:19:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by hemlock.osuosl.org (Postfix) with ESMTPS id 92AE895FB2 for ; Tue, 15 Sep 2015 03:19:27 +0000 (UTC) Received: by lanb10 with SMTP id b10so98180912lan.3 for ; Mon, 14 Sep 2015 20:19:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=B5knSSSp9r/qJmSJhyB9sxjIgeUcYGM8rzXyoztIE1k=; b=MilIpb3yHNpxJp3wt1xHATbfb2oW5CCgdgB6RPNuhsF08VvmYacBbqAxVYJU69H2GJ PJcL7Saxutz9c7gizaccdXao6C+qF7zWeFXyvUgnRB4R+xydTmdM7H7P+NL9tO9r6wKT peASSF91z79nTQ83gxxQcVxQh8M+j7fE5k+NYVctxmY+H/fgGkob29ZgI5FIRK4NpaAr g8t7viFgHn1dKxeA4B5LRIU4ZUo7N6Ih//s8UJnq2QUYJtQFwSiuIVeeLYJVlFj/w7l+ 7VCnlfhbZ68W+bF+gup64X2e3RhpFPI7WEDoKm8QJWUnJCexpcvMmat13vTSBRpQ8eH2 qC4A== X-Received: by 10.112.162.2 with SMTP id xw2mr17817184lbb.98.1442287165813; Mon, 14 Sep 2015 20:19:25 -0700 (PDT) Received: from octofox.metropolis ([5.19.183.212]) by smtp.gmail.com with ESMTPSA id nv3sm2884510lbb.24.2015.09.14.20.19.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Sep 2015 20:19:24 -0700 (PDT) From: Max Filippov To: uclibc@uclibc.org Subject: [PATCH] NPTL: fix CFLAGS for cancellation points Date: Tue, 15 Sep 2015 06:18:38 +0300 Message-Id: <1442287118-11130-1-git-send-email-jcmvbkbc@gmail.com> X-Mailer: git-send-email 1.8.1.4 Cc: devel@uclibc-ng.org X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" Stack unwinding that happens during NPTL thread cancellation needs cancellable syscall wrapper functions to be compiled with -fexceptions -fasynchronous-unwind-tables to be able to unwind to cleanup handlers registered before syscall invocation. Add these flags for all cancellable syscall wrappers. Signed-off-by: Max Filippov --- libpthread/nptl/Makefile.in | 49 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in index 55eeba2..8261fce 100644 --- a/libpthread/nptl/Makefile.in +++ b/libpthread/nptl/Makefile.in @@ -187,18 +187,51 @@ CFLAGS-sem_wait.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-sem_timedwait.c = -fexceptions -fasynchronous-unwind-tables # These are the function wrappers we have to duplicate here. -CFLAGS-fcntl.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-accept.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-clock_nanosleep.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-close.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-connect.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-creat.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-fdatasync.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-fsync.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-lockf.c = -fexceptions -CFLAGS-pread.c = -fexceptions -fasynchronous-unwind-tables -CFLAGS-pread64.c = -fexceptions -fasynchronous-unwind-tables -CFLAGS-pwrite.c = -fexceptions -fasynchronous-unwind-tables -CFLAGS-pwrite64.c = -fexceptions -fasynchronous-unwind-tables -CFLAGS-wait.c = -fexceptions -fasynchronous-unwind-tables -CFLAGS-waitpid.c = -fexceptions -fasynchronous-unwind-tables -CFLAGS-sigwait.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-msgrcv.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-msgsnd.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-msync.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-nanosleep.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-open64.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-open.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pause.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-poll.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-ppoll.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pread_write.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pselect.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-read.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-readv.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-recv.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-recvfrom.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-recvmsg.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-__rt_sigtimedwait.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-__rt_sigwaitinfo.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-send.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-sendmsg.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-sendto.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-sigpause.c = -fexceptions +CFLAGS-sigsuspend.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-sigtimedwait.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-sigwait.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-sigwaitinfo.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-__syscall_fcntl64.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-__syscall_fcntl.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-tcdrain.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-usleep.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-wait4.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-wait.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-waitid.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-waitpid.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-write.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-writev.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-pt-system.c = -fexceptions -I$(top_srcdir)libc/stdlib