diff --git a/Makefile b/Makefile index 4948b7f5b1..5c9b8a803b 100644 --- a/Makefile +++ b/Makefile @@ -60,6 +60,11 @@ override O := $(patsubst %/,%,$(patsubst %.,%,$(O))) # avoid empty CANONICAL_O in case on non-existing entry. CANONICAL_O := $(shell mkdir -p $(O) >/dev/null 2>&1)$(realpath $(O)) +# gcc fails to build when the srcdir contains a '@' +ifneq ($(findstring @,$(CANONICAL_O)),) +$(error The build directory can not contain a '@') +endif + CANONICAL_CURDIR = $(realpath $(CURDIR)) REQ_UMASK = 0022