diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-01-17 17:42:31 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-01-17 17:42:31 +0000 |
commit | cd87a3e08c89b1367b2d9d966995f77efccb62e2 (patch) | |
tree | 89d07e330ae0930f79128aa69929c0461a276eef /nuttx/configs/sim/nsh/Make.defs | |
parent | 63b73c4b171ee165c19dec92eff9a07acbb9393b (diff) |
Add support for building 32-bit simulation on a 64-bit target
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4307 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/configs/sim/nsh/Make.defs')
-rw-r--r-- | nuttx/configs/sim/nsh/Make.defs | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/nuttx/configs/sim/nsh/Make.defs b/nuttx/configs/sim/nsh/Make.defs index 1330ade1e0..83bc35d76b 100644 --- a/nuttx/configs/sim/nsh/Make.defs +++ b/nuttx/configs/sim/nsh/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/sim/nsh/Make.defs # -# Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -53,6 +53,11 @@ ARCHINCLUDES = -I. -isystem $(TOPDIR)/include ARCHINCLUDESXX = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx ARCHSCRIPT = +ifeq ($(CONFIG_SIM_M32),y) + ARCHCPUFLAGS += -m32 + ARCHCPUFLAGSXX += -m32 +endif + CROSSDEV = CC = $(CROSSDEV)gcc CXX = $(CROSSDEV)g++ @@ -79,8 +84,20 @@ else EXEEXT = endif -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") - LDFLAGS += -g +LDLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(LD) +CCLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(CC) +LDFLAGS = $(ARCHSCRIPT) # For backward compatibility, same as CCLINKFLAGS + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDLINKFLAGS += -g + CCLINKFLAGS += -g + LDFLAGS += -g +endif + +ifeq ($(CONFIG_SIM_M32),y) + LDLINKFLAGS += -melf_i386 + CCLINKFLAGS += -m32 + LDFLAGS += -m32 endif define PREPROCESS |