diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-01-17 17:42:31 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-01-17 17:42:31 +0000 |
commit | ec669a14ab680da475cd1e16b588f164462c0d78 (patch) | |
tree | 89d07e330ae0930f79128aa69929c0461a276eef /nuttx/configs/sim/nx/Make.defs | |
parent | 7067857b49223d259878a3c479f05d7e1bd2b19f (diff) | |
download | px4-nuttx-ec669a14ab680da475cd1e16b588f164462c0d78.tar.gz px4-nuttx-ec669a14ab680da475cd1e16b588f164462c0d78.tar.bz2 px4-nuttx-ec669a14ab680da475cd1e16b588f164462c0d78.zip |
Add support for building 32-bit simulation on a 64-bit target
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4307 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/sim/nx/Make.defs')
-rw-r--r-- | nuttx/configs/sim/nx/Make.defs | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/nuttx/configs/sim/nx/Make.defs b/nuttx/configs/sim/nx/Make.defs index 70f6066e1..91e42aced 100644 --- a/nuttx/configs/sim/nx/Make.defs +++ b/nuttx/configs/sim/nx/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/sim/nx/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 |