summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2024-08-20 10:57:10 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2024-08-22 10:50:02 +0900
commitff7a37b201729b47871074bec0a6d4c9c9237d8a (patch)
tree0e3d23cdf883e0a4eff4dd928a75f7e8f168e886
parent32f68cdd492f9336407acb666c5c2d9342610296 (diff)
downloadlibjxl-accepted/tizen_unified_x.tar.gz
libjxl-accepted/tizen_unified_x.tar.bz2
libjxl-accepted/tizen_unified_x.zip
The '-fmerge-all-constants' build flag makes asan detect constexpr variable not properly in global data and, so asan reports stack-use-after-scope issue. To remove the asan issue, for asan build, replace the '-fmerge-all-constants' flag with '-fno-merge-all-constants'. Change-Id: I637f3ded3ad049bf967bdc35caa5df52bbd3fd94 Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rw-r--r--packaging/libjxl.spec3
1 files changed, 3 insertions, 0 deletions
diff --git a/packaging/libjxl.spec b/packaging/libjxl.spec
index 92af1d7..d09134a 100644
--- a/packaging/libjxl.spec
+++ b/packaging/libjxl.spec
@@ -44,6 +44,9 @@ Description: JPEG XL encoder and decoder library (tools)
cp %{SOURCE1} .
%build
+%if "%{asan}" == "1"
+sed -i 's/-fmerge-all-constants/-fno-merge-all-constants/g' lib/CMakeLists.txt
+%endif
%cmake . -DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=OFF \
%if %{enable_tools}