diff mbox series

toolchain/toolchain-buildroot, package/glibc: sync glibc dependency comments

Message ID 20220726134436.2014032-1-thomas.petazzoni@bootlin.com
State Accepted
Headers show
Series toolchain/toolchain-buildroot, package/glibc: sync glibc dependency comments | expand

Commit Message

Thomas Petazzoni July 26, 2022, 1:44 p.m. UTC
In commit fd839aeb7f40596e60bc53a96b7a65892924cc26 ("package/glibc:
introduce and use BR2_PACKAGE_GLIBC_ARCH_SUPPORTS and
BR2_PACKAGE_GLIBC_SUPPORTS") we moved the Config.in logic about glibc
dependencies from toolchain/toolchain-buildroot/Config.in into
package/glibc/Config.in.

Unfortunately, it is not possible to move the Config.in comments that
tell the user, within the choice..endchoice for the C library why
glibc is not currently selectable, so we had to keep them in
toolchain/toolchain-buildroot/Config.in.

Turns out that the comments were out of sync with the dependencies,
and two comments were missing. This commit adds the missing ones, and
adds a comment in package/glibc/Config.in explaining that we need to
be careful about updating toolchain/toolchain-buildroot/Config.in as
well.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/glibc/Config.in                 | 3 +++
 toolchain/toolchain-buildroot/Config.in | 8 ++++++++
 2 files changed, 11 insertions(+)

Comments

Thomas Petazzoni July 27, 2022, 2:58 p.m. UTC | #1
On Tue, 26 Jul 2022 15:44:35 +0200
Thomas Petazzoni via buildroot <buildroot@buildroot.org> wrote:

> In commit fd839aeb7f40596e60bc53a96b7a65892924cc26 ("package/glibc:
> introduce and use BR2_PACKAGE_GLIBC_ARCH_SUPPORTS and
> BR2_PACKAGE_GLIBC_SUPPORTS") we moved the Config.in logic about glibc
> dependencies from toolchain/toolchain-buildroot/Config.in into
> package/glibc/Config.in.
> 
> Unfortunately, it is not possible to move the Config.in comments that
> tell the user, within the choice..endchoice for the C library why
> glibc is not currently selectable, so we had to keep them in
> toolchain/toolchain-buildroot/Config.in.
> 
> Turns out that the comments were out of sync with the dependencies,
> and two comments were missing. This commit adds the missing ones, and
> adds a comment in package/glibc/Config.in explaining that we need to
> be careful about updating toolchain/toolchain-buildroot/Config.in as
> well.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> ---
>  package/glibc/Config.in                 | 3 +++
>  toolchain/toolchain-buildroot/Config.in | 8 ++++++++
>  2 files changed, 11 insertions(+)

Seems like I was stupid: I mistakenly pushed this patch *before*
submitting it... So well, it's applied. Don't hesitate to let me know
if you see anything wrong with it, of course, and I'll fix it!

Best regards,

Thomas
Peter Korsgaard Aug. 18, 2022, 6:16 a.m. UTC | #2
>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > In commit fd839aeb7f40596e60bc53a96b7a65892924cc26 ("package/glibc:
 > introduce and use BR2_PACKAGE_GLIBC_ARCH_SUPPORTS and
 > BR2_PACKAGE_GLIBC_SUPPORTS") we moved the Config.in logic about glibc
 > dependencies from toolchain/toolchain-buildroot/Config.in into
 > package/glibc/Config.in.

 > Unfortunately, it is not possible to move the Config.in comments that
 > tell the user, within the choice..endchoice for the C library why
 > glibc is not currently selectable, so we had to keep them in
 > toolchain/toolchain-buildroot/Config.in.

 > Turns out that the comments were out of sync with the dependencies,
 > and two comments were missing. This commit adds the missing ones, and
 > adds a comment in package/glibc/Config.in explaining that we need to
 > be careful about updating toolchain/toolchain-buildroot/Config.in as
 > well.

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Committed to 2022.05.x, thanks.
diff mbox series

Patch

diff --git a/package/glibc/Config.in b/package/glibc/Config.in
index f535f9f6eb..2c6dc40139 100644
--- a/package/glibc/Config.in
+++ b/package/glibc/Config.in
@@ -30,6 +30,9 @@  config BR2_PACKAGE_GLIBC_SUPPORTS
 	bool
 	default y if BR2_PACKAGE_GLIBC_ARCH_SUPPORTS
 	depends on !BR2_STATIC_LIBS
+	# Make sure to keep these dependencies in sync with the
+	# Config.in comments in
+	# toolchain/toolchain-buildroot/Config.in
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 || !BR2_powerpc64le
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 || !BR2_MIPS_NAN_2008
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 56343daee7..c8f522a8da 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -64,6 +64,14 @@  comment "glibc on MIPS w/ NAN2008 needs a toolchain w/ headers >= 4.5"
 	depends on BR2_MIPS_NAN_2008
 	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
 
+comment "glibc on RISC-V 64-bit needs a toolchain w/ headers >= 5.0"
+	depends on BR2_RISCV_64
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0
+
+comment "glibc on ARC needs a toolchain w/ headers >= 5.1"
+	depends on BR2_arc
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
+
 config BR2_TOOLCHAIN_BUILDROOT_MUSL
 	bool "musl"
 	depends on BR2_PACKAGE_MUSL_SUPPORTS