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:
Ingo Weinhold
2004-11-03 17:33:17 +00:00
parent ba44a1e8e1
commit 90072e721d
2 changed files with 12 additions and 17 deletions
-7
View File
@@ -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
+12 -10
View File
@@ -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"