toolchain magic optional now
This commit is contained in:
parent
e56b4dcd56
commit
46a5765593
@ -20,10 +20,18 @@ endif()
|
||||
if(TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
|
||||
option(LINUX_CROSS_COMPILE "Cross compile for a Linux board" ON)
|
||||
set(FSFW_HAL_ADD_LINUX "Add the FSFW HAL for Linux systems" ON)
|
||||
option(FSFW_BBB_TOOLCHAIN_FILE_MAGIC
|
||||
"Perform library magic in toolchain file. Might be removed soon"
|
||||
OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
if(TGT_BSP MATCHES "arm/raspberrypi")
|
||||
set(FSFW_HAL_ADD_RASPBERRY_PI "Add Raspberry Pi specific HAL files" ON)
|
||||
option(FSFW_RPI_TOOLCHAIN_FILE_MAGIC
|
||||
"Perform library magic in toolchain file. Might be removed soon"
|
||||
OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
# Perform steps like loading toolchain files where applicable.
|
||||
|
@ -68,20 +68,22 @@ set(CMAKE_SYSROOT "${SYSROOT_PATH}")
|
||||
set(CMAKE_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "arm")
|
||||
|
||||
# List of library dirs where LD has to look. Pass them directly through gcc.
|
||||
# LD_LIBRARY_PATH is not evaluated by arm-*-ld
|
||||
set(LIB_DIRS
|
||||
if(FSFW_BBB_TOOLCHAIN_FILE_MAGIC)
|
||||
# List of library dirs where LD has to look. Pass them directly through gcc.
|
||||
# LD_LIBRARY_PATH is not evaluated by arm-*-ld
|
||||
set(LIB_DIRS
|
||||
"${SYSROOT_PATH}/lib/${MUTLIARCH_FOLDER_NAME}"
|
||||
"${SYSROOT_PATH}/usr/local/lib"
|
||||
"${SYSROOT_PATH}/usr/lib/${MUTLIARCH_FOLDER_NAME}"
|
||||
"${SYSROOT_PATH}/usr/lib"
|
||||
)
|
||||
# You can additionally check the linker paths if you add the
|
||||
# flags ' -Xlinker --verbose'
|
||||
set(COMMON_FLAGS "-I${SYSROOT_PATH}/usr/include")
|
||||
foreach(LIB ${LIB_DIRS})
|
||||
)
|
||||
# You can additionally check the linker paths if you add the
|
||||
# flags ' -Xlinker --verbose'
|
||||
set(COMMON_FLAGS "-I${SYSROOT_PATH}/usr/include")
|
||||
foreach(LIB ${LIB_DIRS})
|
||||
set(COMMON_FLAGS "${COMMON_FLAGS} -L${LIB} -Wl,-rpath-link,${LIB}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS
|
||||
"-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard ${COMMON_FLAGS}"
|
||||
|
@ -83,9 +83,10 @@ else()
|
||||
set(CMAKE_SYSTEM_PROCESSOR "arm")
|
||||
endif()
|
||||
|
||||
# List of library dirs where LD has to look. Pass them directly through gcc.
|
||||
# LD_LIBRARY_PATH is not evaluated by arm-*-ld
|
||||
set(LIB_DIRS
|
||||
if(FSFW_RPI_TOOLCHAIN_FILE_MAGIC)
|
||||
# List of library dirs where LD has to look. Pass them directly through gcc.
|
||||
# LD_LIBRARY_PATH is not evaluated by arm-*-ld
|
||||
set(LIB_DIRS
|
||||
"${SYSROOT_PATH}/opt/vc/lib"
|
||||
"${SYSROOT_PATH}/lib/${MULTIARCH_FOLDER_NAME}"
|
||||
"${SYSROOT_PATH}/usr/local/lib"
|
||||
@ -93,13 +94,14 @@ set(LIB_DIRS
|
||||
"${SYSROOT_PATH}/usr/lib"
|
||||
"${SYSROOT_PATH}/usr/lib/${MULTIARCH_FOLDER_NAME}/blas"
|
||||
"${SYSROOT_PATH}/usr/lib/${MULTIARCH_FOLDER_NAME}/lapack"
|
||||
)
|
||||
# You can additionally check the linker paths if you add the
|
||||
# flags ' -Xlinker --verbose'
|
||||
set(COMMON_FLAGS "-I${SYSROOT_PATH}/usr/include")
|
||||
foreach(LIB ${LIB_DIRS})
|
||||
)
|
||||
# You can additionally check the linker paths if you add the
|
||||
# flags ' -Xlinker --verbose'
|
||||
set(COMMON_FLAGS "-I${SYSROOT_PATH}/usr/include")
|
||||
foreach(LIB ${LIB_DIRS})
|
||||
set(COMMON_FLAGS "${COMMON_FLAGS} -L${LIB} -Wl,-rpath-link,${LIB}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(RASPBERRY_VERSION VERSION_GREATER 3)
|
||||
set(CMAKE_C_FLAGS
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit dee063e25928f8b24cbd3fc49130d453feb01dd4
|
||||
Subproject commit 0e5cfcf28f0183d7286d1160a40dcff2017f7795
|
Loading…
Reference in New Issue
Block a user