aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2024-11-19 17:22:40 +0100
committerFelix Morgner <felix.morgner@ost.ch>2024-11-19 17:22:40 +0100
commitd1baeb7ec209ddf205dc90d39a5de4c7ecf9fe81 (patch)
treeb48dfcd77c0f432c7a2b6c378f0adbdf9ca03382 /cmake
parentfde3f969c5c45d4cdbd5ec92c4d07fd157194300 (diff)
downloadteachos-d1baeb7ec209ddf205dc90d39a5de4c7ecf9fe81.tar.xz
teachos-d1baeb7ec209ddf205dc90d39a5de4c7ecf9fe81.zip
build: disable RTTI
When using virtual functions while RTTI is enabled, the compiler generates code to support the use of dynamic_cast etc. This code requires the use of the free store (heap) which is not yet available. Disabling RTTI also disables the generation of the associated support code, thus making it possible for us to use virtual functions.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Platforms/x86_64.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/Platforms/x86_64.cmake b/cmake/Platforms/x86_64.cmake
index c31150c..6e99b62 100644
--- a/cmake/Platforms/x86_64.cmake
+++ b/cmake/Platforms/x86_64.cmake
@@ -15,7 +15,7 @@ set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
set(CMAKE_C_COMPILER "x86_64-elf-gcc")
set(CMAKE_CXX_COMPILER "x86_64-elf-g++")
-set(CMAKE_CXX_FLAGS_INIT "-m64 -mno-red-zone -mcmodel=large -fno-exceptions -ffunction-sections -fdata-sections")
+set(CMAKE_CXX_FLAGS_INIT "-m64 -mno-red-zone -mcmodel=large -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections")
set(CMAKE_CXX_FLAGS_DEBUG "-ggdb3")
set(CMAKE_ASM_FLAGS_DEBUG "-ggdb3")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-ggdb3")