diff --git a/ChangeLog b/ChangeLog index b583b9db67b2e06a32254b5f81d3627033bc47bb..2bda8e7bdcd76aa46803cdc3a76c10b5f8bd086a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -693,3 +693,4 @@ * eZ8Encore!: Add an I2C driver. * Add support for the Freescale i.MX1/L architecture and a configuration for the Freescale MX1ADS development board. + * examples/helloxx: Added a simple C++ hello world example diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index bb5c3eac7ae8815ea88336bc47a8514b2882b5c9..0edf2ebd157fb57f1c5aa20272f4683a1bb48814 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@ <tr align="center" bgcolor="#e4e4e4"> <td> <h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1> - <p>Last Updated: April 12, 2009</p> + <p>Last Updated: April 19, 2009</p> </td> </tr> </table> @@ -1387,12 +1387,18 @@ nuttx-0.4.5 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> * eZ8Encore!: Add an I2C driver. * Add support for the Freescale i.MX1/L architecture and a configuration for the Freescale MX1ADS development board. + * examples/helloxx: Added a simple C++ hello world example pascal-0.1.3 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> buildroot-0.1.4 2009-xx-xx <spudmonkey@racsa.co.cr> * Add support for a blackfin toolchain using GCC 4.2.4 and binutils 2.19 + * GCC 4.2.4 no longer attempts to build libstdc++. Now we can build g++! + * The ARM GCC-4.2.4 configuration was changed so that it now builds g++. + * Removed building of initial and final GCC. that is not necessary because + we do not build a libc. Now it builds almost twice as fast. + * Removed logic to build the target GCC. That is never used. </pre></ul> diff --git a/configs/mx1ads/ostest/Make.defs b/configs/mx1ads/ostest/Make.defs index 134035c5054a8b94ed32f4cebaed68172572acba..f0fa333666226ce2841b7db4aed5e193c0dea6dd 100644 --- a/configs/mx1ads/ostest/Make.defs +++ b/configs/mx1ads/ostest/Make.defs @@ -37,6 +37,7 @@ include ${TOPDIR}/.config CROSSDEV = arm-elf- CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ CPP = $(CROSSDEV)gcc -E LD = $(CROSSDEV)ld AR = $(CROSSDEV)ar rcs @@ -47,6 +48,11 @@ OBJDUMP = $(CROSSDEV)objdump ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow + ifeq ("${CONFIG_DEBUG}","y") ARCHOPTIMIZATION = -g else @@ -55,17 +61,19 @@ else endif ifeq ($(ARCHCCMAJOR),4) - ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv4t -msoft-float -fno-builtin + ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv4t -msoft-float else - ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv4t -msoft-float -fno-builtin + ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv4t -msoft-float endif -ARCHPICFLAGS = -fpic -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHDEFINES = ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + +ARCHPICFLAGS = -fpic ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/ostest/ld.script -CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ @@ -88,6 +96,11 @@ define COMPILE @$(CC) -c $(CFLAGS) $1 -o $2 endef +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + define ASSEMBLE @echo "AS: $1" @$(CC) -c $(AFLAGS) $1 -o $2 diff --git a/examples/README.txt b/examples/README.txt index faa378bb2b310b22633e2efc609673ef6dd55577..81b4f2d73ec2383bb5742afb4e8f52463169bd6d 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -21,7 +21,7 @@ examples/dhcpd cd examples/dhcpd make -f Makefile.host - Kernel configuratin settings: + NuttX configuration settings: CONFIG_EXAMPLE_DHCPD_NOMAC - (May be defined to use software assigned MAC) CONFIG_EXAMPLE_DHCPD_IPADDR - Target IP address @@ -39,6 +39,21 @@ examples/hello than examples/null with a single printf statement. Again useful only for bringing up new NuttX architectures. + NuttX configuration settings: + + CONFIG_EXAMPLE_HELLOXX_NOSTATICCONST - Set if system does not support + static constructors. + CONFIG_EXAMPLE_HELLOXX_NOSTACKCONST - Set if the systgem does not + support constructionof objects on the stack. + +examples/helloxx +^^^^^^^^^^^^^^^^ + + This is C++ version of the "Hello, World!!" example. It is intended + only to verify that the C++ compiler is function, that basic C++ + library suupport is available, and that class are instantiated + correctly. + examples/mount ^^^^^^^^^^^^^^ diff --git a/include/nuttx/fs.h b/include/nuttx/fs.h index 3d23706880199f4f6ac71738cbaeb92fb174ff7f..1326921dfc2346e5e672fa8eded3f9f849ac6a0c 100644 --- a/include/nuttx/fs.h +++ b/include/nuttx/fs.h @@ -314,13 +314,13 @@ EXTERN void weak_function fs_initialize(void); EXTERN STATUS register_driver(const char *path, const struct file_operations *fops, - mode_t mode, void *private); + mode_t mode, void *priv); /* fs_registerdriver.c ******************************************************/ EXTERN STATUS register_blockdriver(const char *path, const struct block_operations *bops, - mode_t mode, void *private); + mode_t mode, void *priv); /* fs_unregisterdriver.c ****************************************************/