mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-05 03:24:17 +01:00
Automatically link wutstdc++ when C++ is used
This commit is contained in:
parent
3e179891e9
commit
0b920cf9b9
@ -1,11 +1,11 @@
|
||||
void __init_wut_malloc();
|
||||
void __init_wut_newlib();
|
||||
void __init_wut_stdcpp();
|
||||
extern void __init_wut_stdcpp() __attribute__((weak));
|
||||
void __init_wut_devoptab();
|
||||
|
||||
void __fini_wut_malloc();
|
||||
void __fini_wut_newlib();
|
||||
void __fini_wut_stdcpp();
|
||||
extern void __fini_wut_stdcpp() __attribute__((weak));
|
||||
void __fini_wut_devoptab();
|
||||
|
||||
void __attribute__((weak))
|
||||
@ -13,7 +13,9 @@ __init_wut()
|
||||
{
|
||||
__init_wut_malloc();
|
||||
__init_wut_newlib();
|
||||
//__init_wut_stdcpp();
|
||||
if (__init_wut_stdcpp) {
|
||||
__init_wut_stdcpp();
|
||||
}
|
||||
__init_wut_devoptab();
|
||||
}
|
||||
|
||||
@ -21,7 +23,9 @@ void __attribute__((weak))
|
||||
__fini_wut()
|
||||
{
|
||||
__fini_wut_devoptab();
|
||||
//__fini_wut_stdcpp();
|
||||
if (__fini_wut_stdcpp) {
|
||||
__fini_wut_stdcpp();
|
||||
}
|
||||
__fini_wut_newlib();
|
||||
__fini_wut_malloc();
|
||||
}
|
||||
|
@ -1,5 +1,16 @@
|
||||
#include "wut_gthread.h"
|
||||
|
||||
__asm__ __volatile__(
|
||||
"\t.section\t.text.__wrap___gxx_personality_v0,\"ax\",@progbits\n"
|
||||
"\t.align\t2\n"
|
||||
"\t.globl\t__wrap___gxx_personality_v0\n"
|
||||
"\t.type\t__wrap___gxx_personality_v0, @function\n"
|
||||
"__wrap___gxx_personality_v0:\n"
|
||||
"\t.cfi_startproc\n"
|
||||
"\tb\t__real___gxx_personality_v0\n"
|
||||
"\t.cfi_endproc"
|
||||
);
|
||||
|
||||
extern "C" void
|
||||
__init_wut_stdcpp()
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
%rename link old_link
|
||||
|
||||
*link:
|
||||
%(old_link) -T %:getenv(DEVKITPRO /wut/share/wut.ld) --gc-sections --emit-relocs -z nocopyreloc %(wut_entry)
|
||||
%(old_link) -T %:getenv(DEVKITPRO /wut/share/wut.ld) --gc-sections --emit-relocs -z nocopyreloc -wrap __gxx_personality_v0 %(wut_entry)
|
||||
|
Loading…
Reference in New Issue
Block a user