Skip to contentSkip to conversation

defaultenv: fix empty CONFIG_DEFAULT_ENVIRONMENT_PATH

PATCH In review Jon Ringle 2 participants 2 messages Mar 22, 2011 – Mar 23, 2011

lore
Share & tools
lore

Jon Ringle

author
#0 lore raw

PATCH 1/1 defaultenv: fix empty CONFIG_DEFAULT_ENVIRONMENT_PATH

if CONFIG_DEFAULT_ENVIRONMENT_PATH="" then $(DEFAULT_ENVIRONMENT_PATH) expands to 'defaultenv "" '
The "" would cause every single file found in $(srctree) to be included in $(ENV_FILES). This would then cause scripts/mod/sumversions.c to get recompiled using $(CC) and fail compilation if $(CC) points to a newlib cross compiler

---
 common/Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
common/Makefile +3 -1
index 753455b..cda2ad1 100644
@@ -30,9 +30,11 @@ ifeq ($(CONFIG_DEFAULT_ENVIRONMENT_GENERIC),y)
 DEFAULT_ENVIRONMENT_PATH = "defaultenv"
 endif
 
+ifneq ($(CONFIG_DEFAULT_ENVIRONMENT_PATH),"")
 DEFAULT_ENVIRONMENT_PATH += $(CONFIG_DEFAULT_ENVIRONMENT_PATH)
+endif
 
-ENV_FILES := $(shell cd $(srctree); for i in $(DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f -exec readlink -f {} \;; done)
+ENV_FILES := $(shell cd $(srctree); for i in $(DEFAULT_ENVIRONMENT_PATH); do find $${i} -type f -exec readlink -f '{}' \;; done)
 
 endif # ifdef CONFIG_DEFAULT_ENVIRONMENT
 
Signature · 7 lines
1.7.0.4


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

Hi Jon,

Quoted 6 lines · Jon Ringle

if CONFIG_DEFAULT_ENVIRONMENT_PATH="" then $(DEFAULT_ENVIRONMENT_PATH) expands to 'defaultenv "" '
The "" would cause every single file found in $(srctree) to be included in $(ENV_FILES). This would then cause scripts/mod/sumversions.c to get recompiled using $(CC) and fail compilation if $(CC) points to a newlib cross compiler

Indeed an annoying bug. Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox