aboutsummaryrefslogtreecommitdiff
path: root/Makefile.flags
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.flags')
-rw-r--r--Makefile.flags4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.flags b/Makefile.flags
index 68dfa57ec..92aae6fb5 100644
--- a/Makefile.flags
+++ b/Makefile.flags
@@ -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