[PATCH v2 10/16] environment: stub out environment API for PBL
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Nov 25 07:12:22 PST 2024
To optimize out calls to undefined functions in PBL at compile-time
instead of link time, let's define stubs for the functions that
are referenced in obj-pbl-y files, but inside function sections
that are ultimately unreferenced.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
include/environment.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/environment.h b/include/environment.h
index 8b143c16b7ad..bd863ad3f425 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -29,7 +29,7 @@ struct env_context *get_current_context(void);
char *var_val(struct variable_d *);
char *var_name(struct variable_d *);
-#ifdef CONFIG_ENVIRONMENT_VARIABLES
+#if IS_ENABLED(CONFIG_ENVIRONMENT_VARIABLES) && IN_PROPER
const char *getenv(const char *);
int setenv(const char *, const char *);
int pr_setenv(const char *, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3)));
--
2.39.5
More information about the barebox
mailing list