From ec669a14ab680da475cd1e16b588f164462c0d78 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 17 Jan 2012 17:42:31 +0000 Subject: 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 --- nuttx/configs/sim/pashello/Make.defs | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'nuttx/configs/sim/pashello') diff --git a/nuttx/configs/sim/pashello/Make.defs b/nuttx/configs/sim/pashello/Make.defs index 40dc5acb1..6f662adc0 100644 --- a/nuttx/configs/sim/pashello/Make.defs +++ b/nuttx/configs/sim/pashello/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/sim/pashello/Make.defs # -# Copyright (C) 2007-2008, 2011 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2008, 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # 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,9 +84,22 @@ 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 + EXTRA_LIBS = -lm define PREPROCESS -- cgit v1.2.3