Always define the symbols needed for basic C++ features. If we link against libgcc.a the symbols from there are simply overridden.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9778 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -71,13 +71,6 @@ operator delete[](void *ptr) throw ()
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
// only needed in the boot loader
|
||||
#ifndef _BOOT_MODE
|
||||
|
||||
extern "C" void __pure_virtual();
|
||||
|
||||
#endif // #if _BOOT_MODE
|
||||
|
||||
#endif // #if _KERNEL_MODE
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -4,11 +4,17 @@
|
||||
** This file may be used under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
// stripped down C++ support for the boot loader
|
||||
#ifdef _BOOT_MODE
|
||||
|
||||
#include "util/kernel_cpp.h"
|
||||
|
||||
#ifdef _BOOT_MODE
|
||||
# include <boot/platform.h>
|
||||
#elif defined(_KERNEL_MODE)
|
||||
# include <KernelExport.h>
|
||||
#endif
|
||||
|
||||
// Always define the symbols needed when not linking against libgcc.a --
|
||||
// we simply override them.
|
||||
|
||||
const nothrow_t std::nothrow = {};
|
||||
|
||||
#if __GNUC__ == 2
|
||||
@@ -16,7 +22,7 @@ const nothrow_t std::nothrow = {};
|
||||
extern "C" void
|
||||
__pure_virtual()
|
||||
{
|
||||
//printf("pure virtual function call");
|
||||
panic("pure virtual function call\n");
|
||||
}
|
||||
|
||||
#elif __GNUC__ >= 3
|
||||
@@ -24,20 +30,16 @@ __pure_virtual()
|
||||
extern "C" void
|
||||
__cxa_pure_virtual()
|
||||
{
|
||||
panic("pure virtual function call\n");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// full C++ support in the kernel
|
||||
#elif _KERNEL_MODE // #endif _BOOT_MODE
|
||||
#if defined(_KERNEL_MODE) && !defined(_BOOT_MODE)
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
#include "util/kernel_cpp.h"
|
||||
|
||||
FILE *stderr = NULL;
|
||||
|
||||
extern "C"
|
||||
|
||||
Reference in New Issue
Block a user