All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/4 v2] package/kvm-unit-tests: introduce _ARCH_SUPPORTS
Date: Sat, 8 Jul 2017 18:30:45 +0200	[thread overview]
Message-ID: <20170708163045.GD3867@scaer> (raw)
In-Reply-To: <b0102f89-d625-7b1a-074e-006c4bdebeaf@mind.be>

Arnout, All,

On 2017-07-08 17:41 +0200, Arnout Vandecappelle spake thusly:
> On 08-07-17 16:08, Yann E. MORIN wrote:
> > Move all architecture options to their own symbol, so that it is easier
> > to add more variants in the future.
> > 
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Cyril Bur <cyrilbur@gmail.com>
> > ---
> >  package/kvm-unit-tests/Config.in | 18 ++++++++++--------
> >  1 file changed, 10 insertions(+), 8 deletions(-)
> > 
> > diff --git a/package/kvm-unit-tests/Config.in b/package/kvm-unit-tests/Config.in
> > index 7eab0c25d6..0283e97dfc 100644
> > --- a/package/kvm-unit-tests/Config.in
> > +++ b/package/kvm-unit-tests/Config.in
> > @@ -1,15 +1,17 @@
> > -config BR2_PACKAGE_KVM_UNIT_TESTS
> > -	bool "kvm-unit-tests"
> > +config BR2_PACKAGE_KVM_UNIT_TESTS_ARCH_SUPPORTS
> > +	bool
> > +	default y if BR2_cortex_a7 || BR2_cortex_a12 || \
> > +		BR2_cortex_a15 || BR2_cortex_a17
> > +	default y if BR2_powerpc64 || BR2_powerpc64le
> >  	# on i386 and x86-64, __builtin_reachable is used, so we need
> >  	# gcc 4.5 at least. on i386, we use the target gcc, while on
> >  	# x86-64 we use the host gcc (see .mk file for details)
> >  	# On ARM, it uses virtualization extensions
> > -	depends on BR2_cortex_a7 || BR2_cortex_a12 || \
> > -		BR2_cortex_a15 || BR2_cortex_a17 || \
> > -		(BR2_i386 && BR2_TOOLCHAIN_GCC_AT_LEAST_4_5) || \
> > -		BR2_powerpc64 || \
> > -		BR2_powerpc64le || \
> > -		(BR2_x86_64 && BR2_HOST_GCC_AT_LEAST_4_5)
> > +	default y if (BR2_i386 || BR2_x86_64) && BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
> 
>  GCC is *not* an arch dependency, so this should just be

Yet we already use similar construct in other packages, like host-go:

    config BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
        depends on (BR2_arm && BR2_TOOLCHAIN_SUPPORTS_PIE) || [...]

or like kodi:

     config BR2_PACKAGE_KODI_ARCH_SUPPORTS
        default y if (BR2_arm || (BR2_mipsel && BR2_TOOLCHAIN_USES_GLIBC) || [...]

or with libsigsegv:

    config BR2_PACKAGE_LIBSIGSEGV_ARCH_SUPPORTS
        default y if BR2_TOOLCHAIN_USES_GLIBC
        default y if BR2_TOOLCHAIN_USES_MUSL
        default y if BR2_TOOLCHAIN_USES_UCLIBC && [...archs...]

or libunwind, openal (interesting case), openblas, protobuf.

Arguaby, none of the above have a dependency on gcc, but some are on the
C library, and others are on toolchain features...

> 	default y if BR2_i386
> 	default y if BR2_powerpc64 || BR2_powerpc64le
> 	default y if BR2_x86_64
> 
> > +
> > +config BR2_PACKAGE_KVM_UNIT_TESTS
> > +	bool "kvm-unit-tests"
> > +	depends on BR2_PACKAGE_KVM_UNIT_TESTS_ARCH_SUPPORTS
> >  	select BR2_HOSTARCH_NEEDS_IA32_COMPILER if BR2_x86_64=y
> >  	help
> >  	  kvm-unit-tests is a project as old as KVM. As its name
> 
>  And here
> 
> 	depends on !((BR2_i386 || BR2_x86_64) || BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
> 
> with the big comment above it.
> 
>  And also the comment is missing at the moment - which is probably why you
> didn't notice that it's not an architecture dependency.

OK, will add.

Thanks!

Regards,
Yann E. MORIN.

> 
>  Regards,
>  Arnout
> 
> -- 
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2017-07-08 16:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-08 14:08 [Buildroot] [PATCH 0/4 v2] arch/arm: introduce big.LITTLE configurations Yann E. MORIN
2017-07-08 14:08 ` [Buildroot] [PATCH 1/4 v2] arch/arm: fix -mcpu default values for AArch64 Yann E. MORIN
2017-07-08 15:33   ` Arnout Vandecappelle
2017-07-08 15:42     ` Yann E. MORIN
2017-07-19 20:16   ` Peter Korsgaard
2017-07-08 14:08 ` [Buildroot] [PATCH 2/4 v2] package/kvm-unit-tests: introduce _ARCH_SUPPORTS Yann E. MORIN
2017-07-08 15:41   ` Arnout Vandecappelle
2017-07-08 16:30     ` Yann E. MORIN [this message]
2017-07-09 16:03       ` Thomas Petazzoni
2017-07-09 16:16         ` Yann E. MORIN
2017-07-08 14:08 ` [Buildroot] [PATCH 3/4 v2] arch/arm: add big.LITTLE cpu variants Yann E. MORIN
2017-07-08 16:34   ` Arnout Vandecappelle
2017-07-08 16:51     ` Yann E. MORIN
2017-07-08 14:08 ` [Buildroot] [PATCH 4/4 v2] package/kvm-unit-test: available for big.LITTLE arm cores too Yann E. MORIN

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=20170708163045.GD3867@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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.