aboutsummaryrefslogtreecommitdiff
path: root/cmake/Platforms
AgeCommit message (Collapse)AuthorFilesLines
2 daysbuild/x86_64: add missing -ffreestanding flagHEADdevelopFelix Morgner1-0/+1
Enable the '-ffreestanding' flag in the x86_64 toolchain file to inform the compiler about the fact that it cannot rely on the presence of a standard library implementation, thereby suppressing some optimizations designed for regular user applications. GCC supports a number of clever optimizations, some of which rely on the presence of a standard library. One of them is "-ftree-loop-distribute-patterns". This optimization performs detection of certain loop patterns, replacing them with library calls when applicable. This is problematic for cases in which we implement the standard library functionality. Consider, a schematic, `memset``: ```c++ void memset(void * d, int v, size_t n) { for(auto i = 0uz; i < n: ++i) { d[i] = static_cast<std::byte>(v); } } ``` GCC recognizes this loop, and similar versions of it, as an implementation of `memset`. In a hosted implementation, this is an important optimization, since a standard library may be able to provide a specifically optimized version of `memset``. So the compiler replaces this `memset` loop with a call to `memset`, since it is not aware of the fact we are currently implementing `memset`. Interestingly, tail recursion optimization eliminates the call, transforming it into a jump to the start of `memset`. This leads to execution getting stuck inside `memset` with no way of exiting and no stack usage increase, thus causing an infinite lockup. While we could suppress the specific optimization, it is more effective to tell the compiler "why" it can emit a call to memset in those cases.
2026-09-04build: clean up available build typesFelix Morgner1-7/+4
2025-10-30libs: begin ELF support implementationFelix Morgner1-1/+1
2025-10-29chore: configure clang-tidyFelix Morgner1-0/+1
2025-10-28build: simplify toolchain setupFelix Morgner1-7/+9
2025-07-24build: clean up x86_64 toolchainFelix Morgner1-12/+2
2025-07-24x86_64: implement high/low splitFelix Morgner1-20/+4
2025-07-14ide: start large-scale restructuringFelix Morgner1-1/+0
2025-07-14build: upgrade x86-64 toolchainFelix Morgner1-24/+54
2025-07-13build: update toolchainFelix Morgner1-4/+4
2024-11-19build: disable RTTIFelix Morgner1-1/+1
When using virtual functions while RTTI is enabled, the compiler generates code to support the use of dynamic_cast etc. This code requires the use of the free store (heap) which is not yet available. Disabling RTTI also disables the generation of the associated support code, thus making it possible for us to use virtual functions.
2024-09-17build: user no-red-zone CRT codeFelix Morgner1-1/+1
Even though it makes no difference, since the CRT code we pull in from the toolchain will never touch the red zone in the first place, it is a good idea to try to be consistent across the build.
2024-09-17build: migrate away from conanFelix Morgner1-0/+35
2023-10-07cmake: move modules to sourceFelix Morgner1-23/+0
2023-10-07x86_64: implement first bootable kernelfelix.morgner@ost.ch1-0/+23