summaryrefslogtreecommitdiffstats
path: root/libgcc/x86
diff options
context:
space:
mode:
authorAlexey Gavrilov <alexey.gavrilov@mail.com>2026-04-02 18:52:26 +0700
committerAlexey Gavrilov <alexey.gavrilov@mail.com>2026-04-02 19:04:08 +0700
commitb0bb74c25d3a2caab032e5facfd9608724de3e05 (patch)
treec6a8fc4175176e8bb6372f4b072979126937aec0 /libgcc/x86
parent6cdf09f651586135b7cf7a8a05ba4a96cb6b3b97 (diff)
Correct CRTXBUNDLE static targets into separate objectscmake
This correct refers to a wrong order of linking CRT objects. When targets are separates into 4: CRTI, CRTBEGIN, CRTEND, CRTN the order became a little bit correct. TODO - Image with grub bootloader creation - Build under window platform (optional) Signed-off-by: Alexey Gavrilov <alexey.gavrilov@mail.com>
Diffstat (limited to 'libgcc/x86')
-rw-r--r--libgcc/x86/CMakeLists.txt29
1 files changed, 14 insertions, 15 deletions
diff --git a/libgcc/x86/CMakeLists.txt b/libgcc/x86/CMakeLists.txt
index 8b2eb67..8dac6ba 100644
--- a/libgcc/x86/CMakeLists.txt
+++ b/libgcc/x86/CMakeLists.txt
@@ -1,21 +1,20 @@
-add_library(CRTI INTERFACE)
-add_library(CRTIBUNDLE STATIC)
-target_sources(CRTIBUNDLE PRIVATE
- ${CMAKE_CURRENT_LIST_DIR}/crti.nasm
- $<TARGET_OBJECTS:CRTBEGIN>
+add_library(CRTI OBJECT)
+target_sources(CRTI PRIVATE
+ ${CMAKE_CURRENT_LIST_DIR}/crti.nasm
)
-target_link_libraries(CRTIBUNDLE PUBLIC
- ASM_NASM_COMPILER_REQUIREMENTS
+
+target_link_libraries(CRTI
+ PUBLIC
+ ASM_NASM_COMPILER_REQUIREMENTS
)
-target_link_libraries(CRTI INTERFACE CRTIBUNDLE)
-add_library(CRTN INTERFACE)
-add_library(CRTNBUNDLE STATIC)
-target_sources(CRTNBUNDLE PRIVATE
+add_library(CRTN OBJECT)
+target_sources(CRTN PRIVATE
${CMAKE_CURRENT_LIST_DIR}/crtn.nasm
- $<TARGET_OBJECTS:CRTEND>
)
-target_link_libraries(CRTNBUNDLE PUBLIC
- ASM_NASM_COMPILER_REQUIREMENTS
+
+target_link_libraries(CRTN
+ PUBLIC
+ ASM_NASM_COMPILER_REQUIREMENTS
+
)
-target_link_libraries(CRTN INTERFACE CRTNBUNDLE)