kernel: add c++ support

This commit is contained in:
2023-03-20 20:41:39 +00:00
parent a4d850cc03
commit 2bfb6bcd78
41 changed files with 333 additions and 38 deletions

View File

@@ -1,7 +1,9 @@
LD := gcc
CC := gcc
CXX := g++
ASM := gcc
CFLAGS := -Wall -Werror -pedantic
CXXFLAGS := $(CFLAGS)
ASMFLAGS := $(CFLAGS)
LDFLAGS := -O2

View File

@@ -5,7 +5,7 @@ import os
def is_source_file(filepath):
return filepath.endswith('.c') or filepath.endswith('.h') or filepath.endswith('.S')
return filepath.endswith('.c') or filepath.endswith('.cpp') or filepath.endswith('.h') or filepath.endswith('.S')
dir_stack = []
rootdir = os.getcwd()
@@ -30,7 +30,7 @@ for line in make_output_lines:
dir_stack.pop()
continue;
if 'gcc' not in line_parts[0]:
if 'gcc' not in line_parts[0] and 'g++' not in line_parts[0]:
continue
src_file = ''