mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 00:50:23 +00:00
[CPPRT] Add cpprt for GCC, tool
- Link it to libsup++ - Add __cxa_pure_virtual
This commit is contained in:
parent
ea87f9102b
commit
81b8d07acd
4 changed files with 36 additions and 14 deletions
|
@ -601,5 +601,4 @@ target_compile_definitions(libstdc++ INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:PAL_ST
|
||||||
|
|
||||||
# Create our alias libraries
|
# Create our alias libraries
|
||||||
add_library(cppstl ALIAS libstdc++)
|
add_library(cppstl ALIAS libstdc++)
|
||||||
add_library(cpprt ALIAS libsupc++)
|
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@ add_subdirectory(conutils)
|
||||||
add_subdirectory(cportlib)
|
add_subdirectory(cportlib)
|
||||||
add_subdirectory(crt)
|
add_subdirectory(crt)
|
||||||
add_subdirectory(cryptlib)
|
add_subdirectory(cryptlib)
|
||||||
|
add_subdirectory(cpprt)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_subdirectory(cpprt)
|
|
||||||
add_subdirectory(RunTmChk)
|
add_subdirectory(RunTmChk)
|
||||||
else()
|
else()
|
||||||
add_subdirectory(gcc-compat)
|
add_subdirectory(gcc-compat)
|
||||||
|
|
|
@ -3,20 +3,30 @@ include_directories(
|
||||||
${REACTOS_SOURCE_DIR}/sdk/lib/crt/include
|
${REACTOS_SOURCE_DIR}/sdk/lib/crt/include
|
||||||
${REACTOS_SOURCE_DIR}/sdk/include/c++)
|
${REACTOS_SOURCE_DIR}/sdk/include/c++)
|
||||||
|
|
||||||
list(APPEND SOURCE
|
# We need different things, depending on the compiler
|
||||||
ehvec.cpp
|
if(MSVC)
|
||||||
new_nothrow.cpp
|
list(APPEND SOURCE
|
||||||
terminate.cpp
|
ehvec.cpp
|
||||||
typeinfo.cpp)
|
new_nothrow.cpp
|
||||||
|
terminate.cpp
|
||||||
if(ARCH STREQUAL "i386")
|
typeinfo.cpp)
|
||||||
add_asm_files(cpprt_asm i386/cpprt.s)
|
if(ARCH STREQUAL "i386")
|
||||||
elseif(ARCH STREQUAL "amd64")
|
add_asm_files(cpprt_asm i386/cpprt.s)
|
||||||
add_asm_files(cpprt_asm amd64/cpprt.s)
|
elseif(ARCH STREQUAL "amd64")
|
||||||
elseif(ARCH STREQUAL "arm")
|
add_asm_files(cpprt_asm amd64/cpprt.s)
|
||||||
add_asm_files(cpprt_asm arm/cpprt.s)
|
elseif(ARCH STREQUAL "arm")
|
||||||
|
add_asm_files(cpprt_asm arm/cpprt.s)
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
list(APPEND SOURCE
|
||||||
|
__cxa_pure_virtual.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(cpprt ${SOURCE} ${cpprt_asm})
|
add_library(cpprt ${SOURCE} ${cpprt_asm})
|
||||||
set_target_cpp_properties(cpprt WITH_EXCEPTIONS)
|
set_target_cpp_properties(cpprt WITH_EXCEPTIONS)
|
||||||
add_dependencies(cpprt xdk)
|
add_dependencies(cpprt xdk)
|
||||||
|
|
||||||
|
# On GCC builds, we need to link against libsupc++
|
||||||
|
if(NOT MSVC)
|
||||||
|
target_link_libraries(cpprt libsupc++)
|
||||||
|
endif()
|
||||||
|
|
13
sdk/lib/cpprt/__cxa_pure_virtual.cpp
Normal file
13
sdk/lib/cpprt/__cxa_pure_virtual.cpp
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
/*
|
||||||
|
* PROJECT: ReactOS C++ runtime library
|
||||||
|
* LICENSE: MIT (https://spdx.org/licenses/MIT)
|
||||||
|
* PURPOSE: __cxa_pure_virtual implementation
|
||||||
|
* COPYRIGHT: Copyright 2024 Timo Kreuzer <timo.kreuzer@reactos.org>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <intrin.h>
|
||||||
|
|
||||||
|
extern "C" void __cxa_pure_virtual(void)
|
||||||
|
{
|
||||||
|
__debugbreak();
|
||||||
|
}
|
Loading…
Reference in a new issue