aboutsummaryrefslogtreecommitdiffstats
path: root/extlinux/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'extlinux/Makefile')
-rw-r--r--extlinux/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/extlinux/Makefile b/extlinux/Makefile
index 8d347a98..d2ea6f9b 100644
--- a/extlinux/Makefile
+++ b/extlinux/Makefile
@@ -1,5 +1,7 @@
-gcc_ok = $(shell if gcc $(1) ../dummy.c -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) ../dummy.c -o $$tmpf 2>/dev/null; \
+ then echo '$(1)'; else echo '$(2)'; fi; rm -f $$tmpf)
comma := ,
LDHASH := $(call gcc_ok,-Wl$(comma)--hash-style=both,)