Fixed linux compatibility
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
# project(photon C ASM-ATT)
|
||||
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
project(photon C ASM-ATT)
|
||||
endif ()
|
||||
|
||||
macro(subdirlist result curdir)
|
||||
file(GLOB children RELATIVE ${curdir} ${curdir}/*)
|
||||
@@ -12,6 +14,7 @@ macro(subdirlist result curdir)
|
||||
set(${result} ${dirlist})
|
||||
endmacro()
|
||||
|
||||
include(Bundles)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/platform.cmake)
|
||||
platform_config(${PHOTON_TARGET})
|
||||
|
||||
@@ -42,7 +45,7 @@ file(GLOB photon_libc_crt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/machine/${machine}/crt*.s)
|
||||
|
||||
add_library(crt OBJECT ${photon_libc_crt})
|
||||
target_compile_options(crt PRIVATE -c -ffreestanding -nostdlib)
|
||||
# target_compile_options(crt PRIVATE -c -ffreestanding -nostdlib)
|
||||
|
||||
file(GLOB platform_sources
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/photon/libc/sys/${platform}/*.c
|
||||
|
||||
Reference in New Issue
Block a user