Skip to contentSkip to conversation

migration-5.2: Add entries for virtual provider and multiconfig changes

PATCH In review Antonin Godard 2 participants 5 messages Feb 7, 2025

lore
Share & tools
lore
#0 lore raw

v3 cover migration-5.2: Add entries for virtual provider and multiconfig changes

Notes:
* original patch by Richard Purdie:
https://lore.kernel.org/r/[email protected]
This patch is just reformatting/typo fixes.
* The BB_CURRENT_MC should ideally be documented, but that will come at a later point with
https://bugzilla.yoctoproject.org/show_bug.cgi?id=15709.

---
Changes in v3:
- Review by Quentin:
- Rephrase virtual provider change to state that the examples are not
complete and link to breaking commit to show more examples.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Split BB_CURRENT_MC and virtual changes in two commits
- Review from Quentin (thanks!):
- virtual changes:
- Add more examples to instruct how a user should migrate
- remove spurious "-" in example
- BB_CURRENT_MC:
- suggest to update logic based on BB_CURRENT_MC
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Antonin Godard (2):
migration-5.2: document BB_CURRENT_MC default value change migration-5.2: add virtual provider change

 documentation/migration-guides/migration-5.2.rst | 46 ++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

---
base-commit: e6745669cc26de8f61d5d1ccdd5a95b552eece97
change-id: 20250129-migration-5-2-updates-cb613b02bd35

Best regards,

Signature · 1 line
Antonin Godard <[email protected]>
#1 lore raw

PATCH v3 1/2 migration-5.2: document BB_CURRENT_MC default value change

After commit 0fa0d8d764bb ("cooker/cache: Drop mc 'default' string value") in Bitbake, the default value of BB_CURRENT_MC was changed from "default" to an empty string. Document it.

---
 documentation/migration-guides/migration-5.2.rst | 11 +++++++++++
 1 file changed, 11 insertions(+)
documentation/migration-guides/migration-5.2.rst +11 -0
index e9de6910e..a60e3e9a8 100644
@@ -94,6 +94,17 @@ systemd changes
    not for socket files).
    Now all service files must be explicitly added to :term:`FILES`.
 
+Multiconfig changes
+~~~~~~~~~~~~~~~~~~~
+
+The value of ``BB_CURRENT_MC`` was changed from ``default`` to an empty string
+for the default multiconfig configuration to avoid needing to map the values
+within BitBake. This was already not happening in some cases so this fixes
+some obscure bugs.
+
+Any logic based on ``BB_CURRENT_MC`` equalling to ``default`` by default should
+be changed to be equal to an empty string.
+
 Recipe changes
 ~~~~~~~~~~~~~~
 
Signature · 1 line
2.47.0
Reviewed-by on v3 1/2
#2 lore raw

Re: [PATCH v3 1/2] migration-5.2: document BB_CURRENT_MC default value change

Hi Antonin,

Quoted 6 lines · Antonin Godard

After commit 0fa0d8d764bb ("cooker/cache: Drop mc 'default' string value") in Bitbake, the default value of BB_CURRENT_MC was changed from "default" to an empty string. Document it.

Thanks!
Quentin

#3 lore raw

PATCH v3 2/2 migration-5.2: add virtual provider change

In reply to Antonin Godard

The commit 4ccc3bc8266c ("classes/recipes: Switch virtual/XXX-gcc to virtual/cross-cc (and c++/binutils)") in OE-Core changes the virtual/XXX-gcc to virtual/cross-cc (and c++/binutils) syntax. Add it to the migration manual.

---
 documentation/migration-guides/migration-5.2.rst | 35 ++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
documentation/migration-guides/migration-5.2.rst +35 -0
index a60e3e9a8..2e9095bfb 100644
@@ -105,6 +105,41 @@ some obscure bugs.
 Any logic based on ``BB_CURRENT_MC`` equalling to ``default`` by default should
 be changed to be equal to an empty string.
 
+Virtual toolchain provider changes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Support was added for virtual providers on a per-recipe basis for specific
+key toolchain providers listed in ``BB_VIRTUAL_RECIPE_PROVIDERS``. As part of
+that support, the ``cross`` providers were simplified to remove the triplet
+prefix (:term:`TARGET_PREFIX`, :term:`SDK_PREFIX` and :term:`HOST_PREFIX`) and
+generalise the naming. Here are example of how references to these variables
+can be changed to use the new ``cross`` syntax::
+
+   virtual/${HOST_PREFIX}binutils -> virtual/cross-binutils
+   virtual/${TARGET_PREFIX}binutils -> virtual/cross-binutils
+
+   virtual/${HOST_PREFIX}gcc -> virtual/cross-cc
+   virtual/${TARGET_PREFIX}gcc -> virtual/cross-cc
+   virtual/${SDK_PREFIX}gcc -> virtual/nativesdk-cross-cc
+
+   virtual/${HOST_PREFIX}compilerlibs -> virtual/compilerlibs
+   virtual/${TARGET_PREFIX}compilerlibs -> virtual/compilerlibs
+   virtual/nativesdk-${SDK_PREFIX}compilerlibs -> virtual/nativesdk-compilerlibs
+
+   virtual/${TARGET_PREFIX}g++ -> virtual/cross-c++
+
+A :term:`PREFERRED_PROVIDER` assignment can be transformed as follows::
+
+   PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils -> PREFERRED_PROVIDER_virtual/cross-binutils
+   PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils -> PREFERRED_PROVIDER_virtual/cross-binutils:class-nativesdk
+   PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ -> PREFERRED_PROVIDER_virtual/nativesdk-cross-c++
+
+The above examples should cover most cases, but there might be situations where
+replacing is not as straightforward. For more examples, see the commit
+:oe_git:`"classes/recipes: Switch virtual/XXX-gcc to virtual/cross-cc (and
+c++/binutils)" </openembedded-core/commit/?id=4ccc3bc8266c>` in
+:term:`OpenEmbedded-Core (OE-Core)`.
+
 Recipe changes
 ~~~~~~~~~~~~~~
 
Signature · 1 line
2.47.0
Reviewed-by on v3 2/2
#4 lore raw

Re: [PATCH v3 2/2] migration-5.2: add virtual provider change

Hi Antonin,

Quoted 17 lines · Antonin Godard

The commit 4ccc3bc8266c ("classes/recipes: Switch virtual/XXX-gcc to virtual/cross-cc (and c++/binutils)") in OE-Core changes the virtual/XXX-gcc to virtual/cross-cc (and c++/binutils) syntax. Add it to the migration manual.

---
  documentation/migration-guides/migration-5.2.rst | 35 ++++++++++++++++++++++++
  1 file changed, 35 insertions(+)
documentation/migration-guides/migration-5.2.rst +0 -0
index a60e3e9a8..2e9095bfb 100644
@@ -105,6 +105,41 @@ some obscure bugs.
  Any logic based on ``BB_CURRENT_MC`` equalling to ``default`` by default should

documentation/migration-guides/migration-5.2.rst some obscure bugs. · line 115

Quoted 10 lines
documentation/migration-guides/migration-5.2.rst +8 -0
  be changed to be equal to an empty string.
 
+Virtual toolchain provider changes
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Support was added for virtual providers on a per-recipe basis for specific
+key toolchain providers listed in ``BB_VIRTUAL_RECIPE_PROVIDERS``. As part of
+that support, the ``cross`` providers were simplified to remove the triplet
+prefix (:term:`TARGET_PREFIX`, :term:`SDK_PREFIX` and :term:`HOST_PREFIX`) and
+generalise the naming. Here are example of how references to these variables

s/example/examples?

With that changed,

Thanks!
Quentin