[Buildroot] [git commit branch/next] package/lapack: introduce BR2_PACKAGE_LAPACK_ARCH_SUPPORTS

From: Yann E. MORIN <hidden>
Date: 2021-08-03 22:39:32
Subsystem: the rest · Maintainer: Linus Torvalds

commit: https://git.buildroot.net/buildroot/commit/?id=d2453aa83d8f7d394b3dbe33472e5f1642268a63
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/next

This makes it easier for packages that depend on lapack to get
their dependencies correct.

The !uClibc dependency is also not sufficient: indeed, musl too does not
provide _fpu_control; only glibc does. This is the same situation as for
clapack. Add a comment about this, to mirror clapack.

Since the !glibc dependency only exists for PowerPC, treat it as
an architecture dependency.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <redacted>
[yann.morin.1998@free.fr:
  - fpu_control depends on glibc, not on !uclibc
  - add or update comments accordingly
]
Signed-off-by: Yann E. MORIN <redacted>
---
 package/lapack/Config.in | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/package/lapack/Config.in b/package/lapack/Config.in
index 6cd0810cb1..e84a19bb45 100644
--- a/package/lapack/Config.in
+++ b/package/lapack/Config.in
@@ -1,13 +1,23 @@
+config BR2_PACKAGE_LAPACK_ARCH_SUPPORTS
+	bool
+	default y
+	# _fpu_control is used on PowerPC, but not available with
+	# uClibc or musl
+	depends on !BR2_powerpc || BR2_TOOLCHAIN_USES_GLIBC
+
+comment "lapack/blas needs a glibc toolchain"
+	depends on BR2_powerpc
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
+
 comment "lapack/blas needs a toolchain w/ fortran"
-	depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC)
+	depends on BR2_PACKAGE_LAPACK_ARCH_SUPPORTS
 	depends on !BR2_TOOLCHAIN_HAS_FORTRAN
 
 config BR2_PACKAGE_LAPACK
 	bool "lapack/blas"
+	depends on BR2_PACKAGE_LAPACK_ARCH_SUPPORTS
 	depends on BR2_TOOLCHAIN_HAS_FORTRAN
 	depends on !BR2_PACKAGE_CLAPACK
-	# _fpu_control is used on PowerPC, but not available with uClibc
-	depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC)
 	help
 	  LAPACK and BLAS FORTRAN implementation. This package
 	  installs two libraries: libblas and liblapack.
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help