Implemented printf and friends
This commit is contained in:
@@ -52,11 +52,12 @@ set(photon_libc_sources ${photon_libc_sources} ${platform_sources})
|
||||
set(photon_libc_headers ${photon_libc_headers} ${platform_headers})
|
||||
|
||||
add_library(c SHARED ${photon_libc_sources} ${photon_libc_headers})
|
||||
target_compile_options(c PRIVATE -ffreestanding -nostdlib -nostdinc)
|
||||
target_compile_options(c PRIVATE -ffreestanding -nostdlib)
|
||||
target_link_libraries(c crt)
|
||||
|
||||
target_include_directories(c PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/include)
|
||||
target_include_directories(c PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/)
|
||||
target_include_directories(c PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/sysroot/usr/include)
|
||||
|
||||
add_custom_target(sysroot
|
||||
DEPENDS ${photon_libc_headers}
|
||||
@@ -67,4 +68,8 @@ add_custom_target(sysroot
|
||||
|
||||
add_dependencies(c sysroot)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_link_libraries(c gcc)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(tests)
|
||||
|
||||
Reference in New Issue
Block a user