libstand: Make sure that -march=i386 is specified
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 22 Feb 2011 12:03:40 +0000 (20:03 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 22 Feb 2011 14:03:57 +0000 (22:03 +0800)
This unbreaks the loader compiled by gcc44

lib/libstand/Makefile

index 390df95..caff104 100644 (file)
@@ -18,13 +18,14 @@ WARNS?=             2
 # Mostly OK, some of the libc imports are a bit noisy
 CFLAGS+=       -ffreestanding
 
-.if ${MACHINE_ARCH} == "x86_64"
-CFLAGS+=       -m32 -mpreferred-stack-boundary=2
-.endif
-.if ${MACHINE_ARCH} == "i386"
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 CFLAGS+=       -mpreferred-stack-boundary=2
+CPUTYPE=       i386
 .endif
 
+.if ${MACHINE_ARCH} == "x86_64"
+CFLAGS+=       -m32
+.endif
 
 # standalone components and stuff we have modified locally
 SRCS+= __main.c assert.c bcd.c bswap.c environment.c getopt.c gets.c \