Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/4 v2] arch/arm: introduce big.LITTLE configurations
@ 2017-07-08 14:08 Yann E. MORIN
  2017-07-08 14:08 ` [Buildroot] [PATCH 1/4 v2] arch/arm: fix -mcpu default values for AArch64 Yann E. MORIN
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Yann E. MORIN @ 2017-07-08 14:08 UTC (permalink / raw)
  To: buildroot

Hello All!

This series adds four new CPU variants to the arm choice, to enable
optimising for big.LITTLE CPUs.

We first fix the current values in the first patch, then introduce the
actual new variants, and then make use of them in the sole package that
needs to know of them.

This has been only slightly tested by simply building the toolchains for
the six possibilities:
  - the four variants in arm mode (32-bit),
  - the two armv8 variants in aarch64 mode (64-bit).

The variants were introduced in various versions of gcc, so we protect
the internal gcc as well as the external toolchains accordingly.

To be noted: openblas also has a cortex-a15 optimisation, so maybe that
optimisation can also be used for the cortex-a15.cortex-a7 variant as
well. But I have absolutely no clue what openblas is doing with that
anyway, so I left it alone for someone else to deal with...


Regards,
Yann E. MORIN.


The following changes since commit 644c024edeb7e20bd96ce4426aeca2cbcd74d9b9

  syslinux: drop patch 0003, not needed after gnu-efi update (2017-07-04 18:45:26 +0200)


are available in the git repository at:

  git://git.buildroot.org/~ymorin/git/buildroot.git

for you to fetch changes up to d1065a08c9b2a83d4611a6566f068528a5b1ca3c

  package/kvm-unit-test: available for big.LITTLE arm cores too (2017-07-08 15:51:23 +0200)


----------------------------------------------------------------
Yann E. MORIN (4):
      arch/arm: fix -mcpu default values for AArch64
      package/kvm-unit-tests: introduce _ARCH_SUPPORTS
      arch/arm: add big.LITTLE cpu variants
      package/kvm-unit-test: available for big.LITTLE arm cores too

 arch/Config.in.arm                                 | 50 ++++++++++++++++++----
 package/gcc/Config.in.host                         |  5 ++-
 package/kvm-unit-tests/Config.in                   | 19 ++++----
 .../Config.in                                      |  2 +
 .../toolchain-external-codesourcery-arm/Config.in  |  4 ++
 5 files changed, 62 insertions(+), 18 deletions(-)

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 1/4 v2] arch/arm: fix -mcpu default values for AArch64
  2017-07-08 14:08 [Buildroot] [PATCH 0/4 v2] arch/arm: introduce big.LITTLE configurations Yann E. MORIN
@ 2017-07-08 14:08 ` Yann E. MORIN
  2017-07-08 15:33   ` Arnout Vandecappelle
  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
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 14+ messages in thread
From: Yann E. MORIN @ 2017-07-08 14:08 UTC (permalink / raw)
  To: buildroot

We have to specify the -mcpu value, even in 64-bit mode.

For AArch64, +fp and +simd are the default, so they are totally useless.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Baruch Siach <baruch@tkos.co.il>

---
Changes v1 -> v2:
  - squash the two changes into one patch  (Thomas)
  - remove useless parentheses  (Baruch)
  - remove superfluous indentation

Notes: If anything, it is the +nofp or +nosimd that should be specified.
This can be done in a future patch, though.
---
 arch/Config.in.arm | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index b1817ed568..3cafe21700 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -534,15 +534,9 @@ config BR2_GCC_TARGET_CPU
 	default "strongarm"	if BR2_strongarm
 	default "xscale"	if BR2_xscale
 	default "iwmmxt"	if BR2_iwmmxt
-	default "cortex-a53"		if (BR2_cortex_a53 && !BR2_ARCH_IS_64)
-	default "cortex-a53+fp"		if (BR2_cortex_a53 && BR2_ARCH_IS_64 && BR2_ARM_FPU_FP_ARMV8)
-	default "cortex-a53+fp+simd"	if (BR2_cortex_a53 && BR2_ARCH_IS_64 && BR2_ARM_FPU_NEON_FP_ARMV8)
-	default "cortex-a57"		if (BR2_cortex_a57 && !BR2_ARCH_IS_64)
-	default "cortex-a57+fp"		if (BR2_cortex_a57 && BR2_ARCH_IS_64 && BR2_ARM_FPU_FP_ARMV8)
-	default "cortex-a57+fp+simd"	if (BR2_cortex_a57 && BR2_ARCH_IS_64 && BR2_ARM_FPU_NEON_FP_ARMV8)
-	default "cortex-a72"		if (BR2_cortex_a72 && !BR2_ARCH_IS_64)
-	default "cortex-a72+fp"		if (BR2_cortex_a72 && BR2_ARCH_IS_64 && BR2_ARM_FPU_FP_ARMV8)
-	default "cortex-a72+fp+simd"	if (BR2_cortex_a72 && BR2_ARCH_IS_64 && BR2_ARM_FPU_NEON_FP_ARMV8)
+	default "cortex-a53"	if BR2_cortex_a53
+	default "cortex-a57"	if BR2_cortex_a57
+	default "cortex-a72"	if BR2_cortex_a72
 
 config BR2_GCC_TARGET_ABI
 	default "aapcs-linux"	if BR2_arm || BR2_armeb
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 2/4 v2] package/kvm-unit-tests: introduce _ARCH_SUPPORTS
  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 14:08 ` Yann E. MORIN
  2017-07-08 15:41   ` Arnout Vandecappelle
  2017-07-08 14:08 ` [Buildroot] [PATCH 3/4 v2] arch/arm: add big.LITTLE cpu variants 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
  3 siblings, 1 reply; 14+ messages in thread
From: Yann E. MORIN @ 2017-07-08 14:08 UTC (permalink / raw)
  To: buildroot

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
+
+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
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 3/4 v2] arch/arm: add big.LITTLE cpu variants
  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 14:08 ` [Buildroot] [PATCH 2/4 v2] package/kvm-unit-tests: introduce _ARCH_SUPPORTS Yann E. MORIN
@ 2017-07-08 14:08 ` Yann E. MORIN
  2017-07-08 16:34   ` Arnout Vandecappelle
  2017-07-08 14:08 ` [Buildroot] [PATCH 4/4 v2] package/kvm-unit-test: available for big.LITTLE arm cores too Yann E. MORIN
  3 siblings, 1 reply; 14+ messages in thread
From: Yann E. MORIN @ 2017-07-08 14:08 UTC (permalink / raw)
  To: buildroot

The big.LITTLE configurations can be optimised for by gcc, and a few
users wonder what they should choose when they have such CPUs.

Add new entries for those big.LITTLE configurations.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Baruch Siach <baruch@tkos.co.il>

---
Changes v1 -> v2:
  - remove superfluous parentheses  (Baruch)
---
 arch/Config.in.arm                                 | 38 ++++++++++++++++++++++
 package/gcc/Config.in.host                         |  5 ++-
 .../Config.in                                      |  2 ++
 .../toolchain-external-codesourcery-arm/Config.in  |  4 +++
 4 files changed, 48 insertions(+), 1 deletion(-)

diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index 3cafe21700..09916df7ad 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -182,6 +182,15 @@ config BR2_cortex_a15
 	select BR2_ARM_CPU_ARMV7A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	depends on !BR2_ARCH_IS_64
+config BR2_cortex_a15_a7
+	bool "cortex-A15/A7 big.LITTLE"
+	select BR2_ARM_CPU_HAS_ARM
+	select BR2_ARM_CPU_HAS_NEON
+	select BR2_ARM_CPU_HAS_VFPV4
+	select BR2_ARM_CPU_HAS_THUMB2
+	select BR2_ARM_CPU_ARMV7A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	depends on !BR2_ARCH_IS_64
 config BR2_cortex_a17
 	bool "cortex-A17"
 	select BR2_ARM_CPU_HAS_ARM
@@ -191,6 +200,15 @@ config BR2_cortex_a17
 	select BR2_ARM_CPU_ARMV7A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	depends on !BR2_ARCH_IS_64
+config BR2_cortex_a17_a7
+	bool "cortex-A17/A7 big.LITTLE"
+	select BR2_ARM_CPU_HAS_ARM
+	select BR2_ARM_CPU_HAS_NEON
+	select BR2_ARM_CPU_HAS_VFPV4
+	select BR2_ARM_CPU_HAS_THUMB2
+	select BR2_ARM_CPU_ARMV7A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	depends on !BR2_ARCH_IS_64
 config BR2_cortex_a53
 	bool "cortex-A53"
 	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
@@ -207,6 +225,14 @@ config BR2_cortex_a57
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8
 	select BR2_ARCH_HAS_MMU_OPTIONAL
+config BR2_cortex_a57_a53
+	bool "cortex-A57/A53 big.LITTLE"
+	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8
+	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_cortex_a72
 	bool "cortex-A72"
 	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
@@ -215,6 +241,14 @@ config BR2_cortex_a72
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8
 	select BR2_ARCH_HAS_MMU_OPTIONAL
+config BR2_cortex_a72_a53
+	bool "cortex-A72/A53 big.LITTLE"
+	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8
+	select BR2_ARCH_HAS_MMU_OPTIONAL
 config BR2_cortex_m3
 	bool "cortex-M3"
 	select BR2_ARM_CPU_HAS_THUMB2
@@ -526,7 +560,9 @@ config BR2_GCC_TARGET_CPU
 	default "cortex-a9"	if BR2_cortex_a9
 	default "cortex-a12"	if BR2_cortex_a12
 	default "cortex-a15"	if BR2_cortex_a15
+	default "cortex-a15.cortex-a7"	if BR2_cortex_a15_a7
 	default "cortex-a17"	if BR2_cortex_a17
+	default "cortex-a17.cortex-a7"	if BR2_cortex_a17_a7
 	default "cortex-m3"	if BR2_cortex_m3
 	default "cortex-m4"	if BR2_cortex_m4
 	default "fa526"		if BR2_fa526
@@ -536,7 +572,9 @@ config BR2_GCC_TARGET_CPU
 	default "iwmmxt"	if BR2_iwmmxt
 	default "cortex-a53"	if BR2_cortex_a53
 	default "cortex-a57"	if BR2_cortex_a57
+	default "cortex-a57.cortex-a53"	if BR2_cortex_a57_a53
 	default "cortex-a72"	if BR2_cortex_a72
+	default "cortex-a72.cortex-a53"	if BR2_cortex_a72_a53
 
 config BR2_GCC_TARGET_ABI
 	default "aapcs-linux"	if BR2_arm || BR2_armeb
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 5dcaa03ff0..c072b78ae5 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -25,7 +25,8 @@ config BR2_GCC_VERSION_4_9_X
 	# Broken or unsupported architectures
 	depends on !BR2_arc && !BR2_bfin && !BR2_or1k
 	# Broken or unsupported ARM cores
-	depends on !BR2_cortex_a17 && !BR2_cortex_a72
+	depends on !BR2_cortex_a17 && !BR2_cortex_a17_a7
+	depends on !BR2_cortex_a72 && !BR2_cortex_a72_a53
 	# Unsupported MIPS cores
 	depends on !BR2_mips_interaptiv
 	# Unsupported for MIPS R5
@@ -45,6 +46,8 @@ config BR2_GCC_VERSION_5_X
 	bool "gcc 5.x"
 	# Broken or unsupported architectures
 	depends on !BR2_arc && !BR2_bfin && !BR2_or1k
+	# Broken or unsupported ARM cores
+	depends on !BR2_cortex_a57_a53 && !BR2_cortex_a72_a53
 	# musl ppc64 unsupported
 	depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64le))
 	# Unsupported MIPS cores
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
index 2fbb218ecc..66a032e9ac 100644
--- a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
@@ -1,6 +1,8 @@
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
 	bool "CodeSourcery AArch64 2014.11"
 	depends on BR2_aarch64
+	# a57/a53 and a72/a53 appeared in gcc-6 or were broken before
+	depends on !BR2_cortex_a57_a53 && !BR2_cortex_a72_a53
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	depends on !BR2_STATIC_LIBS
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
index 6331873dbd..e1a7891007 100644
--- a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
@@ -1,6 +1,10 @@
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
 	bool "Sourcery CodeBench ARM 2014.05"
 	depends on BR2_arm
+	# a15/a7 appeared in gcc-4.9, a17/a7 in gcc-5, a57/a53 and a72/a53
+	# in gcc-6, or they each were broken earlier than that.
+	depends on !BR2_cortex_a15_a7 && !BR2_cortex_a17_a7
+	depends on !BR2_cortex_a57_53 && !BR2_cortex_a72_53
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	depends on BR2_ARM_EABI
 	# Unsupported ARM cores
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 4/4 v2] package/kvm-unit-test: available for big.LITTLE arm cores too
  2017-07-08 14:08 [Buildroot] [PATCH 0/4 v2] arch/arm: introduce big.LITTLE configurations Yann E. MORIN
                   ` (2 preceding siblings ...)
  2017-07-08 14:08 ` [Buildroot] [PATCH 3/4 v2] arch/arm: add big.LITTLE cpu variants Yann E. MORIN
@ 2017-07-08 14:08 ` Yann E. MORIN
  3 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2017-07-08 14:08 UTC (permalink / raw)
  To: buildroot

Since it supports each variants individually, it should also supports
the big.LITTLE configurations.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Cyril Bur <cyrilbur@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/kvm-unit-tests/Config.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/kvm-unit-tests/Config.in b/package/kvm-unit-tests/Config.in
index 0283e97dfc..ec1826b2da 100644
--- a/package/kvm-unit-tests/Config.in
+++ b/package/kvm-unit-tests/Config.in
@@ -1,7 +1,8 @@
 config BR2_PACKAGE_KVM_UNIT_TESTS_ARCH_SUPPORTS
 	bool
 	default y if BR2_cortex_a7 || BR2_cortex_a12 || \
-		BR2_cortex_a15 || BR2_cortex_a17
+		BR2_cortex_a15 || BR2_cortex_a17 || \
+		BR2_cortex_a15_a7 || BR2_cortex_a17_a7
 	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
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 1/4 v2] arch/arm: fix -mcpu default values for AArch64
  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
  1 sibling, 1 reply; 14+ messages in thread
From: Arnout Vandecappelle @ 2017-07-08 15:33 UTC (permalink / raw)
  To: buildroot



On 08-07-17 16:08, Yann E. MORIN wrote:
> We have to specify the -mcpu value, even in 64-bit mode.
> 
> For AArch64, +fp and +simd are the default, so they are totally useless.

 However, we typically want to be explicit about things, so when the +nofp and
+nosimd are added we want these lines to return as well. Wouldn't it be better
to just add the noXX variants in this patch?

 That said, this patch actually fixes the !FP case so

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 Regards,
 Arnout

> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
> 
> ---
> Changes v1 -> v2:
>   - squash the two changes into one patch  (Thomas)
>   - remove useless parentheses  (Baruch)
>   - remove superfluous indentation
> 
> Notes: If anything, it is the +nofp or +nosimd that should be specified.
> This can be done in a future patch, though.
> ---
>  arch/Config.in.arm | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/Config.in.arm b/arch/Config.in.arm
> index b1817ed568..3cafe21700 100644
> --- a/arch/Config.in.arm
> +++ b/arch/Config.in.arm
> @@ -534,15 +534,9 @@ config BR2_GCC_TARGET_CPU
>  	default "strongarm"	if BR2_strongarm
>  	default "xscale"	if BR2_xscale
>  	default "iwmmxt"	if BR2_iwmmxt
> -	default "cortex-a53"		if (BR2_cortex_a53 && !BR2_ARCH_IS_64)
> -	default "cortex-a53+fp"		if (BR2_cortex_a53 && BR2_ARCH_IS_64 && BR2_ARM_FPU_FP_ARMV8)
> -	default "cortex-a53+fp+simd"	if (BR2_cortex_a53 && BR2_ARCH_IS_64 && BR2_ARM_FPU_NEON_FP_ARMV8)
> -	default "cortex-a57"		if (BR2_cortex_a57 && !BR2_ARCH_IS_64)
> -	default "cortex-a57+fp"		if (BR2_cortex_a57 && BR2_ARCH_IS_64 && BR2_ARM_FPU_FP_ARMV8)
> -	default "cortex-a57+fp+simd"	if (BR2_cortex_a57 && BR2_ARCH_IS_64 && BR2_ARM_FPU_NEON_FP_ARMV8)
> -	default "cortex-a72"		if (BR2_cortex_a72 && !BR2_ARCH_IS_64)
> -	default "cortex-a72+fp"		if (BR2_cortex_a72 && BR2_ARCH_IS_64 && BR2_ARM_FPU_FP_ARMV8)
> -	default "cortex-a72+fp+simd"	if (BR2_cortex_a72 && BR2_ARCH_IS_64 && BR2_ARM_FPU_NEON_FP_ARMV8)
> +	default "cortex-a53"	if BR2_cortex_a53
> +	default "cortex-a57"	if BR2_cortex_a57
> +	default "cortex-a72"	if BR2_cortex_a72
>  
>  config BR2_GCC_TARGET_ABI
>  	default "aapcs-linux"	if BR2_arm || BR2_armeb
> 

-- 
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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 2/4 v2] package/kvm-unit-tests: introduce _ARCH_SUPPORTS
  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
  0 siblings, 1 reply; 14+ messages in thread
From: Arnout Vandecappelle @ 2017-07-08 15:41 UTC (permalink / raw)
  To: buildroot



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

	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.


 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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 1/4 v2] arch/arm: fix -mcpu default values for AArch64
  2017-07-08 15:33   ` Arnout Vandecappelle
@ 2017-07-08 15:42     ` Yann E. MORIN
  0 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2017-07-08 15:42 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2017-07-08 17:33 +0200, Arnout Vandecappelle spake thusly:
> On 08-07-17 16:08, Yann E. MORIN wrote:
> > We have to specify the -mcpu value, even in 64-bit mode.
> > 
> > For AArch64, +fp and +simd are the default, so they are totally useless.
> 
>  However, we typically want to be explicit about things, so when the +nofp and
> +nosimd are added we want these lines to return as well. Wouldn't it be better
> to just add the noXX variants in this patch?

When we talked about that with Thomas, he said he preferred we drop them
altogether.

Also, adding the no variants is not that easy, because it involves all
of 64-bit, vfpv8 and neon.

However, we do not have an option for noen on 64-bit for now. We can't
re-use the existing 32-bit neon option either, because some packages
expect that neon is the 32-bit variant.

So, it is a little bit more involved.

Since the no variants were not really working anyway for now, there is
yet no regression yet.

I also just decided to stay with just adding the big.LITTLE variants
rather than send another many-patches series like I'm used to.

>  That said, this patch actually fixes the !FP case so
> 
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Thanks!

Regards,
Yann E. MORIN.

>  Regards,
>  Arnout
> 
> > 
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Cc: Baruch Siach <baruch@tkos.co.il>
> > 
> > ---
> > Changes v1 -> v2:
> >   - squash the two changes into one patch  (Thomas)
> >   - remove useless parentheses  (Baruch)
> >   - remove superfluous indentation
> > 
> > Notes: If anything, it is the +nofp or +nosimd that should be specified.
> > This can be done in a future patch, though.
> > ---
> >  arch/Config.in.arm | 12 +++---------
> >  1 file changed, 3 insertions(+), 9 deletions(-)
> > 
> > diff --git a/arch/Config.in.arm b/arch/Config.in.arm
> > index b1817ed568..3cafe21700 100644
> > --- a/arch/Config.in.arm
> > +++ b/arch/Config.in.arm
> > @@ -534,15 +534,9 @@ config BR2_GCC_TARGET_CPU
> >  	default "strongarm"	if BR2_strongarm
> >  	default "xscale"	if BR2_xscale
> >  	default "iwmmxt"	if BR2_iwmmxt
> > -	default "cortex-a53"		if (BR2_cortex_a53 && !BR2_ARCH_IS_64)
> > -	default "cortex-a53+fp"		if (BR2_cortex_a53 && BR2_ARCH_IS_64 && BR2_ARM_FPU_FP_ARMV8)
> > -	default "cortex-a53+fp+simd"	if (BR2_cortex_a53 && BR2_ARCH_IS_64 && BR2_ARM_FPU_NEON_FP_ARMV8)
> > -	default "cortex-a57"		if (BR2_cortex_a57 && !BR2_ARCH_IS_64)
> > -	default "cortex-a57+fp"		if (BR2_cortex_a57 && BR2_ARCH_IS_64 && BR2_ARM_FPU_FP_ARMV8)
> > -	default "cortex-a57+fp+simd"	if (BR2_cortex_a57 && BR2_ARCH_IS_64 && BR2_ARM_FPU_NEON_FP_ARMV8)
> > -	default "cortex-a72"		if (BR2_cortex_a72 && !BR2_ARCH_IS_64)
> > -	default "cortex-a72+fp"		if (BR2_cortex_a72 && BR2_ARCH_IS_64 && BR2_ARM_FPU_FP_ARMV8)
> > -	default "cortex-a72+fp+simd"	if (BR2_cortex_a72 && BR2_ARCH_IS_64 && BR2_ARM_FPU_NEON_FP_ARMV8)
> > +	default "cortex-a53"	if BR2_cortex_a53
> > +	default "cortex-a57"	if BR2_cortex_a57
> > +	default "cortex-a72"	if BR2_cortex_a72
> >  
> >  config BR2_GCC_TARGET_ABI
> >  	default "aapcs-linux"	if BR2_arm || BR2_armeb
> > 
> 
> -- 
> 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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 2/4 v2] package/kvm-unit-tests: introduce _ARCH_SUPPORTS
  2017-07-08 15:41   ` Arnout Vandecappelle
@ 2017-07-08 16:30     ` Yann E. MORIN
  2017-07-09 16:03       ` Thomas Petazzoni
  0 siblings, 1 reply; 14+ messages in thread
From: Yann E. MORIN @ 2017-07-08 16:30 UTC (permalink / raw)
  To: buildroot

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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 3/4 v2] arch/arm: add big.LITTLE cpu variants
  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
  0 siblings, 1 reply; 14+ messages in thread
From: Arnout Vandecappelle @ 2017-07-08 16:34 UTC (permalink / raw)
  To: buildroot



On 08-07-17 16:08, Yann E. MORIN wrote:
> The big.LITTLE configurations can be optimised for by gcc, and a few
> users wonder what they should choose when they have such CPUs.
> 
> Add new entries for those big.LITTLE configurations.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> Cc: Baruch Siach <baruch@tkos.co.il>
[snip]
> +config BR2_cortex_a15_a7
> +	bool "cortex-A15/A7 big.LITTLE"
> +	select BR2_ARM_CPU_HAS_ARM
> +	select BR2_ARM_CPU_HAS_NEON
> +	select BR2_ARM_CPU_HAS_VFPV4
> +	select BR2_ARM_CPU_HAS_THUMB2
> +	select BR2_ARM_CPU_ARMV7A
> +	select BR2_ARCH_HAS_MMU_OPTIONAL

 Not for this patch, but: is this actually correct? Looking at the kernel's
arch/arm/Kconfig, I see that all the platforms that can be selected when MMU is
not selected are <= ARMv6. Well, I'm not entirely sure, it's a bit difficult to
map stuff like CPU_XSC3 on an ARM version.

> +	depends on !BR2_ARCH_IS_64
[snip]
> diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
> index 5dcaa03ff0..c072b78ae5 100644
> --- a/package/gcc/Config.in.host
> +++ b/package/gcc/Config.in.host
> @@ -25,7 +25,8 @@ config BR2_GCC_VERSION_4_9_X
>  	# Broken or unsupported architectures
>  	depends on !BR2_arc && !BR2_bfin && !BR2_or1k
>  	# Broken or unsupported ARM cores
> -	depends on !BR2_cortex_a17 && !BR2_cortex_a72
> +	depends on !BR2_cortex_a17 && !BR2_cortex_a17_a7
> +	depends on !BR2_cortex_a72 && !BR2_cortex_a72_a53
>  	# Unsupported MIPS cores
>  	depends on !BR2_mips_interaptiv
>  	# Unsupported for MIPS R5
> @@ -45,6 +46,8 @@ config BR2_GCC_VERSION_5_X
>  	bool "gcc 5.x"
>  	# Broken or unsupported architectures
>  	depends on !BR2_arc && !BR2_bfin && !BR2_or1k
> +	# Broken or unsupported ARM cores
> +	depends on !BR2_cortex_a57_a53 && !BR2_cortex_a72_a53

 According to [1], a72.a53 was added in GCC 5. And a57.a53 was already added in
GCC 4.9 - is it broken in GCC 5?


>  	# musl ppc64 unsupported
>  	depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64le))
>  	# Unsupported MIPS cores
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
> index 2fbb218ecc..66a032e9ac 100644
> --- a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
> @@ -1,6 +1,8 @@
>  config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
>  	bool "CodeSourcery AArch64 2014.11"
>  	depends on BR2_aarch64
> +	# a57/a53 and a72/a53 appeared in gcc-6 or were broken before

 Ah, here you mention it. Better raise that to the commit message. Do you also
have a reference for it?


 Regards,
 Arnout


> +	depends on !BR2_cortex_a57_a53 && !BR2_cortex_a72_a53
[snip]

[1] https://gcc.gnu.org/gcc-5/changes.html

-- 
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

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 3/4 v2] arch/arm: add big.LITTLE cpu variants
  2017-07-08 16:34   ` Arnout Vandecappelle
@ 2017-07-08 16:51     ` Yann E. MORIN
  0 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2017-07-08 16:51 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2017-07-08 18:34 +0200, Arnout Vandecappelle spake thusly:
> On 08-07-17 16:08, Yann E. MORIN wrote:
> > The big.LITTLE configurations can be optimised for by gcc, and a few
> > users wonder what they should choose when they have such CPUs.
> > 
> > Add new entries for those big.LITTLE configurations.
> > 
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
> > Cc: Baruch Siach <baruch@tkos.co.il>
> [snip]
> > +config BR2_cortex_a15_a7
> > +	bool "cortex-A15/A7 big.LITTLE"
> > +	select BR2_ARM_CPU_HAS_ARM
> > +	select BR2_ARM_CPU_HAS_NEON
> > +	select BR2_ARM_CPU_HAS_VFPV4
> > +	select BR2_ARM_CPU_HAS_THUMB2
> > +	select BR2_ARM_CPU_ARMV7A
> > +	select BR2_ARCH_HAS_MMU_OPTIONAL
> 
>  Not for this patch, but: is this actually correct? Looking at the kernel's
> arch/arm/Kconfig, I see that all the platforms that can be selected when MMU is
> not selected are <= ARMv6. Well, I'm not entirely sure, it's a bit difficult to
> map stuff like CPU_XSC3 on an ARM version.

I just duplicated for a15-a7 what we had for a15 and a7, which
fortunately was exactly identical. So a15-a7 can be noMMU in Buildroot.

Does that make sense? Probably not, but this should be fixed by another
patch, then.

> > +	depends on !BR2_ARCH_IS_64
> [snip]
> > diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
> > index 5dcaa03ff0..c072b78ae5 100644
> > --- a/package/gcc/Config.in.host
> > +++ b/package/gcc/Config.in.host
> > @@ -25,7 +25,8 @@ config BR2_GCC_VERSION_4_9_X
> >  	# Broken or unsupported architectures
> >  	depends on !BR2_arc && !BR2_bfin && !BR2_or1k
> >  	# Broken or unsupported ARM cores
> > -	depends on !BR2_cortex_a17 && !BR2_cortex_a72
> > +	depends on !BR2_cortex_a17 && !BR2_cortex_a17_a7
> > +	depends on !BR2_cortex_a72 && !BR2_cortex_a72_a53
> >  	# Unsupported MIPS cores
> >  	depends on !BR2_mips_interaptiv
> >  	# Unsupported for MIPS R5
> > @@ -45,6 +46,8 @@ config BR2_GCC_VERSION_5_X
> >  	bool "gcc 5.x"
> >  	# Broken or unsupported architectures
> >  	depends on !BR2_arc && !BR2_bfin && !BR2_or1k
> > +	# Broken or unsupported ARM cores
> > +	depends on !BR2_cortex_a57_a53 && !BR2_cortex_a72_a53
> 
>  According to [1], a72.a53 was added in GCC 5. And a57.a53 was already added in
> GCC 4.9 - is it broken in GCC 5?

I indeed tried various versions of gcc, starting with gcc-4.9.

The depednencies I added here are based on brokenness of versions
earlier than that.

> >  	# musl ppc64 unsupported
> >  	depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64le))
> >  	# Unsupported MIPS cores
> > diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
> > index 2fbb218ecc..66a032e9ac 100644
> > --- a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
> > +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
> > @@ -1,6 +1,8 @@
> >  config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
> >  	bool "CodeSourcery AArch64 2014.11"
> >  	depends on BR2_aarch64
> > +	# a57/a53 and a72/a53 appeared in gcc-6 or were broken before
> 
>  Ah, here you mention it. Better raise that to the commit message. Do you also
> have a reference for it?

No, except that gcc did not build: the brokenness manifested itself with
gcc's configure script refusing the big-LITTLE variants.

Regards,
Yann E. MORIN.

>  Regards,
>  Arnout
> 
> 
> > +	depends on !BR2_cortex_a57_a53 && !BR2_cortex_a72_a53
> [snip]
> 
> [1] https://gcc.gnu.org/gcc-5/changes.html
> 
> -- 
> 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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 2/4 v2] package/kvm-unit-tests: introduce _ARCH_SUPPORTS
  2017-07-08 16:30     ` Yann E. MORIN
@ 2017-07-09 16:03       ` Thomas Petazzoni
  2017-07-09 16:16         ` Yann E. MORIN
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Petazzoni @ 2017-07-09 16:03 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 8 Jul 2017 18:30:45 +0200, Yann E. MORIN wrote:

> >  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...

Yes, but see what I replied to Carlos about adding a
BR2_PACKAGE_LINUX_PAM_ARCH_SUPPORTS option, which would have encoded
non-architecture dependencies.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 2/4 v2] package/kvm-unit-tests: introduce _ARCH_SUPPORTS
  2017-07-09 16:03       ` Thomas Petazzoni
@ 2017-07-09 16:16         ` Yann E. MORIN
  0 siblings, 0 replies; 14+ messages in thread
From: Yann E. MORIN @ 2017-07-09 16:16 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2017-07-09 18:03 +0200, Thomas Petazzoni spake thusly:
> On Sat, 8 Jul 2017 18:30:45 +0200, Yann E. MORIN wrote:
> > >  GCC is *not* an arch dependency, so this should just be  
> > Yet we already use similar construct in other packages, like [...]
[--SNIP--]
> > Arguaby, none of the above have a dependency on gcc, but some are on the
> > C library, and others are on toolchain features...
> 
> Yes, but see what I replied to Carlos about adding a
> BR2_PACKAGE_LINUX_PAM_ARCH_SUPPORTS option, which would have encoded
> non-architecture dependencies.

And it looks like I agree as I addressed Arnout's comment in v3. ;-)

I was just pointing out that we are not entirely consistent with this
rule, as some packages have such non-arch dependencies in their
_ARCH_SUPPORT symbols.

I'll try to find some time to fix them. :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Buildroot] [PATCH 1/4 v2] arch/arm: fix -mcpu default values for AArch64
  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-19 20:16   ` Peter Korsgaard
  1 sibling, 0 replies; 14+ messages in thread
From: Peter Korsgaard @ 2017-07-19 20:16 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > We have to specify the -mcpu value, even in 64-bit mode.
 > For AArch64, +fp and +simd are the default, so they are totally useless.

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 > Cc: Baruch Siach <baruch@tkos.co.il>

 > ---
 > Changes v1 -> v2:
 >   - squash the two changes into one patch  (Thomas)
 >   - remove useless parentheses  (Baruch)
 >   - remove superfluous indentation

Committed to 2017.02.x and 2017.05.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-07-19 20:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox