Also added a pretty much untested and totally incomplete STL string type.

This commit is contained in:
2024-01-12 01:31:43 +01:00
parent ff3214fa5a
commit 219a48c616
21 changed files with 138 additions and 12 deletions

View File

@@ -8,7 +8,7 @@ env['CXX'] = 'i686-elf-g++'
env['LD'] = 'i686-elf-g++'
env.Append(CXXFLAGS = ['-ffreestanding', '-fno-exceptions', '-fno-rtti', '-std=c++20'])
env.Append(LINKFLAGS = ['-T', 'linker.ld', '-ffreestanding', '-nostdlib'])
env.Append(CPPPATH = ['#include', '#stdlib/include'])
env.Append(CPPPATH = ['#include', '#bastl/include'])
env.Append(CCFLAGS = ['-g', '-O0'])
def get_crt_object(name: str) -> str:
@@ -36,8 +36,8 @@ os_sources = Split('''
src/cstdlib/stdlib.cpp
src/cstdlib/string.cpp
stdlib/src/exception.cpp
stdlib/src/new.cpp
bastl/src/exception.cpp
bastl/src/new.cpp
''')
env['LINKCOM'] = env['LINKCOM'].replace('$_LIBFLAGS', f'{crti_o[0]} {crtbegin_o} $_LIBFLAGS {crtend_o} {crtn_o[0]}')