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
James Benton
c5e51a5ffc
cmake: Remove -std=c++17 from wut_enable_stdcpp
2018-06-18 21:13:06 +01:00
James Benton
47c3d4d7cd
cmake: Use target_link_libraries even for --whole-archive libraries.
...
So cmake picks up the dependency naturally, I didn't know this was possible
before...
2018-06-15 14:56:38 +01:00
James Benton
39429c0cbc
cmake: Cleanup some CMake stuff.
2018-06-15 13:59:55 +01:00
James Benton
78440eafe5
share/wut.cmake: Update to be a bit more idiot proof.
...
Only allows calling each wut_enable_* once, also wut_enable_stdcpp now
automatically calls wut_enable_newlib.
2018-06-14 12:26:44 +01:00
James Benton
e89b248a15
Cleanup some CMake stuff
2018-06-14 11:44:23 +01:00
James Benton
d315b4bb34
Add new wutmalloc library.
...
This overwrites malloc and redirects it to alloc from default heap.
Also sets __wut_heap_max_size to limit sbrk heap now that malloc no longer
uses it.
2018-06-14 09:33:16 +01:00
James Benton
060d9df5cb
Update linker script to include all fimport & dimport sections.
2018-06-13 12:10:27 +01:00
James Benton
0556f4627b
cmake: Explicitly set CMAKE_CROSSCOMPILING.
...
Not actually required because it is implicitly set when you modify
CMAKE_SYSTEM_NAME, but it's nice to be explicit.
2018-06-04 18:09:49 +01:00
James Benton
7019171841
cmake: Set BUILD_SHARED_LIBS OFF.
...
devkitPPC does not support building shared libraries.
2018-06-04 18:09:10 +01:00
James Benton
01606fba86
wut: Define __WIIU__ and __WUT__ for builds.
2018-06-02 10:37:02 +01:00
James Benton
62cb2757b9
wut_add_exports: Use target name when generating exports.
...
This helps keep the filename unique.
2018-05-31 10:30:58 +01:00
James Benton
00b6fa3940
ld: Add (NOLOAD) to .bss section.
2018-05-30 22:40:20 +01:00
James Benton
f281be50ab
Add support for generating RPL files.
...
RPL files are shared libraries (like a .dll file), as opposed to the RPX
files which are executables (like a .exe file).
Use rpl_main as defined in dynload.h like one would DllMain on Windows.
2018-05-30 21:56:18 +01:00
James Benton
61a84c50b6
tools: Add rplexportgen to produce SHT_RPL_EXPORTS.
2018-05-30 18:56:10 +01:00
James Benton
6d8dabb15b
wut.cmake: Update to support creating RPL files, and exports.
2018-05-30 18:56:10 +01:00
James Benton
766e832363
coreinit: Add default heap data exports.
2018-05-29 10:52:40 +01:00
James Benton
35d05358c4
Fix wut_create_rpx linking to newlib instead of crt.
2018-05-28 11:39:54 +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
a9829a3226
Add support for C++ std::thread.
...
Overwrites bits/gthr-default.h to implement gthreads.
2018-05-25 17:22:10 +01:00