makefile: move pdlibc to extlib, add C++ stub standard headers

It now kind of compiles with x86_64-elf gcc (does not link though)
This commit is contained in:
2021-11-04 20:15:58 +08:00
parent 964893b14a
commit 98f92a9958
48 changed files with 134 additions and 28 deletions

23
libstd/exception Normal file
View File

@ -0,0 +1,23 @@
#pragma once
#include <__cpp_config.hpp>
extern "C++" {
namespace std {
class exception {
public:
exception() __NOTHROW {}
#ifdef __CXX11
exception(const exception &) = default;
exception &operator=(const exception &) = default;
exception(exception &&) = default;
exception &operator=(exception &&) = default;
#endif
virtual const char *what() const __NOTHROW { return "std::exception"; };
};
} // namespace std
}