From 1ee1aa1b8b8c546c50e2b600a69eef9bc58beff9 Mon Sep 17 00:00:00 2001 From: Slava Barinov Date: Tue, 1 Nov 2016 16:24:09 +0300 Subject: [PATCH] Create ubsan-runtime-env The package installs libusan and sets up UBSAN_OPTIONS Change-Id: I19929e7bff9c62ede70c5729751dd8a535869a70 Signed-off-by: Slava Barinov --- packaging/gcc-aarch64.spec | 14 ++++++++++++++ packaging/gcc-armv7l.spec | 14 ++++++++++++++ packaging/linaro-gcc.spec | 14 ++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/packaging/gcc-aarch64.spec b/packaging/gcc-aarch64.spec index 748778d..992c9f2 100644 --- a/packaging/gcc-aarch64.spec +++ b/packaging/gcc-aarch64.spec @@ -744,6 +744,17 @@ echo "halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_s # Restore /etc/ld.so.preload [ -f /etc/ld.so.preload.orig ] && mv -v /etc/ld.so.preload.orig /etc/ld.so.preload +%package -n ubsan-runtime-env +Summary: UBSan runtime environment for target device +Group: Development/Libraries +Requires: libubsan + +%description -n ubsan-runtime-env +UBSan runtime environment + +%post -n ubsan-runtime-env +echo "print_cmdline=true:log_path=/tmp/ubsan.log" > /UBSAN_OPTIONS + %package plugin-devel Summary: GNU GCC Plugin development files License: GPL-3.0+ @@ -1214,6 +1225,9 @@ install -m 0755 %{SOURCE23} %{buildroot}/%{_rpmconfigdir}/tizen/ /UBSAN_OPTIONS %{_rpmconfigdir}/macros.ubsan %{_rpmconfigdir}/tizen/extract-ubsan-logs + +%files -n ubsan-runtime-env +%defattr(-,root,root,-) %endif %files -n sanitizer-devel diff --git a/packaging/gcc-armv7l.spec b/packaging/gcc-armv7l.spec index 5862872..d0a2382 100644 --- a/packaging/gcc-armv7l.spec +++ b/packaging/gcc-armv7l.spec @@ -744,6 +744,17 @@ echo "halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_s # Restore /etc/ld.so.preload [ -f /etc/ld.so.preload.orig ] && mv -v /etc/ld.so.preload.orig /etc/ld.so.preload +%package -n ubsan-runtime-env +Summary: UBSan runtime environment for target device +Group: Development/Libraries +Requires: libubsan + +%description -n ubsan-runtime-env +UBSan runtime environment + +%post -n ubsan-runtime-env +echo "print_cmdline=true:log_path=/tmp/ubsan.log" > /UBSAN_OPTIONS + %package plugin-devel Summary: GNU GCC Plugin development files License: GPL-3.0+ @@ -1214,6 +1225,9 @@ install -m 0755 %{SOURCE23} %{buildroot}/%{_rpmconfigdir}/tizen/ /UBSAN_OPTIONS %{_rpmconfigdir}/macros.ubsan %{_rpmconfigdir}/tizen/extract-ubsan-logs + +%files -n ubsan-runtime-env +%defattr(-,root,root,-) %endif %files -n sanitizer-devel diff --git a/packaging/linaro-gcc.spec b/packaging/linaro-gcc.spec index ad3cbf0..60f2afd 100644 --- a/packaging/linaro-gcc.spec +++ b/packaging/linaro-gcc.spec @@ -741,6 +741,17 @@ echo "halt_on_error=false:start_deactivated=true:print_cmdline=true:quarantine_s # Restore /etc/ld.so.preload [ -f /etc/ld.so.preload.orig ] && mv -v /etc/ld.so.preload.orig /etc/ld.so.preload +%package -n ubsan-runtime-env +Summary: UBSan runtime environment for target device +Group: Development/Libraries +Requires: libubsan + +%description -n ubsan-runtime-env +UBSan runtime environment + +%post -n ubsan-runtime-env +echo "print_cmdline=true:log_path=/tmp/ubsan.log" > /UBSAN_OPTIONS + %package plugin-devel Summary: GNU GCC Plugin development files License: GPL-3.0+ @@ -1211,6 +1222,9 @@ install -m 0755 %{SOURCE23} %{buildroot}/%{_rpmconfigdir}/tizen/ /UBSAN_OPTIONS %{_rpmconfigdir}/macros.ubsan %{_rpmconfigdir}/tizen/extract-ubsan-logs + +%files -n ubsan-runtime-env +%defattr(-,root,root,-) %endif %files -n sanitizer-devel -- 2.7.4