bcm_host: Honor previously set value of CMAKE_SHARED_LINKER_FLAGS
authorKhem Raj <raj.khem@gmail.com>
Sat, 11 Mar 2017 08:51:44 +0000 (00:51 -0800)
committerPhil Elwell <pelwell@users.noreply.github.com>
Sat, 11 Mar 2017 10:11:41 +0000 (10:11 +0000)
This fixes the problem where linker flags coming from top level
makefiles or environment are no longer respected anymore. This
is for example important to pass hardening flags to the build

Signed-off-by: Khem Raj <raj.khem@gmail.com>
host_applications/linux/libs/bcm_host/CMakeLists.txt

index 3c6b476590de89a0878e8beec6e510de7e9fd8ae..a863cb6d2b1ae9a9ff4ae5db11c0f39a0f9c9ec3 100644 (file)
@@ -7,7 +7,7 @@ else ()
 endif ()
 
 # set this as we want all the source of vchostif to be available in libbcm_host
-set (CMAKE_SHARED_LINKER_FLAGS "-u vc_gpuserv_init")
+set (CMAKE_SHARED_LINKER_FLAGS "-u vc_gpuserv_init ${CMAKE_SHARED_LINKER_FLAGS}")
 
 include_directories( ../../../.. 
                     ../../../../interface/vcos/${VCOS_PLATFORM}