Commit Graph

21 Commits

Author SHA1 Message Date
fincs
6c168606a3
wutstdc++: Remove link-time dependency on libstdc++ 2021-03-06 19:31:09 +01:00
Dave Murphy
e096dad4c5 reworked syscalls interface 2020-06-07 13:09:11 +01:00
James Benton
d39e7cad4a wutstdc++: Use OSSetThreadRunQuantum in gthread implementation.
To emulate pre-emptive scheduling which is what would be expected from
gthread.
2020-01-18 10:58:02 +00:00
Ash Logan
fb9b7ab3fb wutstdc++: remove volatile keyword
Who knows? not me. Seems to work okay without it
wut_stdcpp.cpp
/home/ash/src/wut/libraries/wutstdc++/wut_stdcpp.cpp:3:9: error: 
expected '(' before '__volatile__'
 __asm__ __volatile__(
         ^~~~~~~~~~~~
         (
/home/ash/src/wut/libraries/wutstdc++/wut_stdcpp.cpp:4:4: error: 
expected unqualified-id before string constant
    "\t.section\t.text.__wrap___gxx_personality_v0,\"ax\",@progbits\n"
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ash/src/wut/libraries/wutstdc++/wut_stdcpp.cpp:3:22: error: 
expected ')' before string constant
 __asm__ __volatile__(
                     ~^
                      )
    "\t.section\t.text.__wrap___gxx_personality_v0,\"ax\",@progbits\n"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [/opt/devkitpro/devkitPPC/base_rules:13: wut_stdcpp.o] 
Error 1
2019-04-09 20:41:45 +10:00
Ash Logan
869fe709ea Revert "wutstdc++: Move __gxx_personality to dedicated Assembly file"
This reverts commit 370eeb28e9.
I didn't know what this did, sorry.
2019-04-09 20:26:35 +10:00
Ash Logan
370eeb28e9 wutstdc++: Move __gxx_personality to dedicated Assembly file
I was getting issues with __volatile__ for unknown reason, so moving 
this to a dedicated file sidesteps the issue entirely and passes this 
straight to GAS.
2019-04-09 16:44:42 +10:00
fincs
0b920cf9b9 Automatically link wutstdc++ when C++ is used 2019-02-12 12:46:34 +01:00
fincs
ee3bb10df4 First pass at adopting a devkitPro-style build system, see details:
- Added wut_rules and wut/rpx/rpl.specs to share/
- Replaced wut's CMake-based buildsystem with a standard Makefile
- Conflated all wut libraries into a single libwut.a library
- wut's old buildsystems (CMake & plain make) are broken as a result,
  this will be fixed in the future
- Docs, tests and samples are not buildable either at the moment
- wutcrt/wutnewlib:
  - RPX start function is __rpx_start, while RPL is __rpl_start
  - __init/fini_wut_* functions are no longer weak
  - __init_wut/__fini_wut are instead weak
  - Removed _exit implementation
  - exit syscall now points to _Exit instead of pointing to itself
- wutstdc++:
  - Renamed .cc files to .cpp
  - Temporarily disabled, due to an issue that will be addressed shortly
- wutdevoptab:
  - Fixed uninitialized variable warnings in __wut_fs_read/write
2019-02-12 12:46:28 +01:00
James Benton
3c054375db wutstdc++: Fix __wut_key_t. 2018-06-02 10:36:28 +01:00
James Benton
4220023511 wutstdc++: Use malloc / free instead of MEM functions. 2018-05-30 14:42:42 +01:00
James Benton
d5effaaf88 coreinit: Cleanup memory heap functions.
Move files to mem*heap.h.
Use MEMHeapHandle everywhere to reduce need for unecessary casts.
Rename types to match the function names better (e.g. Frame -> Frm).
2018-05-30 13:13:37 +01:00
James Benton
2b165bf887 Improve time conversion macros. 2018-05-28 11:39:36 +01:00
James Benton
b4a6eb2f78 Split out crt from wutnewlib to wutcrt.
Can now optionally link newlib, stdc++, devoptab.
2018-05-27 12:12:49 +01:00
James Benton
ac8a42fa7c Change to using new gthreads implementation.
Assuming that --enable-threads=dkp gets merged into devkitPPC r31... :)
2018-05-26 18:25:36 +01:00
James Benton
710ce964c8 wutstdc++: Add remaining gthreads reliant std code. 2018-05-25 18:47:11 +01:00
James Benton
ec59508010 wutstdc++: Implement __gthread_cond_timedwait. 2018-05-25 18:45:19 +01:00
James Benton
750a2370d8 wutstdc++: Move gthread code to source files. 2018-05-25 18:15:39 +01:00
James Benton
675549474a wutstdc++: Implement gthread keys. 2018-05-25 18:06:54 +01:00
James Benton
3336fbaf5d Implement __gthread_once. 2018-05-25 17:35:21 +01:00
James Benton
b00b5af1ec wutstdc++: Add gthr-default.h to CMakeLists.txt 2018-05-25 17:35:07 +01:00
James Benton
a9829a3226 Add support for C++ std::thread.
Overwrites bits/gthr-default.h to implement gthreads.
2018-05-25 17:22:10 +01:00