From patchwork Fri May 16 21:02:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 349761 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 C2565140087 for ; Sat, 17 May 2014 07:02:27 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:cc:subject:in-reply-to :references:message-id:date; q=dns; s=default; b=nGnn65AO5Tz8IXA HaWAt2xZqOLE3dtQOSMz8U/Dm1i1731JvcbgzFWmTyyYUo7lSa0NKpMFWlCDHDoL k+N7gPXEhMQ4MsWIocVwX/8+ZHIa3BWbebwBsQPGeoHosysFDKg047WyNJRWB2fR PHMOAazmxNpuqA6ISsk57IevnbQQ= 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:mime-version:content-type :content-transfer-encoding:from:to:cc:subject:in-reply-to :references:message-id:date; s=default; bh=tTg/YIrHRZ8OA86iKWPGO V1vVTE=; b=grbEkSHDlvrmBVc3Hdz5Nsk1Ww4VDsUH4Vnf+1BWDWIUCaI2UC+hn B5ingNYQ0uZRweV2JAAZuQlvYFwNzq5Ap4NLz1pIC5pfKUZuX1vCcz/UrYR8fXDe uN6ct3swZfFXzJLwSOhC0RZszJjesHj8H8q68ybsIlqeEo4vIVSzgM= Received: (qmail 18955 invoked by alias); 16 May 2014 21:02:22 -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 18935 invoked by uid 89); 16 May 2014 21:02:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: Steve Ellcey Cc: "GNU C. Library" Subject: [PATCH roland/waitpid] Fix __waitpid_nocancel link error In-Reply-To: Steve Ellcey's message of Friday, 16 May 2014 13:38:31 -0700 <1400272711.30618.15.camel@ubuntu-sellcey> References: <1400252942.30618.8.camel@ubuntu-sellcey> <20140516182541.5F4852C3A49@topped-with-meat.com> <1400272711.30618.15.camel@ubuntu-sellcey> Message-Id: <20140516210218.8081E2C3A81@topped-with-meat.com> Date: Fri, 16 May 2014 14:02:18 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=HrjlRSjS c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=OKhEQJ6HDdoA:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=F-_4UYs1qrDmQxnwaSwA:9 a=CjuIK1q_8ugA:10 > Well, I am not getting that error anymore but now my MIPS build dies > while linking libc.so: > > /local/home/sellcey/nightly/obj-mips-mti-linux-gnu/glibc/obj_default/libc_pic.os: In function `_IO_new_proc_close': > /local/home/sellcey/nightly/src/glibc/libio/iopopen.c:347: undefined reference to `__waitpid_nocancel' > /local/home/sellcey/nightly/src/glibc/libio/iopopen.c:345: undefined reference to `__waitpid_nocancel' > /local/home/sellcey/nightly/install-mips-mti-linux-gnu/lib/gcc/mips-mti-linux-gnu/4.10.0/../../../../mips-mti-linux-gnu/bin/ld: /local/home/sellcey/nightly/obj-mips-mti-linux-gnu/glibc/obj_default/libc.so: hidden symbol `__waitpid_nocancel' isn't defined > /local/home/sellcey/nightly/install-mips-mti-linux-gnu/lib/gcc/mips-mti-linux-gnu/4.10.0/../../../../mips-mti-linux-gnu/bin/ld: final link failed: Bad value > collect2: error: ld returned 1 exit status This is unrelated to fork. It is due to my not-cancel.h change. I think the following patch will fix it. Can you verify that? (You can just use 'git checkout roland/waitpid' if you are otherwise using unmodified trunk.) Thanks, Roland * sysdeps/unix/sysv/linux/not-cancel.h (waitpid_not_cancel): Use wait4 regardless of [__NR_waitpid]. --- a/sysdeps/unix/sysv/linux/not-cancel.h +++ b/sysdeps/unix/sysv/linux/not-cancel.h @@ -83,13 +83,8 @@ extern int __openat64_nocancel (int fd, const char *fname, int oflag, __fcntl_nocancel (fd, cmd, val) /* Uncancelable waitpid. */ -#ifdef __NR_waitpid -# define waitpid_not_cancel(pid, stat_loc, options) \ - __waitpid_nocancel (pid, stat_loc, options) -#else -# define waitpid_not_cancel(pid, stat_loc, options) \ +#define waitpid_not_cancel(pid, stat_loc, options) \ INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL) -#endif /* Uncancelable pause. */ #define pause_not_cancel() \