diff options
Diffstat (limited to 'menu/Makefile')
-rw-r--r-- | menu/Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/menu/Makefile b/menu/Makefile index cee1c3af..702f4563 100644 --- a/menu/Makefile +++ b/menu/Makefile @@ -14,8 +14,10 @@ ## samples for syslinux users ## -gcc_ok = $(shell if gcc $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \ - then echo $(1); else echo $(2); fi) +TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX) + +gcc_ok = $(shell tmpf=$(TMPFILE); if gcc $(1) -c -x c /dev/null -o $$tmpf 2>/dev/null; \ + then echo $(1); else echo $(2); fi; rm -f $$tmpf) M32 := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,) |