aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-03-05 22:31:00 -0800
committerH. Peter Anvin <hpa@zytor.com>2008-03-05 22:31:00 -0800
commitb890569a44cf9c5afce6e5ca648dc9b589e964f9 (patch)
tree46486515da83614a11e47d769609384e4304f9b7
parent2bffa92fff3d9670fb9a4b62596435a137ae1b3c (diff)
downloadsyslinux-elf-b890569a44cf9c5afce6e5ca648dc9b589e964f9.tar.gz
syslinux-elf-b890569a44cf9c5afce6e5ca648dc9b589e964f9.tar.xz
syslinux-elf-b890569a44cf9c5afce6e5ca648dc9b589e964f9.zip
Use $(CC) in gcc_ok macro, not plain gcc
Use $(CC) in gcc_ok macro, not plain gcc. This seems to work, iff the gcc_ok macro is declared with =, not :=
-rw-r--r--Makefile2
-rw-r--r--com32/libutil/Makefile2
-rw-r--r--com32/modules/Makefile2
-rw-r--r--com32/samples/Makefile4
-rw-r--r--dos/Makefile2
-rw-r--r--extlinux/Makefile2
-rw-r--r--mbr/Makefile2
-rw-r--r--memdisk/Makefile2
-rw-r--r--memdump/Makefile2
-rw-r--r--menu/Makefile2
-rw-r--r--mtools/Makefile2
-rw-r--r--sample/Makefile2
-rw-r--r--unix/Makefile2
13 files changed, 14 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 49bb5ecc..cde7db04 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ MAKEFLAGS = -r
TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
-gcc_ok = $(shell tmpf=$(TMPFILE); if gcc $(1) dummy.c -o $$tmpf 2>/dev/null; \
+gcc_ok = $(shell tmpf=$(TMPFILE); if $(CC) $(1) dummy.c -o $$tmpf 2>/dev/null; \
then echo '$(1)'; else echo '$(2)'; fi; rm -f $$tmpf)
comma := ,
diff --git a/com32/libutil/Makefile b/com32/libutil/Makefile
index 45e21607..5514f8b6 100644
--- a/com32/libutil/Makefile
+++ b/com32/libutil/Makefile
@@ -31,7 +31,7 @@
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; \
+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,-fno-stack-protector,)
diff --git a/com32/modules/Makefile b/com32/modules/Makefile
index 4849d1cd..8a127e62 100644
--- a/com32/modules/Makefile
+++ b/com32/modules/Makefile
@@ -16,7 +16,7 @@
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; \
+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,-fno-stack-protector,)
diff --git a/com32/samples/Makefile b/com32/samples/Makefile
index 177f351e..2c2406f7 100644
--- a/com32/samples/Makefile
+++ b/com32/samples/Makefile
@@ -16,7 +16,7 @@
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; \
+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,-fno-stack-protector,)
@@ -49,7 +49,7 @@ all: hello.c32 cat.c32 resolv.c32 vesainfo.c32 serialinfo.c32 \
localboot.c32 \
fancyhello.c32 fancyhello.lnx \
keytest.c32 keytest.lnx \
- advdump.c32
+ advdump.c32 readpit.c32
.PRECIOUS: %.o
%.o: %.S
diff --git a/dos/Makefile b/dos/Makefile
index ad202ee8..4f344f49 100644
--- a/dos/Makefile
+++ b/dos/Makefile
@@ -1,6 +1,6 @@
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; \
+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,) \
diff --git a/extlinux/Makefile b/extlinux/Makefile
index 908d1ce5..9dd7ec94 100644
--- a/extlinux/Makefile
+++ b/extlinux/Makefile
@@ -1,6 +1,6 @@
TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
-gcc_ok = $(shell tmpf=$(TMPFILE); if gcc $(1) ../dummy.c -o $$tmpf 2>/dev/null; \
+gcc_ok = $(shell tmpf=$(TMPFILE); if $(CC) $(1) ../dummy.c -o $$tmpf 2>/dev/null; \
then echo '$(1)'; else echo '$(2)'; fi; rm -f $$tmpf)
comma := ,
diff --git a/mbr/Makefile b/mbr/Makefile
index a64869b1..6a1bcb7b 100644
--- a/mbr/Makefile
+++ b/mbr/Makefile
@@ -16,7 +16,7 @@
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; \
+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)
diff --git a/memdisk/Makefile b/memdisk/Makefile
index e90c72cf..d9cc7f9f 100644
--- a/memdisk/Makefile
+++ b/memdisk/Makefile
@@ -14,7 +14,7 @@ VERSION := $(shell cat ../version)
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; \
+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,)
diff --git a/memdump/Makefile b/memdump/Makefile
index 40497028..585381d6 100644
--- a/memdump/Makefile
+++ b/memdump/Makefile
@@ -1,6 +1,6 @@
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; \
+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,)
diff --git a/menu/Makefile b/menu/Makefile
index 512f61aa..58c0e2f0 100644
--- a/menu/Makefile
+++ b/menu/Makefile
@@ -16,7 +16,7 @@
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; \
+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,-fno-stack-protector,)
diff --git a/mtools/Makefile b/mtools/Makefile
index 4b52cb67..7175bb3f 100644
--- a/mtools/Makefile
+++ b/mtools/Makefile
@@ -1,6 +1,6 @@
TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
-gcc_ok = $(shell tmpf=$(TMPFILE); if gcc $(1) ../dummy.c -o $$tmpf 2>/dev/null; \
+gcc_ok = $(shell tmpf=$(TMPFILE); if $(CC) $(1) ../dummy.c -o $$tmpf 2>/dev/null; \
then echo '$(1)'; else echo '$(2)'; fi; rm -f $$tmpf)
comma := ,
diff --git a/sample/Makefile b/sample/Makefile
index bd64e906..3ed7907e 100644
--- a/sample/Makefile
+++ b/sample/Makefile
@@ -16,7 +16,7 @@
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; \
+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,)
diff --git a/unix/Makefile b/unix/Makefile
index 75f7cba2..8d92d3a2 100644
--- a/unix/Makefile
+++ b/unix/Makefile
@@ -1,6 +1,6 @@
TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
-gcc_ok = $(shell tmpf=$(TMPFILE); if gcc $(1) ../dummy.c -o $$tmpf 2>/dev/null; \
+gcc_ok = $(shell tmpf=$(TMPFILE); if $(CC) $(1) ../dummy.c -o $$tmpf 2>/dev/null; \
then echo '$(1)'; else echo '$(2)'; fi; rm -f $$tmpf)
comma := ,