[PATCH v2 0/2] tools/build: Fix s390(x) cross-compilation with clang

Thomas Weißschuh posted 2 patches 3 months, 2 weeks ago
tools/include/nolibc/Makefile  | 3 ---
tools/scripts/Makefile.include | 4 +++-
2 files changed, 3 insertions(+), 4 deletions(-)
[PATCH v2 0/2] tools/build: Fix s390(x) cross-compilation with clang
Posted by Thomas Weißschuh 3 months, 2 weeks ago
The heuristic to derive a clang target triple from a GCC one does not work
for s390. GCC uses "s390-linux" while clang expects "s390x-linux" or
"powerz-linux".

There doesn't seem to be a formal maintainer for this file.
Maybe the clang/llvm maintainers can pick it up.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
Changes in v2:
- Rebase onto mainline master
- Drop custom nolibc workaround
- Link to v1: https://lore.kernel.org/r/20250424-tools-cross-s390-v1-1-d3ec4b43df12@linutronix.de

---
Thomas Weißschuh (2):
      tools/build: Fix s390(x) cross-compilation with clang
      tools/nolibc: drop s390 clang target override

 tools/include/nolibc/Makefile  | 3 ---
 tools/scripts/Makefile.include | 4 +++-
 2 files changed, 3 insertions(+), 4 deletions(-)
---
base-commit: 75f5f23f8787c5e184fcb2fbcd02d8e9317dc5e7
change-id: 20250424-tools-cross-s390-73eaa2d42833

Best regards,
-- 
Thomas Weißschuh <thomas.weissschuh@linutronix.de>

Re: [PATCH v2 0/2] tools/build: Fix s390(x) cross-compilation with clang
Posted by Nathan Chancellor 3 months, 1 week ago
On Fri, Jun 20, 2025 at 01:00:26PM +0200, Thomas Weißschuh wrote:
> The heuristic to derive a clang target triple from a GCC one does not work
> for s390. GCC uses "s390-linux" while clang expects "s390x-linux" or
> "powerz-linux".

This generally seems fine to me but I do not interact with tools/ much.

> There doesn't seem to be a formal maintainer for this file.
> Maybe the clang/llvm maintainers can pick it up.

I do not have a tree nor do I send pull requests to Linus. Perhaps you
could just pick this up in the nolibc tree or have Shuah take it as a
greater kselftests update?

Cheers,
Nathan
Re: [PATCH v2 0/2] tools/build: Fix s390(x) cross-compilation with clang
Posted by Thomas Weißschuh 3 months ago
Hi Nathan,

On Wed, Jul 02, 2025 at 02:41:33PM -0700, Nathan Chancellor wrote:
> On Fri, Jun 20, 2025 at 01:00:26PM +0200, Thomas Weißschuh wrote:
> > The heuristic to derive a clang target triple from a GCC one does not work
> > for s390. GCC uses "s390-linux" while clang expects "s390x-linux" or
> > "powerz-linux".
> 
> This generally seems fine to me but I do not interact with tools/ much.

Is it enough for a formal Reviewed-by?

> > There doesn't seem to be a formal maintainer for this file.
> > Maybe the clang/llvm maintainers can pick it up.
> 
> I do not have a tree nor do I send pull requests to Linus. Perhaps you
> could just pick this up in the nolibc tree or have Shuah take it as a
> greater kselftests update?

It's not really only related to kselftest either.
But I'll ping Shuah. Otherwise I'll indeed take it directly.

Thanks,
Thomas