libstand: Isolate gcc-specific flags, avoid native compilations
authorJohn Marino <draco@marino.st>
Sat, 25 Oct 2014 07:28:32 +0000 (09:28 +0200)
committerJohn Marino <draco@marino.st>
Sat, 25 Oct 2014 07:32:49 +0000 (09:32 +0200)
Only set -mpreferred-stack-boundary when using GCC.  While here, add
a bunch of flags that avoid cpu-specific instructions.  Similar flags
are seen in the boot code.

lib/libstand/Makefile

index d5cb42c..b40bc55 100644 (file)
@@ -19,7 +19,10 @@ WARNS?=              2
 CFLAGS+=       -ffreestanding
 
 .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+.if ${CCVER:Mgcc*}
 CFLAGS+=       -mpreferred-stack-boundary=2
+.endif
+CFLAGS+=       -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
 FORCE_CPUTYPE= i386
 .endif