Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp705256pxb; Tue, 5 Apr 2022 19:34:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyi0OSmvtJUMJSw6C6zfACLwtY8mmyatvZ3SmxfuK/fJ27jzOl27IjEVB0fPXObh3oCkM8U X-Received: by 2002:a05:6a00:1a4f:b0:4fa:bc8f:a42d with SMTP id h15-20020a056a001a4f00b004fabc8fa42dmr6622559pfv.50.1649212375272; Tue, 05 Apr 2022 19:32:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649212375; cv=none; d=google.com; s=arc-20160816; b=Wo7+qSEx7vQ81MLWg5BqJqdpx9Zh2akwj3So5qDcSG7cID/nNzt1rWbg1JdIVfriRI VNWjyI/9jM/gKSxWkCt5Zq9969jw86KeM5YsBHOKBy7RiJF6wAHoneZhO8bcl7d5UO5A LDB3aZQgQZdbDWsbvycel2g9yeDEGwt3t3dZbnUyUoHj1Q67NCflccNC5wmzrnLd0Li3 6O1FPRgp1uvNpvfbpKX93aIFvMidHHvuintL7qqZ0FTAXmhO1G4/iDmuFhw2HCkDknRh 3ySOIJWuhOGScFyFcM7KXIequzO6u0/dYOcrQUD5EkFHvX3NMPRWqBPgM+3mzO60MOFm nDfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=bJ/Qbl12EmegSIxvn8hO+vQyVnu3rowq1Ty7TuQDQZc=; b=BX78mn4Ighb5xWehk44+PANkvCtZxSDW+53nR5nKkKPecnV+RgJdy2ILkwEPMfV95w h9ZAQ3PkFcpv1BDXEjTCszbxzJLZAYpm0EyEnvgZkpQRjfR4Go+c7TB4dAqu/5ySGwh0 83k5XKNDbgjtCigQqGXLrnKQOFTP7nEA5CN7dqZTsn0dkxlMDgENqn5bumBQGXkFSHmz Khqe39S1hgRd/u+SSP6MS/NT/UnJrFJRQdp3pgPmyVPXEg3D21fWDZ4HerWTYFW0lW+A xz01gays827vRKb4HZqBiC7pi5Po+xNfno5tk9Ig5oEeWmuyBdUI0VAl7iMEGuciRoPS Hs2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IMH8nnoe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a170902f70600b0015679fc876dsi11324798plo.160.2022.04.05.19.32.40; Tue, 05 Apr 2022 19:32:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IMH8nnoe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378519AbiDEOHq (ORCPT + 99 others); Tue, 5 Apr 2022 10:07:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236373AbiDEJbT (ORCPT ); Tue, 5 Apr 2022 05:31:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0DA0BF7; Tue, 5 Apr 2022 02:19:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 97E08B81C69; Tue, 5 Apr 2022 09:19:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EAB9BC385A3; Tue, 5 Apr 2022 09:19:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649150345; bh=qYe/uBk0ndVaKY+4X1OhfMJEXd3Z6e/VbB81NnZOuOc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IMH8nnoewWUeKqhhIUM5cCCDEe+2cNpdSZ577z/cC1CW8VTLPCw5ayed1CRFFlQ9F GVkU7rGXB/3LgqeSfTlVDv2T5ZjKTaQhhwpIfw1NIoRlSq2LDnOw1GZH7LxlYulCnC GvXpFs+hQDtBiVW1YY66hgYnffyDSL1AtOKI5w8Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yosry Ahmed , Shuah Khan , Nathan Chancellor , Nick Desaulniers , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.15 024/913] selftests: vm: fix clang build error multiple output files Date: Tue, 5 Apr 2022 09:18:06 +0200 Message-Id: <20220405070340.539745810@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yosry Ahmed [ Upstream commit 1c4debc443ef7037dcb7c4f08c33b9caebd21d2e ] When building the vm selftests using clang, some errors are seen due to having headers in the compilation command: clang -Wall -I ../../../../usr/include -no-pie gup_test.c ../../../../mm/gup_test.h -lrt -lpthread -o .../tools/testing/selftests/vm/gup_test clang: error: cannot specify -o when generating multiple output files make[1]: *** [../lib.mk:146: .../tools/testing/selftests/vm/gup_test] Error 1 Rework to add the header files to LOCAL_HDRS before including ../lib.mk, since the dependency is evaluated in '$(OUTPUT)/%:%.c $(LOCAL_HDRS)' in file lib.mk. Link: https://lkml.kernel.org/r/20220304000645.1888133-1-yosryahmed@google.com Signed-off-by: Yosry Ahmed Cc: Shuah Khan Cc: Nathan Chancellor Cc: Nick Desaulniers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- tools/testing/selftests/vm/Makefile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile index d9605bd10f2d..acf5eaeef9ff 100644 --- a/tools/testing/selftests/vm/Makefile +++ b/tools/testing/selftests/vm/Makefile @@ -1,6 +1,8 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for vm selftests +LOCAL_HDRS += $(selfdir)/vm/local_config.h $(top_srcdir)/mm/gup_test.h + include local_config.mk uname_M := $(shell uname -m 2>/dev/null || echo not) @@ -139,10 +141,6 @@ endif $(OUTPUT)/mlock-random-test $(OUTPUT)/memfd_secret: LDLIBS += -lcap -$(OUTPUT)/gup_test: ../../../../mm/gup_test.h - -$(OUTPUT)/hmm-tests: local_config.h - # HMM_EXTRA_LIBS may get set in local_config.mk, or it may be left empty. $(OUTPUT)/hmm-tests: LDLIBS += $(HMM_EXTRA_LIBS) -- 2.34.1