Skip to contentSkip to conversation

toolchain/toolchain-buildroot: PPC64(LE) support in musl requires ALTIVEC

PATCH Superseded Vincent Fazio 3 participants 8 messages Jan 31, 2020 – Apr 20, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 toolchain/toolchain-buildroot: PPC64(LE) support in musl requires ALTIVEC

musl currently assumes all PPC64(LE) CPUs support ALTIVEC instructions.

However, there are exceptions (such as the e5500) for which musl builds ultimately generate illegal instructions for the targets.

Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.

This patch addresses the issues seen here:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744

---
 toolchain/toolchain-buildroot/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
toolchain/toolchain-buildroot/Config.in +4 -2
index a980f766ac..09a46822c9 100644
@@ -83,8 +83,10 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
 	bool "musl"
 	depends on BR2_aarch64	   || BR2_arm   || BR2_armeb   || BR2_i386 || \
 		   BR2_microblaze  || BR2_mips  || BR2_mipsel  || BR2_mips64 || \
-		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
-		   BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
+		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_RISCV_64 || \
+		   BR2_sh	   || BR2_x86_64 || \
+		   ((BR2_powerpc64 || BR2_powerpc64le) && BR2_POWERPC_CPU_HAS_ALTIVEC)
+		   # musl assumes all PPC64 targets support ALTIVEC instructions
 	depends on !BR2_powerpc_SPE # not supported, build breaks
 	# sh2 nommu is supported by musl, but we don't have support
 	# for it in Buildroot.
Signature · 1 line
2.25.0
#1 lore raw

PATCH v2 1/1 toolchain/toolchain-buildroot: PPC64(LE) support in musl requires ALTIVEC

Hi Vincent,

Le 31/01/2020 ? 16:39, Vincent Fazio a ?crit?:

Quoted 10 lines

musl currently assumes all PPC64(LE) CPUs support ALTIVEC instructions.

However, there are exceptions (such as the e5500) for which musl builds ultimately generate illegal instructions for the targets.

Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.

This patch addresses the issues seen here:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744

I reported this issue to the musl mailing list. I'm not sure the e5500 support will be added in the end.

https://www.openwall.com/lists/musl/2020/02/03/10

Quoted 11 lines
---
 toolchain/toolchain-buildroot/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
toolchain/toolchain-buildroot/Config.in +0 -0
index a980f766ac..09a46822c9 100644

toolchain/toolchain-buildroot/Config.in config BR2_TOOLCHAIN_BUILDROOT_MUSL · line 89

Quoted 9 lines
toolchain/toolchain-buildroot/Config.in +4 -2
@@ -83,8 +83,10 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
 	bool "musl"
 	depends on BR2_aarch64	   || BR2_arm   || BR2_armeb   || BR2_i386 || \
 		   BR2_microblaze  || BR2_mips  || BR2_mipsel  || BR2_mips64 || \
-		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
-		   BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
+		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_RISCV_64 || \
+		   BR2_sh	   || BR2_x86_64 || \
+		   ((BR2_powerpc64 || BR2_powerpc64le) && BR2_POWERPC_CPU_HAS_ALTIVEC)
+		   # musl assumes all PPC64 targets support ALTIVEC instructions

Well, previously the architectures was sorted alphabetically. Please keep it.

You can add the dependency this way:

# musl assumes all PPC64 targets support ALTIVEC instructions
depends on !(BR2_powerpc64 || BR2_powerpc64le) || BR2_POWERPC_CPU_HAS_ALTIVEC

Best regards,
Romain

Quoted 4 lines
toolchain/toolchain-buildroot/Config.in +0 -0
 	depends on !BR2_powerpc_SPE # not supported, build breaks
 	# sh2 nommu is supported by musl, but we don't have support
 	# for it in Buildroot.
#2 lore raw

PATCH v2 1/1 toolchain/toolchain-buildroot: PPC64(LE) support in musl requires ALTIVEC

Romain,

Quoted 39 lines · Romain Naour

Hi Vincent,

Le 31/01/2020 ? 16:39, Vincent Fazio a ?crit?:

Quoted 10 lines

musl currently assumes all PPC64(LE) CPUs support ALTIVEC instructions.

However, there are exceptions (such as the e5500) for which musl builds ultimately generate illegal instructions for the targets.

Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.

This patch addresses the issues seen here:

   https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
   https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744

I reported this issue to the musl mailing list. I'm not sure the e5500 support will be added in the end.

https://www.openwall.com/lists/musl/2020/02/03/10

Quoted 10 lines
---
  toolchain/toolchain-buildroot/Config.in | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
toolchain/toolchain-buildroot/Config.in +0 -0
index a980f766ac..09a46822c9 100644

toolchain/toolchain-buildroot/Config.in config BR2_TOOLCHAIN_BUILDROOT_MUSL · line 89

Quoted 9 lines
toolchain/toolchain-buildroot/Config.in +4 -2
@@ -83,8 +83,10 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
  	bool "musl"
  	depends on BR2_aarch64	   || BR2_arm   || BR2_armeb   || BR2_i386 || \
  		   BR2_microblaze  || BR2_mips  || BR2_mipsel  || BR2_mips64 || \
-		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
-		   BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
+		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_RISCV_64 || \
+		   BR2_sh	   || BR2_x86_64 || \
+		   ((BR2_powerpc64 || BR2_powerpc64le) && BR2_POWERPC_CPU_HAS_ALTIVEC)
+		   # musl assumes all PPC64 targets support ALTIVEC instructions

Well, previously the architectures was sorted alphabetically. Please keep it.

Quoted 4 lines

You can add the dependency this way:

# musl assumes all PPC64 targets support ALTIVEC instructions
depends on !(BR2_powerpc64 || BR2_powerpc64le) || BR2_POWERPC_CPU_HAS_ALTIVEC

Ack, i didn't even notice they were alpha-sorted. i'll fix this in v3. Thanks

Quoted 7 lines

Best regards,
Romain

Quoted 4 lines
toolchain/toolchain-buildroot/Config.in +0 -0
  	depends on !BR2_powerpc_SPE # not supported, build breaks
  	# sh2 nommu is supported by musl, but we don't have support
  	# for it in Buildroot.
Signature · 4 lines
Vincent Fazio
Embedded Software Engineer - Linux
Extreme Engineering Solutions, Inc
http://www.xes-inc.com
#3 lore raw

PATCH v3 1/1 toolchain/toolchain-buildroot: PPC64(LE) support in musl requires ALTIVEC

In reply to Vincent Fazio

musl currently assumes all PPC64(LE) CPUs support ALTIVEC instructions.

However, there are exceptions (such as the e5500) for which musl builds ultimately generate illegal instructions for the targets.

Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.

This patch addresses the issues seen here:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744

---

Changes v2 -> v3:
- change to 'depends on' semantics (suggested by Romain)

Changes v1 -> v2:
- clarify commit message (suggested by Matthew)
- add job logs (suggested by Romain)

---
 toolchain/toolchain-buildroot/Config.in | 1 +
 1 file changed, 1 insertion(+)
toolchain/toolchain-buildroot/Config.in +1 -0
index a980f766ac..8c33b2b4dd 100644
@@ -86,6 +86,7 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
 		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
 		   BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
 	depends on !BR2_powerpc_SPE # not supported, build breaks
+	depends on !(BR2_powerpc64 || BR2_powerpc64le) || BR2_POWERPC_CPU_HAS_ALTIVEC
 	# sh2 nommu is supported by musl, but we don't have support
 	# for it in Buildroot.
 	depends on BR2_USE_MMU
Signature · 1 line
2.25.0
#4 lore raw

PATCH v3 1/1 toolchain/toolchain-buildroot: PPC64(LE) support in musl requires ALTIVEC

Hi Vincent,

Le 04/02/2020 ? 20:25, Vincent Fazio a ?crit?:

Quoted 6 lines

musl currently assumes all PPC64(LE) CPUs support ALTIVEC instructions.

However, there are exceptions (such as the e5500) for which musl builds ultimately generate illegal instructions for the targets.

Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.

Maybe the link to the report to the mailing list can be added:
https://www.openwall.com/lists/musl/2020/02/03/10

Otherwise:

Best regards,
Romain

Quoted 33 lines

This patch addresses the issues seen here:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744

---

Changes v2 -> v3:
- change to 'depends on' semantics (suggested by Romain)

Changes v1 -> v2:
- clarify commit message (suggested by Matthew)
- add job logs (suggested by Romain)

---
 toolchain/toolchain-buildroot/Config.in | 1 +
 1 file changed, 1 insertion(+)
toolchain/toolchain-buildroot/Config.in +1 -0
index a980f766ac..8c33b2b4dd 100644
@@ -86,6 +86,7 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
 		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
 		   BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
 	depends on !BR2_powerpc_SPE # not supported, build breaks
+	depends on !(BR2_powerpc64 || BR2_powerpc64le) || BR2_POWERPC_CPU_HAS_ALTIVEC
 	# sh2 nommu is supported by musl, but we don't have support
 	# for it in Buildroot.
 	depends on BR2_USE_MMU
#5 lore raw

PATCH v4 1/1 toolchain/toolchain-buildroot: PPC64(LE) support in musl requires ALTIVEC

In reply to Vincent Fazio

musl currently assumes all PPC64(LE) CPUs support ALTIVEC instructions.

However, there are exceptions (such as the e5500) for which musl builds ultimately generate illegal instructions for the targets.

Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.

This patch addresses the issues seen here:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744

musl mailing list thread:
https://www.openwall.com/lists/musl/2020/02/03/10

---

Changes v3 -> v4:
- document musl mailing list thread (suggested by Romain)

Changes v2 -> v3:
- change to 'depends on' semantics (suggested by Romain)

Changes v1 -> v2:
- clarify commit message (suggested by Matthew)
- add job logs (suggested by Romain)

---
 toolchain/toolchain-buildroot/Config.in | 1 +
 1 file changed, 1 insertion(+)
toolchain/toolchain-buildroot/Config.in +1 -0
index a980f766ac..8c33b2b4dd 100644
@@ -86,6 +86,7 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
 		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
 		   BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
 	depends on !BR2_powerpc_SPE # not supported, build breaks
+	depends on !(BR2_powerpc64 || BR2_powerpc64le) || BR2_POWERPC_CPU_HAS_ALTIVEC
 	# sh2 nommu is supported by musl, but we don't have support
 	# for it in Buildroot.
 	depends on BR2_USE_MMU
Signature · 1 line
2.25.0
#6 lore raw

PATCH v4 1/1 toolchain/toolchain-buildroot: PPC64(LE) support in musl requires ALTIVEC

Le 04/02/2020 ? 22:35, Vincent Fazio a ?crit?:

Quoted 7 lines

musl currently assumes all PPC64(LE) CPUs support ALTIVEC instructions.

However, there are exceptions (such as the e5500) for which musl builds ultimately generate illegal instructions for the targets.

Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.

Quoted 8 lines

This patch addresses the issues seen here:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744

musl mailing list thread:
https://www.openwall.com/lists/musl/2020/02/03/10

Best regards,
Romain

Quoted 30 lines

---

Changes v3 -> v4:
- document musl mailing list thread (suggested by Romain)

Changes v2 -> v3:
- change to 'depends on' semantics (suggested by Romain)

Changes v1 -> v2:
- clarify commit message (suggested by Matthew)
- add job logs (suggested by Romain)

---
 toolchain/toolchain-buildroot/Config.in | 1 +
 1 file changed, 1 insertion(+)
toolchain/toolchain-buildroot/Config.in +1 -0
index a980f766ac..8c33b2b4dd 100644
@@ -86,6 +86,7 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
 		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
 		   BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
 	depends on !BR2_powerpc_SPE # not supported, build breaks
+	depends on !(BR2_powerpc64 || BR2_powerpc64le) || BR2_POWERPC_CPU_HAS_ALTIVEC
 	# sh2 nommu is supported by musl, but we don't have support
 	# for it in Buildroot.
 	depends on BR2_USE_MMU
#7 lore raw

PATCH v4 1/1 toolchain/toolchain-buildroot: PPC64(LE) support in musl requires ALTIVEC

In reply to Vincent Fazio

Vincent, All,

On 2020-02-04 15:35 -0600, Vincent Fazio spake thusly:

Quoted 10 lines

musl currently assumes all PPC64(LE) CPUs support ALTIVEC instructions.

However, there are exceptions (such as the e5500) for which musl builds ultimately generate illegal instructions for the targets.

Disable musl if the PPC64(LE) CPU does not support ALTIVEC instructions.

This patch addresses the issues seen here:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092743
https://gitlab.com/kubu93/toolchains-builder/-/jobs/418092744

It's a bit unfortunate that the boot log are not visible in the job output, though...

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 40 lines

musl mailing list thread:
https://www.openwall.com/lists/musl/2020/02/03/10

---

Changes v3 -> v4:
- document musl mailing list thread (suggested by Romain)

Changes v2 -> v3:
- change to 'depends on' semantics (suggested by Romain)

Changes v1 -> v2:
- clarify commit message (suggested by Matthew)
- add job logs (suggested by Romain)

---
 toolchain/toolchain-buildroot/Config.in | 1 +
 1 file changed, 1 insertion(+)
toolchain/toolchain-buildroot/Config.in +1 -0
index a980f766ac..8c33b2b4dd 100644
@@ -86,6 +86,7 @@ config BR2_TOOLCHAIN_BUILDROOT_MUSL
 		   BR2_mips64el    || BR2_or1k  || BR2_powerpc || BR2_powerpc64 || \
 		   BR2_powerpc64le || BR2_RISCV_64 || BR2_sh   || BR2_x86_64
 	depends on !BR2_powerpc_SPE # not supported, build breaks
+	depends on !(BR2_powerpc64 || BR2_powerpc64le) || BR2_POWERPC_CPU_HAS_ALTIVEC
 	# sh2 nommu is supported by musl, but we don't have support
 	# for it in Buildroot.
 	depends on BR2_USE_MMU
Signature · 6 lines
2.25.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'