Skip to contentSkip to conversation

toolchain/buildroot: Fix symbol for uClibc

PATCH New Petr Vorel 3 participants 5 messages May 9, 2018 – May 14, 2018

lore
Share & tools
lore

Petr Vorel

author
#0 lore raw

PATCH v2 1/2 toolchain/buildroot: Fix symbol for uClibc

Symbol BR2_TOOLCHAIN_UCLIBC doesn't exist, it was meant to be BR2_TOOLCHAIN_BUILDROOT_UCLIBC.

Fixes 493b1177b9 toolchain/buildroot: default to uClibc
---
 toolchain/toolchain-buildroot/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
toolchain/toolchain-buildroot/Config.in +1 -1
index 2f6624d217..75e8191f46 100644
@@ -22,7 +22,7 @@ config BR2_TOOLCHAIN_BUILDROOT_VENDOR
 
 choice
 	prompt "C library"
-	default BR2_TOOLCHAIN_UCLIBC
+	default BR2_TOOLCHAIN_BUILDROOT_UCLIBC
 	default BR2_TOOLCHAIN_BUILDROOT_GLIBC if BR2_powerpc64
 
 config BR2_TOOLCHAIN_BUILDROOT_UCLIBC
Signature · 1 line
2.16.3
author
#1 lore raw

PATCH v2 2/2 package/libmediaart: Fix config prefix

Options should be prefixed by BR2_PACKAGE_LIBMEDIAART and not BR2_PACKAGE_MEDIAART, but package was using both prefixes.

We cannot put old options into Config.in.legacy, because those options are part of a Kconfig choice, and it's not possible to select an item of a choice.

This was found as default symbol was defined as BR2_PACKAGE_LIBMEDIAART_BACKEND_NONE (correct prefix), but symbol was actually BR2_PACKAGE_MEDIAART_BACKEND_NONE).

Fixes c443830a57 libmediaart: new package

---
Changes v1->v2:
* Change package prefix to BR2_PACKAGE_LIBMEDIAART as BR2_PACKAGE_MEDIAART is wrong (asked by Thomas).

Kind regards,
Petr

---
 package/libmediaart/Config.in      | 8 ++++----
 package/libmediaart/libmediaart.mk | 6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)
package/libmediaart/Config.in +4 -4
index e5e770d4fc..e073677395 100644
@@ -20,17 +20,17 @@ choice
 	prompt "media art backend"
 	default BR2_PACKAGE_LIBMEDIAART_BACKEND_NONE
 
-config BR2_PACKAGE_MEDIAART_BACKEND_NONE
+config BR2_PACKAGE_LIBMEDIAART_BACKEND_NONE
 	bool "none"
 	help
 	  With no backend, libmediaart will not be able to process MP3
 	  album art.
 
-config BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF
+config BR2_PACKAGE_LIBMEDIAART_BACKEND_GDK_PIXBUF
 	bool "gdk-pixbuf"
 	select BR2_PACKAGE_GDK_PIXBUF
 
-config BR2_PACKAGE_MEDIAART_BACKEND_QT
+config BR2_PACKAGE_LIBMEDIAART_BACKEND_QT
 	bool "Qt"
 	depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5
 	select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_QT
@@ -41,4 +41,4 @@ comment "Qt backend depends on Qt or Qt5"
 
 endchoice
 
-endif # BR2_PACKAGE_MEDIAART
+endif # BR2_PACKAGE_LIBMEDIAART
package/libmediaart/libmediaart.mk +3 -3
index db4f1fa2a1..f64210c266 100644
@@ -15,12 +15,12 @@ LIBMEDIAART_INSTALL_STAGING = YES
 LIBMEDIAART_DEPENDENCIES = libglib2
 LIBMEDIAART_CONF_OPTS = --disable-unit-tests
 
-ifeq ($(BR2_PACKAGE_MEDIAART_BACKEND_GDK_PIXBUF),y)
+ifeq ($(BR2_PACKAGE_LIBMEDIAART_BACKEND_GDK_PIXBUF),y)
 LIBMEDIAART_DEPENDENCIES += gdk-pixbuf
 LIBMEDIAART_CONF_OPTS += \
 	--enable-gdkpixbuf \
 	--disable-qt
-else ifeq ($(BR2_PACKAGE_MEDIAART_BACKEND_QT),y)
+else ifeq ($(BR2_PACKAGE_LIBMEDIAART_BACKEND_QT),y)
 # qt5 needs c++11 (since qt-5.7)
 ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
 LIBMEDIAART_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11"
@@ -31,7 +31,7 @@ LIBMEDIAART_DEPENDENCIES += \
 LIBMEDIAART_CONF_OPTS += \
 	--disable-gdkpixbuf \
 	--enable-qt
-else ifeq ($(BR2_PACKAGE_MEDIAART_BACKEND_NONE),y)
+else ifeq ($(BR2_PACKAGE_LIBMEDIAART_BACKEND_NONE),y)
 LIBMEDIAART_CONF_OPTS += \
 	--disable-gdkpixbuf \
 	--disable-qt
Signature · 1 line
2.16.3
#2 lore raw

PATCH v2 1/2 toolchain/buildroot: Fix symbol for uClibc

In reply to Petr Vorel

Ricardo,

Quoted 15 lines · Petr Vorel

Symbol BR2_TOOLCHAIN_UCLIBC doesn't exist, it was meant to be BR2_TOOLCHAIN_BUILDROOT_UCLIBC.

Fixes 493b1177b9 toolchain/buildroot: default to uClibc
---
 toolchain/toolchain-buildroot/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
toolchain/toolchain-buildroot/Config.in +0 -0
index 2f6624d217..75e8191f46 100644

toolchain/toolchain-buildroot/Config.in config BR2_TOOLCHAIN_BUILDROOT_VENDOR · line 25

Quoted 5 lines
toolchain/toolchain-buildroot/Config.in +1 -1
@@ -22,7 +22,7 @@ config BR2_TOOLCHAIN_BUILDROOT_VENDOR
 
 choice
 	prompt "C library"
-	default BR2_TOOLCHAIN_UCLIBC
+	default BR2_TOOLCHAIN_BUILDROOT_UCLIBC

Just like I added a checker in check-package to verify automatically the issue raised by PATCH 2/2 of Petr's series [1], I wanted to add a checker to detect the problem raised by this patch.

My idea was to have something that:

(1) Collects options defined by "config BR2_<something>"

(2) Collects references to option, in "select", "depends on", "default" clauses, etc.

(3) Ensures that all references to options have a matching option definition.

However, this requires a global pass on all Config.in files to do (1) and (2) before doing (3), and I'm not sure how this fits in the current check-package logic, which seems very per-file oriented.

What do you think about this ? Should this be done as part of check-package, or a separate checker ?

Best regards,

Thomas

[1] http://patchwork.ozlabs.org/patch/910991/

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH v2 1/2 toolchain/buildroot: Fix symbol for uClibc

Hello,

Quoted 18 lines · Thomas Petazzoni

toolchain/toolchain-buildroot/Config.in config BR2_TOOLCHAIN_BUILDROOT_VENDOR · line 25

Quoted 2 lines · Petr Vorel
toolchain/toolchain-buildroot/Config.in +1 -1
-	default BR2_TOOLCHAIN_UCLIBC
+	default BR2_TOOLCHAIN_BUILDROOT_UCLIBC

Just like I added a checker in check-package to verify automatically the issue raised by PATCH 2/2 of Petr's series [1], I wanted to add a checker to detect the problem raised by this patch.

My idea was to have something that:

(1) Collects options defined by "config BR2_<something>"

(2) Collects references to option, in "select", "depends on", "default" clauses, etc.

(3) Ensures that all references to options have a matching option definition.

Quoted 6 lines

However, this requires a global pass on all Config.in files to do (1) and (2) before doing (3), and I'm not sure how this fits in the current check-package logic, which seems very per-file oriented.

What do you think about this ? Should this be done as part of check-package, or a separate checker ?

A separate checker seems more suitable in this case.

Since it will find global inconsistencies it creates two large databases to be compared against each other, so running this when creating or changing any package may be too much.
But it seems nice to have it as another job on Gitlab to warn us as soon an inconsistency is detected.
And when people change a package with lots of dependencies it can be run locally.

Regards,
Ricardo

#4 lore raw

PATCH v2 1/2 toolchain/buildroot: Fix symbol for uClibc

In reply to Petr Vorel

Hello,

Quoted 9 lines · Petr Vorel

Symbol BR2_TOOLCHAIN_UCLIBC doesn't exist, it was meant to be BR2_TOOLCHAIN_BUILDROOT_UCLIBC.

Fixes 493b1177b9 toolchain/buildroot: default to uClibc
---
 toolchain/toolchain-buildroot/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com