utils/check-symbols: allow BR2_BROKEN to be unused
PATCH 1/1 utils/check-symbols: allow BR2_BROKEN to be unused
Commit [1] introduced the BR2_BROKEN hidden symbol. The intent of this symbol is to temporarily mark a configuration known to be broken. This commit was added to fix an undefined usage of the symbol, in a previous commit [2].
With this somewhat special symbol, it is also perfectly normal to have no use of it.
Running the command "utils/check-symbols" in a state there is no usage of the BR2_BROKEN, the script fails with output:
Config.in:15: BR2_BROKEN defined but not referenced
This commit adds an exception for this symbol, allowing it to be unused in the whole Buildroot tree.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/8925433382
[1] https://gitlab.com/buildroot.org/buildroot/-/commit/2ddc5808cd19f577917566ad83e2a3835d6d43b9
[2] https://gitlab.com/buildroot.org/buildroot/-/commit/11a8cdd2bbbd0ef4adf600e4792d75f6f2122ec8
---
Patch tested in:
https://gitlab.com/jolivain/buildroot/-/jobs/8937458243
--- utils/checksymbolslib/br.py | 4 ++++ utils/checksymbolslib/db.py | 2 ++ 2 files changed, 6 insertions(+)
utils/checksymbolslib/br.py +4 -0
@@ -45,6 +45,10 @@ symbols_not_defined_for_fake_virtual_packages = [ 'BR2_PACKAGE_PROVIDES_TOOLCHAIN_BUILDROOT', 'BR2_PACKAGE_PROVIDES_TOOLCHAIN_BARE_METAL_BUILDROOT', ] +# Config.in +symbols_possibly_unused = [ + 'BR2_BROKEN', +] # fs/common.mk suffixes_not_defined_for_all_rootfs_types = [ '_BZIP2',
utils/checksymbolslib/db.py +2 -0
@@ -155,6 +155,8 @@ class DB: continue if legacy_usage in entries: continue + if symbol in br.symbols_possibly_unused: + continue if symbol in br.symbols_used_only_in_source_code: continue if symbol in br.symbols_used_only_for_host_variant:
Signature · 6 lines
2.48.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Romain Naour via buildroot
AppliedHello Julien, All,
Le 23/01/2025 à 22:35, Julien Olivain a écrit :
Quoted 13 lines
Commit [1] introduced the
BR2_BROKENhidden symbol. The intent of this symbol is to temporarily mark a configuration known to be broken. This commit was added to fix an undefined usage of the symbol, in a previous commit [2].With this somewhat special symbol, it is also perfectly normal to have no use of it.
Running the command "utils/check-symbols" in a state there is no usage of the
BR2_BROKEN, the script fails with output:Config.in:15:
BR2_BROKENdefined but not referenced
Quoted 8 lines
This commit adds an exception for this symbol, allowing it to be unused in the whole Buildroot tree.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/8925433382[1] https://gitlab.com/buildroot.org/buildroot/-/commit/2ddc5808cd19f577917566ad83e2a3835d6d43b9
[2] https://gitlab.com/buildroot.org/buildroot/-/commit/11a8cdd2bbbd0ef4adf600e4792d75f6f2122ec8
Tested locally by removing BR2_BROKEN from ARC external toolchain.
Applied to master, thanks.
Best regards,
Romain
Quoted 30 lines
Signed-off-by Julien Olivain <[email protected]>---
Patch tested in:
https://gitlab.com/jolivain/buildroot/-/jobs/8937458243--- utils/checksymbolslib/br.py | 4 ++++ utils/checksymbolslib/db.py | 2 ++ 2 files changed, 6 insertions(+)utils/checksymbolslib/br.py +4
-0@@ -45,6 +45,10 @@ symbols_not_defined_for_fake_virtual_packages = [ 'BR2_PACKAGE_PROVIDES_TOOLCHAIN_BUILDROOT', 'BR2_PACKAGE_PROVIDES_TOOLCHAIN_BARE_METAL_BUILDROOT', ] +# Config.in +symbols_possibly_unused = [ + 'BR2_BROKEN', +] # fs/common.mk suffixes_not_defined_for_all_rootfs_types = [ '_BZIP2',utils/checksymbolslib/db.py +0
-0
utils/checksymbolslib/db.py class DB: · line 162
Quoted 8 lines
utils/checksymbolslib/db.py +2
-0@@ -155,6 +155,8 @@ class DB: continue if legacy_usage in entries: continue + if symbol in br.symbols_possibly_unused: + continue if symbol in br.symbols_used_only_in_source_code: continue if symbol in br.symbols_used_only_for_host_variant:
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour via buildroot <[email protected]> writes:
Hello Julien, All,
Le 23/01/2025 à 22:35, Julien Olivain a écrit :Quoted 19 lines
Commit [1] introduced the
BR2_BROKENhidden symbol. The intent of this symbol is to temporarily mark a configuration known to be broken. This commit was added to fix an undefined usage of the symbol, in a previous commit [2].With this somewhat special symbol, it is also perfectly normal to have no use of it.
Running the command "utils/check-symbols" in a state there is no usage of the
BR2_BROKEN, the script fails with output:Config.in:15:
BR2_BROKENdefined but not referencedThis commit adds an exception for this symbol, allowing it to be unused in the whole Buildroot tree.
Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/8925433382
Quoted 6 lines
Quoted 2 lines
[1] https://gitlab.com/buildroot.org/buildroot/-/commit/2ddc5808cd19f577917566ad83e2a3835d6d43b9
[2] https://gitlab.com/buildroot.org/buildroot/-/commit/11a8cdd2bbbd0ef4adf600e4792d75f6f2122ec8Tested locally by removing
BR2_BROKENfrom ARC external toolchain.Applied to master, thanks.
Committed to 2024.11.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot