Commit Graph

75 Commits

Author SHA1 Message Date
fincs
9174f415ed
Fix static constructors (closes #172) 2021-06-08 20:04:33 +02:00
fincs
dabb4c6052
wut.ld: restore .tm_clone_table 2021-04-25 16:52:12 +02:00
fincs
b6ca8b16a1
More linkscript updates, fixes and cleanup (fixes #123) 2021-04-25 16:41:43 +02:00
fincs
d04f68f8b1
Minor linkscript cleanup 2021-03-04 19:48:45 +01:00
fincs
4edc8271be
Buildsystem: add support for creating .wuhb files 2021-03-04 19:48:45 +01:00
fincs
0951f1d8a6
Remove deprecated wut.mk buildsystem & obsolete cmake macros 2021-03-04 19:48:45 +01:00
fincs
f5f5668cd9
wut.ld: Remove redundant commands 2021-03-04 19:48:45 +01:00
fincs
7c67d8baa3
wut_rules: rpx/rpl: use unstripped ELF directly 2021-03-04 19:48:26 +01:00
Dave Murphy
2355b2c7b6
remove system zlib. closes #143 (#147) 2020-07-07 16:17:32 +01:00
James Benton
191200b5cb cmake: Add wut_link_rpl for linking to an rpl that has exports.
The exports must have been added with wut_add_exports.
2020-06-23 10:44:46 +01:00
James Benton
07e77e9136 cmake: Generate import file for linking to an rpl with wut_add_exports. 2020-06-23 10:44:46 +01:00
James Benton
a3eefa84e6 cmake: Find WUT_RPLIMPORTGEN in toolchain. 2020-06-23 10:44:46 +01:00
Dave Murphy
e096dad4c5 reworked syscalls interface 2020-06-07 13:09:11 +01:00
V10lator
5d44ce12fb
Fix make V=1 (#120) 2020-04-30 12:56:57 +01:00
Ash Logan
dcf341e2b6 wut.toolchain.cmake: switch pkg-config to find_program 2020-04-12 21:04:58 +10:00
Ash Logan
586c65b2d7 wut.toolchain.cmake: Set pkg-config executable to dkp-libs/wiiu-pkg-config 2020-04-09 10:59:22 +10:00
Ash Logan
77ed28d097 wut.toolchain.cmake: Add internal library directories to find path
This is useful for porting or libraries that do things like `find_library(m)`.
2019-12-01 10:24:13 +11:00
James Benton
bffffdf515 samples/cmake: Update to use new cmake functions. 2019-11-23 10:12:28 +00:00
James Benton
217bf98474 cmake: Fix new wut_create_rpl for RPL files.
Forgot RPL was a thing, was only working for RPX before.
2019-11-23 10:10:18 +00:00
James Benton
c74eb52c67 cmake: Add new and improved wut_create_rpl implementation.
This safely deprecates the old usage of wut_create_rpl.

Benefits are:
- Previously it would re-generate the RPX every time even with no changes.
- No longer creates a new build target just for the rpx file
2019-11-22 18:02:57 +00:00
James Benton
79698376cd cmake: Add HINTS to toolchain file usage of find_program
Seems to help Windows CMake.
2019-11-20 11:29:37 +00:00
James Benton
9f0ff0f624 cmake: Set find path before using find_program.
Also use find_program for compilers.
2019-11-18 16:20:49 +00:00
Ash Logan
65d7bdd3e5 cmake: Add libwut to standard include dirs
apparently cmake also has a CMAKE_<LANG>_STANDARD_INCLUDE_DIRECTORIES
2019-05-03 18:08:42 +10:00
Ash Logan
4374621f4b wut.ld: make __rpx_start the default entry symbol, remove rpx.specs
ld will now auto-link everything to __rpx_start and pull in the correct 
crt *unless* rpl.specs is given on the commandline
2019-05-03 18:02:15 +10:00
Ash Logan
5528236b56 wut.ld: don't EXTERN(_start)
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
2019-05-03 17:59:34 +10:00
Ash Logan
5087ca6c88 cmake: Add libwut as a standard library
https://gitlab.kitware.com/cmake/cmake/issues/18222
2019-05-03 17:48:59 +10:00
Ash Logan
6e08d7791e wut.mk: add stubs, add deprecation warnings 2019-04-23 21:24:51 +10:00
Ash Logan
d542fdc438 wut.cmake: Use wut.specs and libwut in wut_create_rpx 2019-04-23 20:40:09 +10:00
Ash Logan
4828abdc1a wut.cmake: Deprecate old wut_enable_* macros 2019-04-23 20:37:47 +10:00
Ash Logan
28ffb89c02 Merge 'build-refactor' attempt #1; get upstream changes 2019-04-23 18:37:05 +10:00
Ash Logan
46d6edd81b wut.ld: Concat and garbage-collect rpx import sections 2019-04-22 14:42:46 +10:00
Ash Logan
5e784d292f wut.mk: don't depend on WUT_ROOT
Brings wut.mk in line with the other build systems - probably the last 
real love it'll get.
2019-04-09 18:29:44 +10:00
Dave Murphy
96cf21131d CMake fixups (#104)
* Provide default $WUT_ROOT

* default install path to /opt/devkitpro/wut

* only reinstall tools when required

* Correct search paths

* allow host paths for programs

* find tools via PATH & CMAKE_FIND_ROOT_PATH

* specify root path without bin component
2019-04-04 12:01:17 +11:00
Ash Logan
c15ed46e7a cmake: don't use include_directories (reverts add09e7)
Turns out this actually doesn't work? god only knows how it didn't get 
caught.
2019-03-18 19:03:31 +11:00
rw-r-r-0644
254de47b15 makefile: Update wut-tools path. 2019-02-21 08:55:30 +00:00
fincs
0b920cf9b9 Automatically link wutstdc++ when C++ is used 2019-02-12 12:46:34 +01:00
fincs
3e179891e9 Make sure .fexports/.dexports sections don't get garbage collected 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
edd0753aeb Use devkitpro installed wut-tools. 2019-01-27 14:14:52 +00:00
James Benton
58d967ce0c cmake: Try find DEVKITPPC from PATH. 2019-01-10 10:05:14 +00:00
Ash
56f70b2865 toolchain.cmake: Use include_directories instead of -I
This helps some cmake analysers and the like to better get an idea of how wut works, while having the same effect in terms of actual compiling.
2018-12-09 11:37:57 +00:00
Ash
39ccbcfc0f make: Strip debug sections before elf2rpl 2018-11-07 11:52:39 +00:00
Ash
f87b3f9347 make: Fix comparisons for sh compatibility
Thanks to @rw-r-r-0644 for this one
2018-11-07 11:52:39 +00:00
Ash
e950c6b937 make: Allow disabling the depends or compilation rules 2018-11-07 11:52:39 +00:00
Ash
24f46559da make: extra space in CFLAGS removed 2018-11-07 11:52:39 +00:00
Ash
c0d3788b8e make: Add wut makefile 2018-11-07 11:52:39 +00:00
rw-r-r-0644
7055d69c4f Strip debug sections before running elf2rpl to prevent crashes 2018-11-06 19:42:45 +00:00
James Benton
3605823849 Add missing datamem section allocation for .bss
Only worked before out of luck with the ALIGNs!
2018-09-14 09:53:06 +01:00
James Benton
f9fb0d8f24 Remove alignment for data sections from linker script. 2018-09-14 08:45:05 +01:00
James Benton
690bd6ccbd Revert "Rename wutdevoptab to wutdevoptab_sd"
This reverts commit 865af4609c.
Turns out it is for whole filesystem. oops.
2018-07-19 08:51:40 +01:00