From ac26812e5c56a82b46da33119cdbac0218a25d8d Mon Sep 17 00:00:00 2001 From: lancesix <98881381+lancesix@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:17:22 +0100 Subject: [PATCH] external/otf2/CMakeLists: Do not pass LDFLAGS from env (#1010) When configuring the otf2 dependency, CFLAGS, CXXFLAGS, CC and CXX are explicitly specified, but LDFLAGS is not. As a consequence, LDFLAGS is picked up from the environment (if set). In some build configurations, the LDFLAG from the environment is not compatible with the rest of the compiler/linker configuration options specified in CMakeLists.txt, resulting in the configure script failing. This patch make sure to specify an empty LDFLAGS when configuring otf2 build to avoid such issues. Bug: SWDEV-477693 [ROCm/rocprofiler-sdk commit: 9f3cffc39ae89564f574c020ea448011ff27871f] --- projects/rocprofiler-sdk/external/otf2/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rocprofiler-sdk/external/otf2/CMakeLists.txt b/projects/rocprofiler-sdk/external/otf2/CMakeLists.txt index 252449b8b2..b1ee50c76d 100644 --- a/projects/rocprofiler-sdk/external/otf2/CMakeLists.txt +++ b/projects/rocprofiler-sdk/external/otf2/CMakeLists.txt @@ -59,7 +59,7 @@ externalproject_add( PATCH_COMMAND ${CMAKE_COMMAND} -E env CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} /configure -q --prefix=${_otf2_root} CFLAGS=-fPIC\ -O3\ -g - CXXFLAGS=-fPIC\ -O3\ -g PYTHON=: SPHINX=: + CXXFLAGS=-fPIC\ -O3\ -g LDFLAGS= PYTHON=: SPHINX=: CONFIGURE_COMMAND ${MAKE_COMMAND} install -s BUILD_COMMAND "" BUILD_BYPRODUCTS "${_otf2_build_byproducts}"