From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5F7F3C10F1A for ; Thu, 25 Apr 2024 22:41:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KtU9TnCJqJ0OQjIzNOBaBko8JgkVGryRoPSwLUbNl3Q=; b=XIlPrbElJDDaly w/Ue5HudNtH9v+f6WdVe9cmJKLP0Ed6Kdep+A4S+5Uz66hXEMasBghbmdMopmde8kt5sq3tT7cV7+ EF+YnN051IXMNvDMe+wtjyfinucqHmmrFsE22jdwjVaonnvnPg4ImppDxpzeNMY6RFInDWoezDP+2 lqG1vO/HkGQ60u55EMoMsX1Wgz0NjKPG8/h9lnuRhCc/NDYRuq2uo21CMny0yeZXFKv98qG/5bIJO 7VgUgCDmsZcnXLSVZ7O1E9OlNkR2WOHN9LAWuj/Iq8ixkO64NIEnXjwLIMkOVXZWsGxIuxFM2eYrc KcJw49s7hrqsSZvXj0ig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s07mo-0000000AVKZ-1uXx; Thu, 25 Apr 2024 22:41:50 +0000 Received: from out-175.mta1.migadu.com ([2001:41d0:203:375::af]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s07ml-0000000AVHt-1HWj for linux-riscv@lists.infradead.org; Thu, 25 Apr 2024 22:41:48 +0000 Date: Thu, 25 Apr 2024 22:41:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1714084898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GCaJfAPaJTJk4qPysJNwA1mMKwjvwJd7/RjWgxHGHyY=; b=flIG79Ky9avijT6lxv6ruTzaWrjTez3ao65sse6mEFWL42L71Fy+HwoaFDVgbhqSQc8Plc 2zVls0Jn+yPxfrWHmLf2RsKd04+qj9yHIh5kAk1zeFvGngWMAknB7HIf4j1elRNjy/VQeD 3uDkbrZxw2MMlKn7IbsrZ3Do8tWuOuc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Sean Christopherson Cc: Paolo Bonzini , Marc Zyngier , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Muhammad Usama Anjum Subject: Re: [PATCH] KVM: selftest: Define _GNU_SOURCE for all selftests code Message-ID: References: <20240423190308.2883084-1-seanjc@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240423190308.2883084-1-seanjc@google.com> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240425_154147_501167_08D42DB0 X-CRM114-Status: GOOD ( 10.55 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Tue, Apr 23, 2024 at 12:03:08PM -0700, Sean Christopherson wrote: > Define _GNU_SOURCE is the base CFLAGS instead of relying on selftests to > manually #define _GNU_SOURCE, which is repetitive and error prone. E.g. > kselftest_harness.h requires _GNU_SOURCE for asprintf(), but if a selftest > includes kvm_test_harness.h after stdio.h, the include guards result in > the effective version of stdio.h consumed by kvm_test_harness.h not > defining asprintf(): > > In file included from x86_64/fix_hypercall_test.c:12: > In file included from include/kvm_test_harness.h:11: > ../kselftest_harness.h:1169:2: error: call to undeclared function > 'asprintf'; ISO C99 and later do not support implicit function declarations > [-Wimplicit-function-declaration] > 1169 | asprintf(&test_name, "%s%s%s.%s", f->name, > | ^ > > When including the rseq selftest's "library" code, #undef _GNU_SOURCE so > that rseq.c controls whether or not it wants to build with _GNU_SOURCE. > > Reported-by: Muhammad Usama Anjum > Signed-off-by: Sean Christopherson Acked-by: Oliver Upton -- Thanks, Oliver _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv