All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <w@1wt.eu>
To: Zhangjin Wu <falcon@tinylab.org>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	tanyuan@tinylab.org, thomas@t-8ch.de
Subject: Re: [PATCH v2 0/7] selftests/nolibc: customize CROSS_COMPILE for all supported architectures
Date: Mon, 14 Aug 2023 10:25:22 +0200	[thread overview]
Message-ID: <20230814082522.GA17212@1wt.eu> (raw)
In-Reply-To: <20230814082500.GB16761@1wt.eu>

On Mon, Aug 14, 2023 at 10:25:00AM +0200, Willy Tarreau wrote:
> On Mon, Aug 14, 2023 at 03:38:54PM +0800, Zhangjin Wu wrote:
> > > On Sun, Aug 13, 2023 at 06:05:03PM +0800, Zhangjin Wu wrote:
> > > > > I think that later I'll further extend XARCH with new variants to
> > > > > support ARMv5 and Thumb2, because we have different code for this
> > > > > and I continue to manually change the CFLAGS to test both.
> > > > >
> > > > 
> > > > Ok, what about further add x86_64 as the default variant for x86 (like ppc for
> > > > powerpc)? and then it is able to only resereve the variables for x86_64. I have
> > > > prepared a patch for this goal in our new tinyconfig patchset, it will further
> > > > avoid adding the same nolibc-test-x86.config and nolibc-test-x86_64.config.
> > > 
> > > I'm confused, x86 already defaults to x86_64, it's just that it depends
> > > on the .config itself to figure whether to produce a 32- or 64-bit kernel.
> > > But for example it starts qemu in 64-bit mode. Am I missing anything ?
> > >
> > 
> > In kernel side, it is, but in our nolibc-test, we have added a copy of x86_64
> > for x86:
> > 
> >     $ grep -E "_x86" tools/testing/selftests/nolibc/Makefile 
> >     IMAGE_x86_64     = arch/x86/boot/bzImage
> >     IMAGE_x86        = arch/x86/boot/bzImage
> >     CROSS_COMPILE_x86_64    ?= x86_64-linux- x86_64-linux-gnu-
> >     CROSS_COMPILE_x86       ?= x86_64-linux- x86_64-linux-gnu-
> >     DEFCONFIG_x86_64     = defconfig
> >     DEFCONFIG_x86        = defconfig
> >     QEMU_ARCH_x86_64     = x86_64
> >     QEMU_ARCH_x86        = x86_64
> >     QEMU_ARGS_x86_64     = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)"
> >     QEMU_ARGS_x86        = -M pc -append "console=ttyS0,9600 i8042.noaux panic=-1 $(TEST:%=NOLIBC_TEST=%)"
> > 
> > With 'XARCH', the "_x86" copy of them can be simply replaced with such a line:
> > 
> >      # configure default variants for target kernel supported architectures
> >      XARCH_powerpc    = ppc
> >     +XARCH_x86        = x86_64
> >      XARCH            = $(or $(XARCH_$(ARCH)),$(ARCH))
> > 
> > And therefore, the future nolibc-test-x86_64.config is also enough for x86.
> > 
> > But I have seen the 'x86' exception in tools/include/nolibc/Makefile, just a
> > confirm on if this replacement is ok.
> 
> Ah I thought you meant the opposite, i.e. that ppc did map to powerpc
> that I was not seeing anywhere else. Yes we can probably do that and
> remove the x86-specific lines later.

by "later" I mean "further" in the file.

Willy

      reply	other threads:[~2023-08-14  8:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11 20:27 [PATCH v2 0/7] selftests/nolibc: customize CROSS_COMPILE for all supported architectures Zhangjin Wu
2023-08-11 20:28 ` [PATCH v2 1/7] selftests/nolibc: allow use x86_64 toolchain for i386 Zhangjin Wu
2023-08-11 20:29 ` [PATCH v2 2/7] selftests/nolibc: allow use mips64 toolchain for mips Zhangjin Wu
2023-08-11 20:30 ` [PATCH v2 3/7] selftests/nolibc: libc-test: use HOSTCC instead of CC Zhangjin Wu
2023-08-13  9:19   ` Willy Tarreau
2023-08-11 20:31 ` [PATCH v2 4/7] selftests/nolibc: allow customize CROSS_COMPILE by architecture Zhangjin Wu
2023-08-11 20:32 ` [PATCH v2 5/7] selftests/nolibc: customize CROSS_COMPILE for all architectures Zhangjin Wu
2023-08-13  9:16   ` Willy Tarreau
2023-08-13 10:18     ` Zhangjin Wu
2023-08-14  7:16       ` Willy Tarreau
2023-08-11 20:33 ` [PATCH v2 6/7] selftests/nolibc: import cc-cross-prefix macro Zhangjin Wu
2023-08-11 20:34 ` [PATCH v2 7/7] selftests/nolibc: allow use cross toolchains from software repository Zhangjin Wu
2023-08-13  9:37 ` [PATCH v2 0/7] selftests/nolibc: customize CROSS_COMPILE for all supported architectures Willy Tarreau
2023-08-13 10:05   ` Zhangjin Wu
2023-08-14  7:18     ` Willy Tarreau
2023-08-14  7:38       ` Zhangjin Wu
2023-08-14  8:25         ` Willy Tarreau
2023-08-14  8:25           ` Willy Tarreau [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=20230814082522.GA17212@1wt.eu \
    --to=w@1wt.eu \
    --cc=falcon@tinylab.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=tanyuan@tinylab.org \
    --cc=thomas@t-8ch.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.