Skip to content

wut 1.0.0-beta9 - #105

Merged
ashquarky merged 33 commits into
masterfrom
merge-build-refactor
May 22, 2019
Merged

wut 1.0.0-beta9#105
ashquarky merged 33 commits into
masterfrom
merge-build-refactor

Conversation

@ashquarky

Copy link
Copy Markdown
Contributor

No description provided.

fincs and others added 30 commits February 12, 2019 12:46
- 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
- Added (dummy) __init/fini_wut_malloc stubs called by wutcrt
  in order to ensure that wutmalloc gets linked in
- malloc/realloc/calloc now properly set errno to ENOMEM during failure
- realloc no longer fails if ptr==NULL (in this case it works
  like a regular malloc)
- realloc no longer does an out of bounds copy if the new size
  is smaller than the old size
- free(NULL) is now supported as per the C standard
- Disabled sbrk/malloc-lock support code in wutnewlib because
  newlib's malloc is replaced with wutmalloc
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.
This reverts commit 370eeb2.
I didn't know what this did, sorry.
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
This made _start be an always undefined symbol, which kinda backdoors 
ld's existing system for determining entrypoints. This will be important 
in the next commit ;D
ld will now auto-link everything to __rpx_start and pull in the correct 
crt *unless* rpl.specs is given on the commandline
apparently cmake also has a CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES
@ashquarky
ashquarky merged commit ed4e168 into master May 22, 2019
@ashquarky
ashquarky deleted the merge-build-refactor branch May 22, 2019 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants