changeset 55:4f5d1aa8b594

fix use linker
author anatofuz
date Thu, 06 Jun 2019 19:25:42 +0900
parents aa0095c4c2b0
children a5ca5cc4661c
files src/CMakeLists.txt
diffstat 1 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/CMakeLists.txt	Thu Jun 06 19:16:22 2019 +0900
+++ b/src/CMakeLists.txt	Thu Jun 06 19:25:42 2019 +0900
@@ -3,16 +3,12 @@
 
 # https://github.com/llvm-mirror/libcxx/blob/master/cmake/Modules/HandleCompilerRT.cmake
 function(find_compiler_rt_library dest)
-  #if (NOT DEFINED LIBC_COMPILE_FLAGS)
-  #  message(FATAL_ERROR "LIBC_COMPILE_FLAGS must be defined when using this function")
-  #endif()
   set(dest "" PARENT_SCOPE)
   set(CLANG_COMMAND ${CMAKE_C_COMPILER} 
       "--print-libgcc-file-name")
   if (CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET)
     list(APPEND CLANG_COMMAND "--target=${CMAKE_C_COMPILER_TARGET}")
   endif()
-  #get_property(LIBC_C_FLAGS CACHE CMAKE_C_FLAGS PROPERTY VALUE)
   string(REPLACE " " ";" LIBC_C_FLAGS "${LIBC_C_FLAGS}")
   list(APPEND CLANG_COMMAND ${LIBC_C_FLAGS})
   execute_process(
@@ -24,6 +20,8 @@
   set(${dest} "${LIBRARY_FILE}" PARENT_SCOPE)
 endfunction()
 
+
+
 set(USE_CUDA,0)
 # -DUSE_CUDA
 #  add_definitions("-Wall -g -O")
@@ -38,11 +36,10 @@
 else (APPLE)
     set(CMAKE_C_COMPILER /mnt/dalmore-home/one/src/armgcc/cross/bin/arm-none-eabi-gcc)
     set(CMAKE_ASM_COMPILER /mnt/dalmore-home/one/src/armgcc/cross/bin/arm-none-eabi-gcc)
-    set(CMAKE_EXE_LINK_EXECUTABLE "/mnt/dalmore-home/one/src/armgcc/cross/bin/arm-none-eabi-ld")
     add_definitions("-B/mnt/dalmore-home/one/src/armgcc/cross/bin/arm-none-eabi-  
              -DCBCXV6=1 -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -I. -g -O0")
     find_compiler_rt_library("LIBRARY_FILE")
-    set(CMAKE_EXE_LINKER_FLAGS "-L.  -T  kernel-cmake.ld  ${LIBRARY_FILE} -o kernel.elf  -b binary -nostdlib ")
+    set(CMAKE_C_LINK_EXECUTABLE "/mnt/dalmore-home/one/src/armgcc/cross/bin/arm-none-eabi-ld -L.  -T  kernel-cmake.ld  ${LIBRARY_FILE} -o kernel.elf  -b binary -nostdlib ")
     
 endif (APPLE)