aboutsummaryrefslogtreecommitdiffstats
path: root/sample/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sample/Makefile')
-rw-r--r--sample/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/sample/Makefile b/sample/Makefile
index cf0d3f19..d2a00f9b 100644
--- a/sample/Makefile
+++ b/sample/Makefile
@@ -16,12 +16,13 @@
TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
+CC = gcc
+
gcc_ok = $(shell tmpf=$(TMPFILE); if $(CC) $(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,-ffreestanding,) $(call gcc_ok,-fno-stack-protector,)
-CC = gcc
LD = ld -m elf_i386
AR = ar
NASM = nasm