Index: rocprofiler-rocm-5.0.2/cmake_modules/env.cmake
===================================================================
--- rocprofiler-rocm-5.0.2.orig/cmake_modules/env.cmake
+++ rocprofiler-rocm-5.0.2/cmake_modules/env.cmake
@@ -51,7 +51,7 @@ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS
 #set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=int-in-bool-context" )
 set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
 
-set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,-Bdynamic -Wl,-z,noexecstack" )
+set ( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bdynamic -Wl,-z,noexecstack" )
 
 set ( CMAKE_SKIP_BUILD_RPATH TRUE )
 
