aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/MCONFIG
diff options
context:
space:
mode:
Diffstat (limited to 'com32/lib/MCONFIG')
-rw-r--r--com32/lib/MCONFIG6
1 files changed, 4 insertions, 2 deletions
diff --git a/com32/lib/MCONFIG b/com32/lib/MCONFIG
index 461ada44..781292ba 100644
--- a/com32/lib/MCONFIG
+++ b/com32/lib/MCONFIG
@@ -1,7 +1,9 @@
# -*- makefile -*-
-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)
GCCOPT := $(call gcc_ok,-m32,) $(call gcc_ok,-fno-stack-protector,)