From e275eca6c129ba36b9c6c6ee40f97ef572fb5074 Mon Sep 17 00:00:00 2001 From: Denis Khalikov Date: Mon, 13 Nov 2017 20:48:14 +0300 Subject: [PATCH] [TSan] Add new runtime flag "run_under_qemu". This flag allows to manage cross build for binaries with TSan instrumentation. Change-Id: I41b1cca0506c566f2070f9c17ca68945a3d707f5 --- packaging/gcc-contrib.spec | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/packaging/gcc-contrib.spec b/packaging/gcc-contrib.spec index 756be11..ebf80c0 100644 --- a/packaging/gcc-contrib.spec +++ b/packaging/gcc-contrib.spec @@ -273,6 +273,21 @@ TSan runtime environment echo "%{tsan_runtime_options}" > /TSAN_OPTIONS chsmack -a "_" /TSAN_OPTIONS +%package -n tsan-build-env +Summary: TSan build environment +Group: Development/Libraries +Requires: libtsan + +%description -n tsan-build-env +TSan build environment + +%post -n tsan-build-env +echo "%{tsan_runtime_options}" > /TSAN_OPTIONS +%ifarch aarch64 +echo ":run_under_qemu=1" >> /TSAN_OPTIONS +%endif +chsmack -a "_" /TSAN_OPTIONS + %package -n asan-build-env Summary: Asan build environment Group: Development/Libraries @@ -448,6 +463,10 @@ install -m 0755 %{SOURCE23} %{buildroot}/%{_rpmconfigdir}/tizen/ %files -n tsan-runtime-env %defattr(-,root,root,-) /TSAN_OPTIONS + +%files -n tsan-build-env +%defattr(-,root,root,-) +/TSAN_OPTIONS %endif %ifarch %ubsan_arch -- 2.7.4