diff --git a/software/common.mak b/software/common.mak index 925fafe3b..b345bee3f 100644 --- a/software/common.mak +++ b/software/common.mak @@ -42,7 +42,7 @@ endif INCLUDES = -I$(MSCDIR)/software/include/base -I$(MSCDIR)/software/include -I$(MSCDIR)/common COMMONFLAGS = -Os $(CPUFLAGS) -Wall -fno-builtin -nostdinc -DMSC_GIT_ID=$(MSC_GIT_ID) $(INCLUDES) CFLAGS = $(COMMONFLAGS) -fexceptions -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -CXXFLAGS = $(COMMONFLAGS) -fexceptions -fno-rtti -ffreestanding +CXXFLAGS = $(COMMONFLAGS) -std=c++11 -I$(MSCDIR)/software/include/basec++ -fexceptions -fno-rtti -ffreestanding LDFLAGS = -nostdlib -nodefaultlibs -L$(MSCDIR)/software/include # compile and generate dependencies, based on diff --git a/software/include/basec++/algorithm b/software/include/basec++/algorithm new file mode 100644 index 000000000..cb9b61423 --- /dev/null +++ b/software/include/basec++/algorithm @@ -0,0 +1,4 @@ +#ifndef __CXX_ALGORITHM +#define __CXX_ALGORITHM + +#endif /* __CXX_ALGORITHM */ diff --git a/software/include/basec++/cstddef b/software/include/basec++/cstddef new file mode 100644 index 000000000..5291f1b6a --- /dev/null +++ b/software/include/basec++/cstddef @@ -0,0 +1,11 @@ +#ifndef __CXX_CSTDDEF +#define __CXX_CSTDDEF + +#include + +namespace std { + using ::size_t; + using ::ptrdiff_t; +} + +#endif /* __CXX_CSTDDEF */ diff --git a/software/include/basec++/cstdlib b/software/include/basec++/cstdlib new file mode 100644 index 000000000..6501ea9fe --- /dev/null +++ b/software/include/basec++/cstdlib @@ -0,0 +1,6 @@ +#ifndef __CXX_CSTDLIB +#define __CXX_CSTDLIB + +#include + +#endif /* __CXX_CSTDLIB */ diff --git a/software/include/basec++/memory b/software/include/basec++/memory new file mode 100644 index 000000000..899bb3d44 --- /dev/null +++ b/software/include/basec++/memory @@ -0,0 +1,4 @@ +#ifndef __CXX_MEMORY +#define __CXX_MEMORY + +#endif /* __CXX_MEMORY */ diff --git a/software/include/basec++/new b/software/include/basec++/new new file mode 100644 index 000000000..aa2f1a8d7 --- /dev/null +++ b/software/include/basec++/new @@ -0,0 +1,9 @@ +#ifndef __CXX_NEW +#define __CXX_NEW + +#include + +inline void* operator new (std::size_t size, void* ptr) noexcept + { return ptr; } + +#endif /* __CXX_NEW */ diff --git a/software/include/basec++/tuple b/software/include/basec++/tuple new file mode 100644 index 000000000..c97a8a11d --- /dev/null +++ b/software/include/basec++/tuple @@ -0,0 +1,4 @@ +#ifndef __CXX_TUPLE +#define __CXX_TUPLE + +#endif /* __CXX_TUPLE */ diff --git a/software/include/basec++/vector b/software/include/basec++/vector new file mode 100644 index 000000000..ec2844118 --- /dev/null +++ b/software/include/basec++/vector @@ -0,0 +1,4 @@ +#ifndef __CXX_VECTOR +#define __CXX_VECTOR + +#endif /* __CXX_VECTOR */