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
This commit is contained in:
patacongo 2012-05-02 15:36:19 +00:00
parent 01137a558c
commit 3809954273
4 changed files with 66 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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