From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-2.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id F0D871F463 for ; Tue, 17 Sep 2019 22:34:02 +0000 (UTC) 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:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=vgSA HQHAaDby7PB+CbIYb5HkfgbEh6xgbRRCa/lJE+pZnzl3WysJPtAy0q16Y/GdpiYU /EnDBgUUASPRyNvFISc+WznZfBIm+D5s2pap9PJ14z1PpnhZkau6EgqDNU7iMIj3 ALftpxxI64bg5z+sSqlgN55u40sFytiWVU0lndU= 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:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=NdJq7tYz+5 k2kfuVHwaR551iwHw=; b=JzYtJTYTEyK99sK0wl503Y+qDYexmSpnwgwsqKnksp XNwuwXGBhBByJ5u/3KWmeUMo4r/xDACmBMPMZsYa03e1MbH4a077BdLIMMrd0RZV ape9yNVxQq6rorviE3jzHv6eeBTgGmlf9i0rHXAbngBQFZ8RXiBv25zm6mD/8XiQ I= Received: (qmail 15396 invoked by alias); 17 Sep 2019 22:34:00 -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 Received: (qmail 15386 invoked by uid 89); 17 Sep 2019 22:34:00 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-lj1-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tUBVY1hHEnCKN+rfwz8mR7w8j/N9qFyzC5JINv7Yla8=; b=CMYmVMgSQnV0Y5gHywB+te0A2KiDoZqgp4WVQcYVL4GkdPHjzTRJVeOz15W8DO8vPg XJnsNOTXyEXX7lwpbXZ9VUAcLVmA24FjdxrgHRRwPbJ4f83CKhIAt8Kp30k4Yv7BhdCB i/dzlrMPzIhQYb6pZP8gT0EPCB0Vx62G5bEMQWlRXNZeHpj+JGzjqf0//yEiyHsc9UcG Z24YIyZt+Pz+tBHX88AsOpaXe3nbF7y56Wuha6vnkeUPCrKPpkEkSr7lNLXckH5xnDJ6 mo2rezFIx42gOqOxrt0dRP/aKPshJBboL8oF9FFq0vcz/7NO6+1lE2rySxbYUiD9Bt8q V6Sg== MIME-Version: 1.0 References: In-Reply-To: From: Alistair Francis Date: Tue, 17 Sep 2019 15:29:24 -0700 Message-ID: Subject: Re: Fix RISC-V vfork build with Linux 5.3 kernel headers To: Joseph Myers Cc: GNU C Library Content-Type: text/plain; charset="UTF-8" On Tue, Sep 17, 2019 at 3:15 PM Joseph Myers wrote: > > Building glibc for RISC-V with Linux 5.3 kernel headers fails because > , included in vfork.S for CLONE_* constants, contains a > structure definition not safe for inclusion in assembly code. > > All other architectures already avoid use of that header in vfork.S, > either defining the CLONE_* constants locally or embedding the > required values directly in the relevant instruction, where they > implement vfork using the clone syscall (see the implementations for > aarch64, ia64, mips and nios2). This patch makes the RISC-V version > define the constants locally like the other architectures. > > Tested build for all three RISC-V configurations in > build-many-glibcs.py with Linux 5.3 headers. LGTM. I was confused why I haven't seen this, but I'm using the 5.2 headers which is why I haven't hit this. Alistair > > 2019-09-17 Joseph Myers > > * sysdeps/unix/sysv/linux/riscv/vfork.S: Do not include > . > (CLONE_VM): New macro. > (CLONE_VFORK): Likewise. > > diff --git a/sysdeps/unix/sysv/linux/riscv/vfork.S b/sysdeps/unix/sysv/linux/riscv/vfork.S > index e68dbc7d5d..062a562e72 100644 > --- a/sysdeps/unix/sysv/linux/riscv/vfork.S > +++ b/sysdeps/unix/sysv/linux/riscv/vfork.S > @@ -21,9 +21,12 @@ > #include > #include > #define __ASSEMBLY__ > -#include > #include > > +#define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ > +#define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to > + wake it up on mm_release. */ > + > .text > LEAF (__libc_vfork) > > > -- > Joseph S. Myers > joseph@codesourcery.com