Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp46728lqh; Fri, 3 May 2024 12:55:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXoM7jQYp9OaIbbXGFP0OrxtwjA+EZye/zrMUWV1CYflHMu9w/wFKuRkttB97lorSc5a3mZMa1cC6mZaYoxQorWysbaS6OJ1Qd0VlQNPw== X-Google-Smtp-Source: AGHT+IF2Pme6WS9bI6WAFVSdwMtwlFBhN+orRxFuNVbDgwM3HiV7vPqKnRiF1EndNmJhb2it9mw8 X-Received: by 2002:a05:6a20:1585:b0:1ad:2016:dff2 with SMTP id h5-20020a056a20158500b001ad2016dff2mr4710791pzj.26.1714766112520; Fri, 03 May 2024 12:55:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714766112; cv=pass; d=google.com; s=arc-20160816; b=BkxSbehwAl8JGrVWDxL4ITZga3r/1JAp7IdvDDTW/eie3GLXHKQODug6lWW+hwcGkV lxgahfc71OV8QDRqU/bEvIpS8K3IZPRJhpTTDl+Grs3TAgZHloATtGPKH5B1tGxopFWg uEO86ajHYww0gcW+7mIWCwp1LVrSS5wCaVLg8aUifzodWBCZ9mR6HSyDB8nGWZRZLXPK 8E4ao1YGn9eAzsmKe2G4UAA99T4f1Lwja8LdXf2wn9Umvc7yp8TtN4ojfE29wCKGihUx dm5FlMJ/gDhecLaA/UlO2OdadTtZ+oXKaKc6xpzxbY2TCy0kN7ZP+JJ/jbZtupL1+3ci KACA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=vVDV1OeG9hQ/qmATCNcC1pLFdhB98ACZJusaLHASqpk=; fh=g6M+NzefYS3a0qfgwoq8J+kJUHx1HxEqYLH43mL5leI=; b=KB+0CqyGg8kjrBX1WrJlU9aHbTcokwe0N77uqvdnyy36PxA5nt6tpQhHFGVJb4iEpF Qr/cjkqsiOGZLqaIfZTNpU1a+edtbQov1wT7JJ3v/D65cJrXB9vf8f7ra4bpWg0lc9Tj Q6aQT4WqGudGPa0R11bwRhjuGF8NeU/PBhFc7VPcF+WXGkaQbRgGEN5NGiFaGfQuy40z P0N0+pjB8nBjlWCIpdhSKKrf63zL2gEo6HNuf8Syw78s15Mods/JlV4TbwUORvdBVCUO aLxmxLLAA0xo0eoljM7ndLBHjNxirOtHaCs9/LDIkA++pIduvqYwObvxZ7nvUw8JAiSh HioQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=PDfg3uv+; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linuxfoundation.org dmarc=pass fromdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-168155-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168155-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s9-20020a17090330c900b001eb4a61603asi3295848plc.439.2024.05.03.12.55.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 12:55:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168155-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=PDfg3uv+; arc=pass (i=1 spf=pass spfdomain=linuxfoundation.org dkim=pass dkdomain=linuxfoundation.org dmarc=pass fromdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-168155-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168155-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1AC46285CC5 for ; Fri, 3 May 2024 19:55:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51D2C158D6D; Fri, 3 May 2024 19:55:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="PDfg3uv+" Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB542339A1 for ; Fri, 3 May 2024 19:55:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714766105; cv=none; b=KK0Pj2jUzP0T4dw+6GRglxoUU6O4OxrVCmSOcChVU5w+yqOxkhDuDIrC2+HQV819t3C5GXjqBeEjdFSRpmJgGLX71lPr9J/7mf2K8L8dwWS770qngEdqbuEk5E1z3nOHwiw+EZbL92Gk99xhDeFwh2NasWdfe8rkrQsseM1VQto= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714766105; c=relaxed/simple; bh=H+O3hAtZlwC5F0x+rCtibViAkb8br0MyxnKFwP8yITs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gPSUbROLReLivZ9SD+c6S+QD5tzkatReNTlcAzIWdEXMrGaWT8S6M1x+Io6+B+fqFy7pMaur685Focrf7Pg5gIBYugxVdYpOMrNTA8X+WlFlpVy/OmYVK8aAjIi/Hk9gsgvd8keaCfAkBduKlc0P1K310WjXu9B6iOZLinckWZo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PDfg3uv+; arc=none smtp.client-ip=209.85.166.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-7d9c78d7f97so276939f.3 for ; Fri, 03 May 2024 12:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; t=1714766102; x=1715370902; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=vVDV1OeG9hQ/qmATCNcC1pLFdhB98ACZJusaLHASqpk=; b=PDfg3uv+K1U261iLrHrxJoV1+BleoujsesJ+cSZarmag8aMArfecMRpz9t0Ssh9DMa 4ujVDlixbpB21PYUk+a4pGebCe6t6mGFxuUxB6SUwELkENLxVdCHmHxlbK3cchiftomh t6dJLfADDYfSHkMOrK50igdhEDQeXMCbmW3f4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714766102; x=1715370902; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vVDV1OeG9hQ/qmATCNcC1pLFdhB98ACZJusaLHASqpk=; b=TcPcT6q9pJh02VfHu60lw6sZZxY7CY317Y+O6XQa9z0El2cawSrUmFy8VFUht32HPO 3NdMeP/xXOScud0MCWzRqMTclbf+ainkPp/AZkaBRufKYoJVQM2X5jMK0WnqYiObtHeH cMx00mVES0LnrnfqbWUZq07gETuqlsbXJFvCiVzCKzNVXmkeOvBE5sCcS7hK3YgjMPEO wIVAATdmN2UEP406+A0e2AmRDnqp8Zgt/TisAsylD3G1y6OLbUZ1RDS4SAgqR1HYKX/J V00AO3E/spUiaicI5NJQOFLIUFvqkX0AFpLFROGeSiMCz92ik6RPn5nst5GntJuvrUVb +U5Q== X-Forwarded-Encrypted: i=1; AJvYcCUv30UJRyCJTcO2WHlQti6/qk3pMDhHjMcR6eiF1Wx8a1giAFhOkeHsciQMWwbHRzbbxnQXI9FPD8mfKSoa/zSvamjMDkW8htJOaBF6 X-Gm-Message-State: AOJu0YwqvwIraCFTguVGTnrkuVHGkAgoqlwRac7z1tZ8AhIn5vQ8S8fF qRvCgN3P0BZUxbWk3hnAGYjaDK1Od7mycIK+Fm+w0mUDQe6bRV6o92xzbyzQ7uA= X-Received: by 2002:a05:6e02:219c:b0:36b:15e0:de18 with SMTP id j28-20020a056e02219c00b0036b15e0de18mr4223000ila.0.1714766102018; Fri, 03 May 2024 12:55:02 -0700 (PDT) Received: from [192.168.1.128] ([38.175.170.29]) by smtp.gmail.com with ESMTPSA id w8-20020a056e021a6800b0036c0d4b720asm820586ilv.74.2024.05.03.12.55.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 May 2024 12:55:01 -0700 (PDT) Message-ID: <3beb08a6-0be7-4305-9ac5-2ccc9e6d02c5@linuxfoundation.org> Date: Fri, 3 May 2024 13:55:00 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] selftests: default to host arch for LLVM builds To: Valentin Obst , jhubbard@nvidia.com Cc: anders.roxell@linaro.org, bpoirier@nvidia.com, broonie@kernel.org, guillaume.tucker@collabora.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, mpdesouza@suse.com, nathan@kernel.org, sashal@kernel.org, shuah@kernel.org, Shuah Khan References: <6d398f1d-6882-40fb-8ced-7fe6bee2aee7@nvidia.com> <20240428120806.19275-1-kernel@valentinobst.de> Content-Language: en-US From: Shuah Khan In-Reply-To: <20240428120806.19275-1-kernel@valentinobst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/28/24 06:08, Valentin Obst wrote: >>> Align the behavior for gcc and clang builds by interpreting unset >>> `ARCH` and `CROSS_COMPILE` variables in `LLVM` builds as a sign that the >>> user wants to build for the host architecture. >>> >>> This patch preserves the properties that setting the `ARCH` variable to an >>> unknown value will trigger an error that complains about insufficient >>> information, and that a set `CROSS_COMPILE` variable will override the >>> target triple that is determined based on presence/absence of `ARCH`. >>> >>> When compiling with clang, i.e., `LLVM` is set, an unset `ARCH` variable in >>> combination with an unset `CROSS_COMPILE` variable, i.e., compiling for >>> the host architecture, leads to compilation failures since `lib.mk` can >>> not determine the clang target triple. In this case, the following error >>> message is displayed for each subsystem that does not set `ARCH` in its >>> own Makefile before including `lib.mk` (lines wrapped at 75 chrs): >>> >>> make[1]: Entering directory '/mnt/build/linux/tools/testing/selftests/ >>> sysctl' >>> ../lib.mk:33: *** Specify CROSS_COMPILE or add '--target=' option to >>> lib.mk. Stop. >>> make[1]: Leaving directory '/mnt/build/linux/tools/testing/selftests/ >>> sysctl' >> >> Thanks for fixing this. >> >> And yes, the selftests "normal" (non-cross-compile) build is *broken* >> right now, for clang. I didn't realize from the patch title that this is >> actually a significant fix. Maybe we should change the subject line (patch >> title) to something like: >> >> [PATCH] selftests: fix the clang build: default to host arch for LLVM builds > > Yes, I agree that the title should contain the word 'fix' somewhere. For > me its okay if maintainers reword the title when applying the patch, > alternatively I can send a v2. (Is it still a v2 if I change the title, or > rather a new patch?). > > Any thoughts on whether this also needs a 'Cc stable'? Its not quite > clear to me if this fix meets the requirements. As above, no objections if > maintainers should decide to add it. > >> >> ? >> >> Just a thought. The "Fixes:" tag covers it already, I realize. >> >> Anyway, this looks correct, and fixes that aspect of the build for me, so >> either way, please feel free to add: >> >> Reviewed-by: John Hubbard > Thanks for the patch. Applied to linux-kselftest next for Linux 6.10-rc1 thanks, -- Shuah