mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-06 04:49:12 +00:00
Supports native builds on aarch64 machines. Supports making a 64-bit build via either cross compiling, or on aarch64 machines. Both options require the addition of --aarch64 to the command line, otherwise 32-bit libraries will be built. Cross compiling requires the aarch64-linux-gnu- compile tools to be installed (packages gcc-5-aarch64-linux-gnu and g++-aarch64-linux-gnu on Ubuntu).
23 lines
651 B
CMake
23 lines
651 B
CMake
|
|
#
|
|
# CMake defines to cross-compile to ARM/Linux on BCM2708 using glibc.
|
|
#
|
|
|
|
SET(CMAKE_SYSTEM_NAME Linux)
|
|
SET(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
|
|
SET(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
|
|
SET(CMAKE_ASM_COMPILER aarch64-linux-gnu-gcc)
|
|
SET(CMAKE_SYSTEM_PROCESSOR arm)
|
|
|
|
#ADD_DEFINITIONS("-march=armv6")
|
|
#add_definitions("-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -marm")
|
|
|
|
# rdynamic means the backtrace should work
|
|
IF (CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
add_definitions(-rdynamic)
|
|
ENDIF()
|
|
|
|
# avoids annoying and pointless warnings from gcc
|
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE")
|
|
SET(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -c")
|