diff options
author | hpa <hpa> | 2004-01-24 21:10:48 +0000 |
---|---|---|
committer | hpa <hpa> | 2004-01-24 21:10:48 +0000 |
commit | 38d4d8899db8a01100688dbc748f7abbc392c5b5 (patch) | |
tree | 70ce6f5e27f680160da50145330c46834d1a7dfc | |
parent | 15b63f152189d2cd0584b3e7051bac7dd697a14b (diff) | |
download | syslinux-38d4d8899db8a01100688dbc748f7abbc392c5b5.tar.gz |
Conditionally add -m32 to be able to compile in a 64-bit environment
-rw-r--r-- | memdisk/Makefile | 3 | ||||
-rw-r--r-- | sample/Makefile | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/memdisk/Makefile b/memdisk/Makefile index 9866db26..df01da2e 100644 --- a/memdisk/Makefile +++ b/memdisk/Makefile @@ -14,7 +14,8 @@ VERSION := $(shell cat ../version) CC = gcc -CFLAGS = -g -Wall -O2 -fomit-frame-pointer -march=i386 \ +M32 = $(shell if gcc -m32 -c -x c /dev/null -o /dev/null 2>/dev/null; then echo -m32 ; fi) +CFLAGS = $(M32) -g -Wall -O2 -fomit-frame-pointer -march=i386 \ -malign-functions=0 -malign-jumps=0 -malign-loops=0 \ -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"' LDFLAGS = -g diff --git a/sample/Makefile b/sample/Makefile index 8a2eb6de..8f81bdd9 100644 --- a/sample/Makefile +++ b/sample/Makefile @@ -20,7 +20,8 @@ LD = ld AR = ar NASM = nasm RANLIB = ranlib -CFLAGS = -march=i386 -O2 -fomit-frame-pointer -I../com32/include +M32 = $(shell if gcc -m32 -c -x c /dev/null -o /dev/null 2>/dev/null; then echo -m32 ; fi) +CFLAGS = $(M32) -march=i386 -O2 -fomit-frame-pointer -I../com32/include SFLAGS = -march=i386 LDFLAGS = -s OBJCOPY = objcopy |