summaryrefslogtreecommitdiff
path: root/menu
diff options
context:
space:
mode:
authorhpa <hpa>2004-02-02 08:42:51 +0000
committerhpa <hpa>2004-02-02 08:42:51 +0000
commit72f56f67080da2f15c65ccaa540ef4ca32fd0d05 (patch)
treef78f49d27cb70e0363b5b55fcb982d6f98b30b58 /menu
parent3edbc5585266a34df2b8708b86fc95bf667c00ed (diff)
downloadsyslinux-72f56f67080da2f15c65ccaa540ef4ca32fd0d05.tar.gz
Include stuff for x86-64 compatibility
Diffstat (limited to 'menu')
-rw-r--r--menu/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/menu/Makefile b/menu/Makefile
index 4824f05c..4c35dbb2 100644
--- a/menu/Makefile
+++ b/menu/Makefile
@@ -1,7 +1,13 @@
-CC = gcc -funsigned-char -W -Wall
-CFLAGS = -march=i386 -Os
+gcc_ok = $(shell if gcc $(1) -c -x c /dev/null -o /dev/null 2>/dev/null; \
+ then echo $(1); else echo $(2); fi)
+
+M32 := $(call gcc_ok,-m32,)
+ALIGN := $(call gcc_ok,-falign-functions=0 -falign-jumps=0 -falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0)
+
+CC = gcc $(M32) -funsigned-char
+CFLAGS = -g -W -Wall -march=i386 $(ALIGN) -Os
AS = as
-LD = ld
+LD = ld -m elf_i386
OBJCOPY = objcopy
.SUFFIXES: .c .s .s16 .o16 .elf .com