From: Shuah Khan <skhan@linuxfoundation.org>
To: Valentin Obst <kernel@valentinobst.de>, 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 <skhan@linuxfoundation.org>
Subject: Re: [PATCH] selftests: default to host arch for LLVM builds
Date: Fri, 3 May 2024 13:55:00 -0600 [thread overview]
Message-ID: <3beb08a6-0be7-4305-9ac5-2ccc9e6d02c5@linuxfoundation.org> (raw)
In-Reply-To: <20240428120806.19275-1-kernel@valentinobst.de>
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 <jhubbard@nvidia.com>
>
Thanks for the patch. Applied to linux-kselftest next for Linux 6.10-rc1
thanks,
-- Shuah
prev parent reply other threads:[~2024-05-03 19:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 10:49 [PATCH] selftests: default to host arch for LLVM builds Valentin Obst
2024-04-13 22:10 ` John Hubbard
2024-04-28 12:08 ` Valentin Obst
2024-04-28 22:04 ` John Hubbard
2024-04-30 11:44 ` Valentin Obst
2024-04-30 14:50 ` Mark Brown
2024-04-30 16:58 ` John Hubbard
2024-05-03 19:55 ` Shuah Khan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3beb08a6-0be7-4305-9ac5-2ccc9e6d02c5@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=anders.roxell@linaro.org \
--cc=bpoirier@nvidia.com \
--cc=broonie@kernel.org \
--cc=guillaume.tucker@collabora.com \
--cc=jhubbard@nvidia.com \
--cc=kernel@valentinobst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mpdesouza@suse.com \
--cc=nathan@kernel.org \
--cc=sashal@kernel.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox