From: Slava Barinov Date: Thu, 12 May 2016 10:06:59 +0000 (+0300) Subject: Install ASAN_OPTIONS from file X-Git-Tag: accepted/tizen/base/20160805.171139~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1aa21575d725171fa3f891ee13f87b203055956b;p=platform%2Fupstream%2Flinaro-gcc.git Install ASAN_OPTIONS from file Using ASAN_OPTIONS file is simpler solution that post-install script and prevents issues with sanitized bash. Change-Id: Iaa2b362f0cff0d7269635780dfc88bd6c3ec7d52 Signed-off-by: Slava Barinov --- diff --git a/packaging/ASAN_OPTIONS b/packaging/ASAN_OPTIONS new file mode 100644 index 0000000..24fcaeb --- /dev/null +++ b/packaging/ASAN_OPTIONS @@ -0,0 +1 @@ +halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_size_mb=1:detect_leaks=0 \ No newline at end of file diff --git a/packaging/gcc-aarch64.spec b/packaging/gcc-aarch64.spec index 971af2c..5dc2801 100644 --- a/packaging/gcc-aarch64.spec +++ b/packaging/gcc-aarch64.spec @@ -85,6 +85,7 @@ Source13: isl-0.12.2.tar.bz2 Source14: cloog-0.18.1.tar.gz Source15: gcc-force-options Source16: gcc-unforce-options +Source17: ASAN_OPTIONS Group: Development/Building Summary: The GNU C Compiler and Support Files License: GPL-3.0+ @@ -656,7 +657,6 @@ Asan build environment echo "libasan.so" > /etc/ld.so.preload [ -f /etc/ld.so.preload.orig ] && cat /etc/ld.so.preload.orig >> /etc/ld.so.preload [ -f /etc/ld.so.preload.orig ] && rm -f /etc/ld.so.preload.orig -echo "halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_size_mb=1:detect_leaks=0" > /ASAN_OPTIONS %preun -n asan-build-env # Restore /etc/ld.so.preload @@ -843,10 +843,15 @@ rm -rf %{buildroot}/%{libsubdir}/include-fixed rm -rf %{buildroot}/%{libsubdir}/include } +%{!?cross: cp %{SOURCE15} %{SOURCE16} %{buildroot}%{_prefix}/bin chmod a+x %{buildroot}%{_prefix}/bin/gcc-force-options chmod a+x %{buildroot}%{_prefix}/bin/gcc-unforce-options +cp %{SOURCE17} %{buildroot} +chmod 644 %{buildroot}/ASAN_OPTIONS +} + %files %defattr(-,root,root) %{?cross: @@ -1064,6 +1069,7 @@ chmod a+x %{buildroot}%{_prefix}/bin/gcc-unforce-options %files -n asan-build-env %defattr(-,root,root,-) +/ASAN_OPTIONS %ifarch %lsan_arch %files -n lsan-build-env diff --git a/packaging/gcc-armv7l.spec b/packaging/gcc-armv7l.spec index 143eaa8..ba5ec68 100644 --- a/packaging/gcc-armv7l.spec +++ b/packaging/gcc-armv7l.spec @@ -85,6 +85,7 @@ Source13: isl-0.12.2.tar.bz2 Source14: cloog-0.18.1.tar.gz Source15: gcc-force-options Source16: gcc-unforce-options +Source17: ASAN_OPTIONS Group: Development/Building Summary: The GNU C Compiler and Support Files License: GPL-3.0+ @@ -656,7 +657,6 @@ Asan build environment echo "libasan.so" > /etc/ld.so.preload [ -f /etc/ld.so.preload.orig ] && cat /etc/ld.so.preload.orig >> /etc/ld.so.preload [ -f /etc/ld.so.preload.orig ] && rm -f /etc/ld.so.preload.orig -echo "halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_size_mb=1:detect_leaks=0" > /ASAN_OPTIONS %preun -n asan-build-env # Restore /etc/ld.so.preload @@ -843,10 +843,15 @@ rm -rf %{buildroot}/%{libsubdir}/include-fixed rm -rf %{buildroot}/%{libsubdir}/include } +%{!?cross: cp %{SOURCE15} %{SOURCE16} %{buildroot}%{_prefix}/bin chmod a+x %{buildroot}%{_prefix}/bin/gcc-force-options chmod a+x %{buildroot}%{_prefix}/bin/gcc-unforce-options +cp %{SOURCE17} %{buildroot} +chmod 644 %{buildroot}/ASAN_OPTIONS +} + %files %defattr(-,root,root) %{?cross: @@ -1064,6 +1069,7 @@ chmod a+x %{buildroot}%{_prefix}/bin/gcc-unforce-options %files -n asan-build-env %defattr(-,root,root,-) +/ASAN_OPTIONS %ifarch %lsan_arch %files -n lsan-build-env diff --git a/packaging/linaro-gcc.spec b/packaging/linaro-gcc.spec index 7dc620a..01e3022 100644 --- a/packaging/linaro-gcc.spec +++ b/packaging/linaro-gcc.spec @@ -82,6 +82,7 @@ Source13: isl-0.12.2.tar.bz2 Source14: cloog-0.18.1.tar.gz Source15: gcc-force-options Source16: gcc-unforce-options +Source17: ASAN_OPTIONS Group: Development/Building Summary: The GNU C Compiler and Support Files License: GPL-3.0+ @@ -653,7 +654,6 @@ Asan build environment echo "libasan.so" > /etc/ld.so.preload [ -f /etc/ld.so.preload.orig ] && cat /etc/ld.so.preload.orig >> /etc/ld.so.preload [ -f /etc/ld.so.preload.orig ] && rm -f /etc/ld.so.preload.orig -echo "halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_size_mb=1:detect_leaks=0" > /ASAN_OPTIONS %preun -n asan-build-env # Restore /etc/ld.so.preload @@ -840,10 +840,15 @@ rm -rf %{buildroot}/%{libsubdir}/include-fixed rm -rf %{buildroot}/%{libsubdir}/include } +%{!?cross: cp %{SOURCE15} %{SOURCE16} %{buildroot}%{_prefix}/bin chmod a+x %{buildroot}%{_prefix}/bin/gcc-force-options chmod a+x %{buildroot}%{_prefix}/bin/gcc-unforce-options +cp %{SOURCE17} %{buildroot} +chmod 644 %{buildroot}/ASAN_OPTIONS +} + %files %defattr(-,root,root) %{?cross: @@ -1061,6 +1066,7 @@ chmod a+x %{buildroot}%{_prefix}/bin/gcc-unforce-options %files -n asan-build-env %defattr(-,root,root,-) +/ASAN_OPTIONS %ifarch %lsan_arch %files -n lsan-build-env