From patchwork Tue Sep 17 22:15:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1163613 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-105219-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="PFinjznE"; dkim-atps=neutral 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 46Xy9V51FGz9s7T for ; Wed, 18 Sep 2019 08:15:41 +1000 (AEST) 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:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=TK2N3rm6HUZj5mnod3ckUisKM04CR 23Wk0huztNKRsr7Os0U+UNWoacJbndGqwEdPCI65cTQEU+cicIkfjF5Nmicb5v7K PI8LOYNUP48LdybNUeeNTYPR0KmH4l2OzWaLFSBdLBaK3uJBSuqfTPSfs8+hTfhb 7dujhlK04PDdk8= 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:from:to:subject:message-id:mime-version :content-type; s=default; bh=s/3F9g/Bw2Mr7VeWlSerYFWIMJc=; b=PFi njznEHz1JVb5mamV+gS2xOO+ELlpgQFIf7SjDMAMV+XRioYt2TwU1cXcgJeRaN7Y isNCwSYCQTIDAyDbzMEZ0RjpLHfHH4bIpDpEOKsK24hdWOKoC3LkZVge11LFfZPp DwJUt57eHWER1+Ti1kaPQNPIGC5D0LxRSK6MP6Fc= Received: (qmail 96271 invoked by alias); 17 Sep 2019 22:15:35 -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 96062 invoked by uid 89); 17 Sep 2019 22:15:29 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=53, 5.3, inclusion X-HELO: esa3.mentor.iphmx.com IronPort-SDR: jflS1NYX41c2OrA3uRpa/YQQ3gKpeWC1SDJm1Q2Gdh/ldnf0QDVrOS3J48PvHa8X0b2MwzARaD dxNZX4EifgWgs3cG9XCrZqqcYuJjKrOS0mxQCHZ53j5+qg23bU69YjDvPPaOw+KYBTsoI6BLdQ WIXxPPRlQptz36DE1SgAzOrNtHg34L9QdumJJJDKrQG/5XWCXjR45Cd7DMxcjpkts86ULmJGBc LfxiLnAZQBR71RbFHBDpPuDcMnIDyEBcO0rKdo9SRxthWZ4t2STHj3RjVF2FxoeNGK5fvdSNKW 9UM= IronPort-SDR: 7laBVEcafPFGniK71zgQetLG78qHKVG1znhvYgUgE2lJU99EWeS4G655hMh8gnWtXTJFP8RnsD DY0um27hhZZ6P+BupENkW8Jea/kvbtWtCcRLHLStwNe3lRNUidnQ9PXb6HUqwk1Lh6Dvbz+czm EIa7Ne5uH/RL0/hMQRyHPAudA/p86LH8bwbeuFsErmI7yWJ/+g0rGWTCc0v1wi/aKXw732gabw Mrlh7/hqAhqpEuwFljBF8hcP8tde09bt00AVAfHxZ6Th114hkf7zeWqqTPegRy2r524kp4Toky D+k= Date: Tue, 17 Sep 2019 22:15:09 +0000 From: Joseph Myers To: Subject: Fix RISC-V vfork build with Linux 5.3 kernel headers Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 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. 2019-09-17 Joseph Myers * sysdeps/unix/sysv/linux/riscv/vfork.S: Do not include . (CLONE_VM): New macro. (CLONE_VFORK): Likewise. Reviewed-by: Palmer Dabbelt 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)