diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-02 15:36:19 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-05-02 15:36:19 +0000 |
commit | 5ebf11ee63f1baaf070fd8484d99362810cd5bcc (patch) | |
tree | 2068f6956ceee5aba740da5acb8f97858e2b3f8a /nuttx/configs/sim | |
parent | addae64d8c028ffd2c3bb05ec7ebdd1a73720998 (diff) | |
download | px4-nuttx-5ebf11ee63f1baaf070fd8484d99362810cd5bcc.tar.gz px4-nuttx-5ebf11ee63f1baaf070fd8484d99362810cd5bcc.tar.bz2 px4-nuttx-5ebf11ee63f1baaf070fd8484d99362810cd5bcc.zip |
Fix some warnings and fix some simulator builds
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4688 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/sim')
-rw-r--r-- | nuttx/configs/sim/README.txt | 9 | ||||
-rw-r--r-- | nuttx/configs/sim/nx11/Make.defs | 21 | ||||
-rw-r--r-- | nuttx/configs/sim/nxwm/Make.defs | 21 | ||||
-rw-r--r-- | nuttx/configs/sim/touchscreen/Make.defs | 21 |
4 files changed, 66 insertions, 6 deletions
diff --git a/nuttx/configs/sim/README.txt b/nuttx/configs/sim/README.txt index 2ad8099f9..f02f44258 100644 --- a/nuttx/configs/sim/README.txt +++ b/nuttx/configs/sim/README.txt @@ -10,6 +10,7 @@ Contents o Debugging o Issues - 64-bit Issues + - Compiler differences - Stack Size Issues - Buffered I/O Issues - Networking Issues @@ -107,6 +108,14 @@ are included in the LDFLAGS. See the patch 0001-Quick-hacks-to-build-sim-nsh-ostest-on-x86_64-as-32-.patch that can be found at http://tech.groups.yahoo.com/group/nuttx/files. +Compiler differences +-------------------- + +operator new + + Problem: "'operator new' takes size_t ('...') as first parameter" + Workaround: Add -fpermissive to the compilation flags + Stack Size Issues ----------------- When you run the NuttX simulation, it uses stacks allocated by NuttX from the diff --git a/nuttx/configs/sim/nx11/Make.defs b/nuttx/configs/sim/nx11/Make.defs index 2dfda3e65..d385d823b 100644 --- a/nuttx/configs/sim/nx11/Make.defs +++ b/nuttx/configs/sim/nx11/Make.defs @@ -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 diff --git a/nuttx/configs/sim/nxwm/Make.defs b/nuttx/configs/sim/nxwm/Make.defs index 89fc79cd3..958ded466 100644 --- a/nuttx/configs/sim/nxwm/Make.defs +++ b/nuttx/configs/sim/nxwm/Make.defs @@ -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 diff --git a/nuttx/configs/sim/touchscreen/Make.defs b/nuttx/configs/sim/touchscreen/Make.defs index 599b37432..2ea9a3c89 100644 --- a/nuttx/configs/sim/touchscreen/Make.defs +++ b/nuttx/configs/sim/touchscreen/Make.defs @@ -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 |