build system: fix broken CONFIG_SYSROOT handling
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 7 Mar 2012 23:20:01 +0000 (00:20 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 7 Mar 2012 23:20:01 +0000 (00:20 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Makefile.flags

index 68dfa57ecff17bc88cdcd55bfa3577e2e6ae4c13..92aae6fb5e02daf870a0b4b1f92764d23bbd6d6d 100644 (file)
@@ -104,7 +104,9 @@ else
 LDLIBS += m
 endif
 
-ifneq ($(CONFIG_SYSROOT),)
+# Note: both "" (string consisting of two quote chars) and empty string
+# are possible, and should be skipped below.
+ifneq ($(subst "",,$(CONFIG_SYSROOT)),)
 CFLAGS += --sysroot=$(CONFIG_SYSROOT)
 export SYSROOT=$(CONFIG_SYSROOT)
 endif