Skip to content

Commit

Permalink
Disable C++ support in the kernel (it causes problems with backtracin…
Browse files Browse the repository at this point in the history
…g, as we haven't implemented C++-specific unwinding yet)
  • Loading branch information
ilmmatias committed Jan 24, 2025
1 parent b12a917 commit 0e1135d
Show file tree
Hide file tree
Showing 35 changed files with 197 additions and 1,802 deletions.
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include(sdk/cmake/toolchain.cmake)
include(sdk/cmake/project.cmake)

project(os)
enable_language(ASM C CXX RC)
enable_language(ASM C RC)

add_subdirectory(boot)
add_subdirectory(drivers)
Expand Down
2 changes: 1 addition & 1 deletion src/boot/osloader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ add_executable(osloader "kstdlib" NO
)

target_include_directories(osloader PRIVATE include)
target_compile_options(osloader PRIVATE $<$<COMPILE_LANGUAGE:C,CXX>:-ffreestanding>)
target_compile_options(osloader PRIVATE $<$<COMPILE_LANGUAGE:C>:-ffreestanding>)
target_compile_options(osloader PRIVATE -fshort-wchar)
target_link_options(osloader
PRIVATE -Wl,/driver
Expand Down
6 changes: 2 additions & 4 deletions src/drivers/acpi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ add_executable(acpi "knostdlib" YES
${SOURCES}

acpi.def
main.cxx
object.cxx
os.cxx)
main.c)

target_link_libraries(acpi kernel)
target_include_directories(acpi PRIVATE include/private PUBLIC include/public)
target_compile_options(acpi PRIVATE $<$<COMPILE_LANGUAGE:C,CXX>:-ffreestanding>)
target_compile_options(acpi PRIVATE $<$<COMPILE_LANGUAGE:C>:-ffreestanding>)
target_link_options(acpi PRIVATE -Wl,--subsystem=native,--entry=DriverEntry)
set_target_properties(acpi PROPERTIES SUFFIX ".sys")
set_target_properties(acpi PROPERTIES ENABLE_EXPORTS TRUE)
9 changes: 0 additions & 9 deletions src/drivers/acpi/include/private/acpip.hxx

This file was deleted.

14 changes: 0 additions & 14 deletions src/drivers/acpi/include/private/object.hxx

This file was deleted.

18 changes: 0 additions & 18 deletions src/drivers/acpi/include/private/os.hxx

This file was deleted.

84 changes: 0 additions & 84 deletions src/drivers/acpi/include/private/sdt.hxx

This file was deleted.

41 changes: 0 additions & 41 deletions src/drivers/acpi/include/private/value.hxx

This file was deleted.

12 changes: 1 addition & 11 deletions src/drivers/acpi/main.cxx → src/drivers/acpi/main.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* SPDX-FileCopyrightText: (C) 2023-2025 ilmmatias
* SPDX-License-Identifier: GPL-3.0-or-later */

#include <acpip.hxx>
#include <os.hxx>

/*-------------------------------------------------------------------------------------------------
* PURPOSE:
* This function is the entry point of the ACPI compatibility module. We're responsible for
Expand All @@ -16,12 +13,5 @@
* RETURN VALUE:
* None.
*-----------------------------------------------------------------------------------------------*/
extern "C" void DriverEntry(void) {
SdtHeader *Header = AcpipFindTable("DSDT", 0);
if (!Header) {
AcpipShowErrorMessage(KE_PANIC_BAD_SYSTEM_TABLE, "couldn't find the DSDT table\n");
}

AcpipInitializeBuiltin();
AcpipShowInfoMessage("enabled ACPI\n");
void DriverEntry(void) {
}
28 changes: 0 additions & 28 deletions src/drivers/acpi/object.cxx

This file was deleted.

97 changes: 0 additions & 97 deletions src/drivers/acpi/os.cxx

This file was deleted.

Loading

0 comments on commit 0e1135d

Please sign in to comment.