Kernel is now in C++ :)

This commit is contained in:
2022-11-12 21:30:26 +02:00
parent e6b4866ab0
commit 61609db228
7 changed files with 19 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ export HOST=${HOST:-$(./default-host.sh)}
export AR=${HOST}-ar
export AS=${HOST}-as
export CC=${HOST}-gcc
export CXX=${HOST}-g++
export PREFIX=/usr
export EXEC_PREFIX=$PREFIX
@@ -20,9 +21,11 @@ export CPPFLAGS=''
# Configure the cross-compiler to use the desired system root.
export SYSROOT="$(pwd)/sysroot"
export CC="$CC --sysroot=$SYSROOT"
export CXX="$CXX --sysroot=$SYSROOT"
# Work around that the -elf gcc targets doesn't have a system include directory
# because it was configured with --without-headers rather than --with-sysroot.
if echo "$HOST" | grep -Eq -- '-elf($|-)'; then
export CC="$CC -isystem=$INCLUDEDIR"
export CXX="$CXX -isystem=$INCLUDEDIR"
fi