From 8993a7e98f5c86fca9a99d95322d4a9032d30289 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Mon, 27 Jul 2020 17:20:46 -0400 Subject: [PATCH] Fix #785, update vxworks 6.9 example toolchain Add missing include path to the target/h and wrn/coreip directory. Set and clarify difference between WIND_HOME and WIND_BASE variables. Remove unrelated comment about CEXP (remnant from RTEMS). --- .../toolchain-ppc-vxworks6.9.cmake | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/cmake/sample_defs/toolchain-ppc-vxworks6.9.cmake b/cmake/sample_defs/toolchain-ppc-vxworks6.9.cmake index 900f0e147..e33754b41 100644 --- a/cmake/sample_defs/toolchain-ppc-vxworks6.9.cmake +++ b/cmake/sample_defs/toolchain-ppc-vxworks6.9.cmake @@ -7,11 +7,24 @@ set(CMAKE_SYSTEM_PROCESSOR ppc) set(CMAKE_SYSTEM_VERSION 6.9) set(VXWORKS_GCC_VERSION 4.3.3) set(VXWORKS_HOST_VERSION x86-linux2) + +# The VxWorks toolchain relies on several environment variables, +# which should be set already by an environment setup script. + +# WIND_HOME refers to the top-level installation directory set(WIND_HOME_DFL "$ENV{WIND_HOME}") if(NOT WIND_HOME_DFL) set(WIND_HOME_DFL "/opt/WindRiver") endif(NOT WIND_HOME_DFL) -set(WIND_HOME "${WIND_HOME_DFL}" CACHE PATH "Wind River installation directory") +set(WIND_HOME "${WIND_HOME_DFL}" CACHE PATH "Wind River top level installation directory") + +# WIND_BASE refers to the system-specific installation directory (e.g. vxworks-) +set(WIND_BASE_DFL "$ENV{WIND_BASE}") +if(NOT WIND_BASE_DFL) + set(WIND_BASE_DFL "${WIND_HOME}/vxworks-${CMAKE_SYSTEM_VERSION}") +endif(NOT WIND_BASE_DFL) +set(WIND_BASE "${WIND_BASE_DFL}" CACHE PATH "Wind River product installation directory") + set(VXWORKS_TOOLS_PREFIX "${WIND_HOME}/gnu/${VXWORKS_GCC_VERSION}-vxworks-${CMAKE_SYSTEM_VERSION}/${VXWORKS_HOST_VERSION}") @@ -30,10 +43,6 @@ SET(CMAKE_AR "${SDKHOSTBINDIR}/ar${TARGETSUFFIX}") SET(CMAKE_OBJDUMP "${SDKHOSTBINDIR}/objdump${TARGETSUFFIX}") SET(CMAKE_RANLIB "${SDKHOSTBINDIR}/ranlib${TARGETSUFFIX}") -# Note that CEXP is not a shared library loader - it will not support code compiled with -fPIC -# Also exception handling is very iffy. These two options disable eh_frame creation. -#set(CMAKE_C_COMPILE_OPTIONS_PIC -fno-exceptions -fno-asynchronous-unwind-tables) - # search for programs in the build host directories SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) @@ -46,6 +55,7 @@ SET(CMAKE_PREFIX_PATH /) # these settings are specific to cFE/OSAL and determines which # abstraction layers are built when using this toolchain SET(CFE_SYSTEM_PSPNAME mcp750-vxworks) -SET(OSAL_SYSTEM_BSPTYPE mcp750-vxworks) -SET(OSAL_SYSTEM_OSTYPE vxworks) + +include_directories(${WIND_BASE}/target/h/wrn/coreip) +include_directories(${WIND_BASE}/target/h)