diff options
| author | Alexey Gavrilov <alexey.gavrilov@mail.com> | 2026-03-28 14:55:53 +0700 |
|---|---|---|
| committer | Alexey Gavrilov <alexey.gavrilov@mail.com> | 2026-03-28 14:55:53 +0700 |
| commit | 378972285342f52bb71822d87ba261b76b4a42ed (patch) | |
| tree | 20ac43a02dce05e09272865f961f2e3decceda1f /arch/x86/gdt | |
| parent | c62baf8bca986d493e1caf441ea7a6b9d1c1823f (diff) | |
Cmake build type at the generation stage
Fix in *nasm* files - set architecture bitness.
Move compiler flags from *toolchain* file to *requirements target*
considering cmake files. This solution allows available of
multi-configurations generators to pass compiler options
without affecting on single-configuration generators.
TODO
- Debug information
- Image creation
- Build under window platform (optional)
Signed-off-by: Alexey Gavrilov <alexey.gavrilov@mail.com>
Diffstat (limited to 'arch/x86/gdt')
| -rw-r--r-- | arch/x86/gdt/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | arch/x86/gdt/SwitchToGdt.nasm | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/gdt/CMakeLists.txt b/arch/x86/gdt/CMakeLists.txt index 57e3c26..ae31792 100644 --- a/arch/x86/gdt/CMakeLists.txt +++ b/arch/x86/gdt/CMakeLists.txt @@ -20,4 +20,8 @@ target_sources(GDTASM PRIVATE ${CMAKE_CURRENT_LIST_DIR}/SwitchToGdt.nasm ) +target_link_libraries(GDTASM PUBLIC + ASM_NASM_COMPILER_REQUIREMENTS +) + target_sources(ArchitectureAssemblerSources PRIVATE $<TARGET_OBJECTS:GDTASM>) diff --git a/arch/x86/gdt/SwitchToGdt.nasm b/arch/x86/gdt/SwitchToGdt.nasm index 52ebbc7..5d3d612 100644 --- a/arch/x86/gdt/SwitchToGdt.nasm +++ b/arch/x86/gdt/SwitchToGdt.nasm @@ -1,4 +1,6 @@ -global SWITCHTOGDT +BITS 32 +section .text +global SWITCHTOGDT:function SWITCHTOGDT: lgdt [esp + 4] jmp 0x08:.reloadCS |
