From b2aa4ae2df85c12f7e12666fdec6854b2d6388cf Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 28 Aug 2011 12:32:14 +0000 Subject: [PATCH] More fixe for FreeBSD build git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3919 42af7a65-404d-4744-a932-0658087f49c3 --- configs/qemu-i486/nsh/Make.defs | 7 +++++++ configs/qemu-i486/ostest/Make.defs | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/configs/qemu-i486/nsh/Make.defs b/configs/qemu-i486/nsh/Make.defs index d18c802931..ff8d3dd6b7 100644 --- a/configs/qemu-i486/nsh/Make.defs +++ b/configs/qemu-i486/nsh/Make.defs @@ -66,6 +66,13 @@ ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHDEFINES = +ifeq ($(HOSTOS),FreeBSD) + HOST_ARCH = ${shell uname -m 2>/dev/null || echo "Other"} + ifeq ($(HOST_ARCH),amd64) + ARCHCPUFLAGS += -m32 + endif +endif + # We have to use a cross-development toolchain under Cygwin because the native # Cygwin toolchains don't generate ELF binaries. diff --git a/configs/qemu-i486/ostest/Make.defs b/configs/qemu-i486/ostest/Make.defs index 5851427e65..4a2d3bf083 100644 --- a/configs/qemu-i486/ostest/Make.defs +++ b/configs/qemu-i486/ostest/Make.defs @@ -66,6 +66,13 @@ ARCHPICFLAGS = -fpic ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHDEFINES = +ifeq ($(HOSTOS),FreeBSD) + HOST_ARCH = ${shell uname -m 2>/dev/null || echo "Other"} + ifeq ($(HOST_ARCH),amd64) + ARCHCPUFLAGS += -m32 + endif +endif + # We have to use a cross-development toolchain under Cygwin because the native # Cygwin toolchains don't generate ELF binaries.