From 78bfb1f6eaca1a04fd6ce035878409c72b4b99b0 Mon Sep 17 00:00:00 2001 From: WangRunji Date: Sat, 5 Jan 2019 15:50:24 +0800 Subject: [PATCH] fix CMake config --- .travis.yml | 2 +- CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 40ffae0..c244505 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ env: - ARCH="riscv32" - ARCH="riscv64" - ARCH="i386" - - ARCH="x86_64" +# - ARCH="x86_64" - ARCH="aarch64" install: diff --git a/CMakeLists.txt b/CMakeLists.txt index 8609f68..78d87f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ elseif (${ARCH} STREQUAL riscv64) elseif (${ARCH} STREQUAL aarch64) set(PREFIX aarch64-none-elf-) set(CMAKE_C_FLAGS "-mgeneral-regs-only") - set(CMAKE_C_LINK_FLAGS "-Ttext 0xffff000000000000") + set(LINK_FLAGS "-Ttext 0xffff000000000000") else() message("Unsupported arch: ${ARCH}") endif () @@ -45,8 +45,8 @@ set(CMAKE_C_COMPILER ${PREFIX}gcc) set(CMAKE_RANLIB ${PREFIX}ranlib) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-builtin -nostdinc -fno-stack-protector -ggdb -Wall") set(CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS}) -set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -nostdlib") # get rid of '-Wl,-search_paths_first -Wl,-headerpad_max_install_names' -set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) # get rid of '-rdynamic' on Linux +set(CMAKE_C_LINK_FLAGS "${LINK_FLAGS} -nostdlib") # override default value to get rid of '-Wl,-search_paths_first -Wl,-headerpad_max_install_names' +set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) # override default value to get rid of '-rdynamic' on Linux # Library add_library(ulib ${LIBS})