Skip to contentSkip to conversation

api: Rework menu, and make it depend on CC_IS_GCC

PATCH In review Tom Rini 2 participants 3 messages Apr 6, 2023 – Apr 26, 2023

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 api: Rework menu, and make it depend on CC_IS_GCC

We can only use the old U-Boot API for standalone applications when building U-Boot with GCC as it relies upon the "gd is a register" trick that only GCC supports. Further, rework the rest of the options so that they are in the API menu and only visible if API support is enabled.

---
 api/Kconfig | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
api/Kconfig +4 -3
index 6072288f9bc2..b5a7399d7f3c 100644
@@ -1,13 +1,14 @@
-menu "API"
-
 config API
 	bool "Enable U-Boot API"
+	depends on CC_IS_GCC
 	help
 	  This option enables the U-Boot API. See api/README for more information.
 
+menu "API"
+	depends on API
+
 config SYS_MMC_MAX_DEVICE
 	int  "Maximum number of MMC devices exposed via the API"
-	depends on API
 	default 1
 
 config EXAMPLES
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Tom Rini

We can only use the old U-Boot API for standalone applications when building U-Boot with GCC as it relies upon the "gd is a register" trick that only GCC supports. Further, rework the rest of the options so that they are in the API menu and only visible if API support is enabled.

Quoted 6 lines
---
 api/Kconfig | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
author
#2 lore raw
In reply to Tom Rini
Quoted 8 lines · Tom Rini

We can only use the old U-Boot API for standalone applications when building U-Boot with GCC as it relies upon the "gd is a register" trick that only GCC supports. Further, rework the rest of the options so that they are in the API menu and only visible if API support is enabled.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom