diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-01-18 07:38:50 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-01-18 07:38:50 -0600 |
commit | 1cc717520d36623c08f8b60f9cd7fede1bd8f1c1 (patch) | |
tree | e6b405ac17b052a1ab9bdfb0286f08eff0e8dea6 /nuttx/configs/qemu-i486 | |
parent | 4f8b0d0a714a7f8302e876e217e8f49e2c5901d5 (diff) | |
download | px4-nuttx-1cc717520d36623c08f8b60f9cd7fede1bd8f1c1.tar.gz px4-nuttx-1cc717520d36623c08f8b60f9cd7fede1bd8f1c1.tar.bz2 px4-nuttx-1cc717520d36623c08f8b60f9cd7fede1bd8f1c1.zip |
X86: Add a configuration option to select the -m32 compiler option when needed
Diffstat (limited to 'nuttx/configs/qemu-i486')
-rw-r--r-- | nuttx/configs/qemu-i486/nsh/Make.defs | 12 | ||||
-rw-r--r-- | nuttx/configs/qemu-i486/ostest/Make.defs | 12 |
2 files changed, 10 insertions, 14 deletions
diff --git a/nuttx/configs/qemu-i486/nsh/Make.defs b/nuttx/configs/qemu-i486/nsh/Make.defs index acd5a6ce9..1bd412f9e 100644 --- a/nuttx/configs/qemu-i486/nsh/Make.defs +++ b/nuttx/configs/qemu-i486/nsh/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/qemu-i486/nsh/Make.defs # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2011, 2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -69,11 +69,10 @@ 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 +# Check if building a 32-bit target with a 64-bit toolchain + +ifeq ($(ARCH_X86_M32),y) +ARCHCPUFLAGS += -m32 endif # We have to use a cross-development toolchain under Cygwin because the native @@ -105,7 +104,6 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif - MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc diff --git a/nuttx/configs/qemu-i486/ostest/Make.defs b/nuttx/configs/qemu-i486/ostest/Make.defs index 937588fc2..0ed7cc3df 100644 --- a/nuttx/configs/qemu-i486/ostest/Make.defs +++ b/nuttx/configs/qemu-i486/ostest/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/qemu-i486/ostest/Make.defs # -# Copyright (C) 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2011, 2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -69,11 +69,10 @@ 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 +# Check if building a 32-bit target with a 64-bit toolchain + +ifeq ($(ARCH_X86_M32),y) +ARCHCPUFLAGS += -m32 endif # We have to use a cross-development toolchain under Cygwin because the native @@ -105,7 +104,6 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif - MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc |