Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2587757pxk; Mon, 14 Sep 2020 18:31:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbH7PYOWgNs5vDRxX5HCcqp58I+dAyOYGQ8B6nqoTGC6tGlbk+oUi4M7uAlaKbXqSbnA4i X-Received: by 2002:a05:6402:b9a:: with SMTP id cf26mr13702377edb.375.1600133492797; Mon, 14 Sep 2020 18:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600133492; cv=none; d=google.com; s=arc-20160816; b=C07KGrz3YxhtqP6hxuCsbivu8ttIXNtiM6XG0ORYCrOyVyO7sbrK/jqblnKZzBNpv5 1dIfFil9uyqf8rRHeERSOO4Ry+t+DYz057M4Mnj+8NKxeBwdVh+wwbRuCmWh1FIn4g3N Jbscx9DdReT2x/FucAnEcz4hFbJksFbFjOsoChJlK7HT4C9se50/cmdEJPJB4+UOU14O tIQF0JLRIuiYpFgUtVOl0R4t/JU65Vin8+p1iGfutPN4C7nLO92Tc4WL/DY22ovmIcnD TCXE7z02wE+5VkJgk2CwS58EWpmUSV0ivtpXawPYUPAIYWu0IzKtWsbnC4tiNWyMjxB1 Gmfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=YXRQjVHw+ed30bzvLPvyZylzyyOGabivbYbBP0UE7/0=; b=b52M0c3irOwQNFt2gUqvps8h0DpAuYnPqhoWllBY026qIcLd0hIvd0ou+xG89aV6+h ov3ZK2vAXpafdvq1sxUjsUK2USeoZcNsFtr5/8OBcuqdkLjVhpgjXv9F2gIjoeKSaLhp bM2ETrvBaUuxF+wJH4gLWsKYHUbnO8TMyMEtbGvIEbNJd7KCYjF1UQ5ZSwZzk1kMz33+ K8YQYFpbjOXWG1KYbIv5h/uiadp4Dj/g/NQ9Ny94+Yuq1zPnH4H3w8qhqmtSoQJQuG6y KP1Nlpcu/CEa+sizvxCQvyixmMwFuteKv8efex37Mzr+Ir9aFylFNR3MQ2Hmn7+l4kGm h4Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=bXDgqilp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si8530283edt.106.2020.09.14.18.31.10; Mon, 14 Sep 2020 18:31:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=bXDgqilp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726208AbgIOB3T (ORCPT + 99 others); Mon, 14 Sep 2020 21:29:19 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:15393 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbgIOB3E (ORCPT ); Mon, 14 Sep 2020 21:29:04 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 14 Sep 2020 18:28:49 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 14 Sep 2020 18:29:03 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 14 Sep 2020 18:29:03 -0700 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 15 Sep 2020 01:29:02 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Tue, 15 Sep 2020 01:29:02 +0000 Received: from sandstorm.nvidia.com (Not Verified[10.2.52.22]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Mon, 14 Sep 2020 18:29:02 -0700 From: John Hubbard To: Andrew Morton CC: Shuah Khan , LKML , , , John Hubbard Subject: [PATCH 2/2] selftests/vm: fix incorrect gcc invocation in some cases Date: Mon, 14 Sep 2020 18:29:01 -0700 Message-ID: <20200915012901.1655280-3-jhubbard@nvidia.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915012901.1655280-1-jhubbard@nvidia.com> References: <20200915012901.1655280-1-jhubbard@nvidia.com> MIME-Version: 1.0 X-NVConfidentiality: public Content-Transfer-Encoding: quoted-printable Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1600133329; bh=YXRQjVHw+ed30bzvLPvyZylzyyOGabivbYbBP0UE7/0=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:X-NVConfidentiality: Content-Transfer-Encoding:Content-Type; b=bXDgqilpWOGNSEqdqyYdIiMsZpXv3obNwn+Rw762HjUJDJxSG1F296n8/tzUsAj4L NX3DEOL60q70iciUHRrP0zRZki5GOzSSAjQnzS/I5Xu66wxfM5MDPEJXfsw2tvLMJE r2hXKnnoxarCGjE0Mt+XxgbdHvWcPDHf+pkw/5FcAuKYxFKfT0y7Vzsj5+HAD+kkxz uo7bFj9UavV8nxFa3jRVmJ2bOl9uwySW5nuivxlHq9azIgHFVBdbR7NJvp4BSHGHxS v9K4rEz8fOLZRJE5lYLRPWJNeMgKrFbC5LhfnS3tM1e1qYZSB55eoZqwoqkS6YsJmD AujhowxfS8gRQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid accidental wrong builds, due to built-in rules working just a little bit too well--but not quite as well as required for our situation here. In other words, "make userfaultfd" (for example) is supposed to fail to build at all, because this Makefile only supports either "make" (all), or "make /full/path". However, the built-in rules, if not suppressed, will pick up CFLAGS and the initial LDLIBS (but not the target-specific LDLIBS, because those are only set for the full path target!). This causes it to get pretty far into building things despite using incorrect values such as an *occasionally* incomplete LDLIBS value. Signed-off-by: John Hubbard --- tools/testing/selftests/vm/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/= vm/Makefile index 9f2625bebf07..30873b19d04b 100644 --- a/tools/testing/selftests/vm/Makefile +++ b/tools/testing/selftests/vm/Makefile @@ -8,6 +8,18 @@ MACHINE ?=3D $(shell echo $(uname_M) | sed -e 's/aarch64.*= /arm64/') # make invocations: .DELETE_ON_ERROR: =20 +# Avoid accidental wrong builds, due to built-in rules working just a litt= le +# bit too well--but not quite as well as required for our situation here. +# +# In other words, "make userfaultfd" is supposed to fail to build at all, +# because this Makefile only supports either "make" (all), or "make /full/= path". +# However, the built-in rules, if not suppressed, will pick up CFLAGS and= the +# initial LDLIBS (but not the target-specific LDLIBS, because those are on= ly +# set for the full path target!). This causes it to get pretty far into bu= ilding +# things despite using incorrect values such as an *occasionally* incomple= te +# LDLIBS. +MAKEFLAGS +=3D --no-builtin-rules + CFLAGS =3D -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) LDLIBS =3D -lrt TEST_GEN_FILES =3D compaction_test --=20 2.28.0