Add a stub C++ standard library.

This is necessary to build libunwind.
This commit is contained in:
whitequark 2015-07-26 12:49:02 +03:00
parent 5502cec3da
commit 7a9975ab5a
8 changed files with 43 additions and 1 deletions

View File

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

View File

@ -0,0 +1,4 @@
#ifndef __CXX_ALGORITHM
#define __CXX_ALGORITHM
#endif /* __CXX_ALGORITHM */

View File

@ -0,0 +1,11 @@
#ifndef __CXX_CSTDDEF
#define __CXX_CSTDDEF
#include <stddef.h>
namespace std {
using ::size_t;
using ::ptrdiff_t;
}
#endif /* __CXX_CSTDDEF */

View File

@ -0,0 +1,6 @@
#ifndef __CXX_CSTDLIB
#define __CXX_CSTDLIB
#include <stdlib.h>
#endif /* __CXX_CSTDLIB */

View File

@ -0,0 +1,4 @@
#ifndef __CXX_MEMORY
#define __CXX_MEMORY
#endif /* __CXX_MEMORY */

View File

@ -0,0 +1,9 @@
#ifndef __CXX_NEW
#define __CXX_NEW
#include <cstddef>
inline void* operator new (std::size_t size, void* ptr) noexcept
{ return ptr; }
#endif /* __CXX_NEW */

View File

@ -0,0 +1,4 @@
#ifndef __CXX_TUPLE
#define __CXX_TUPLE
#endif /* __CXX_TUPLE */

View File

@ -0,0 +1,4 @@
#ifndef __CXX_VECTOR
#define __CXX_VECTOR
#endif /* __CXX_VECTOR */