%define binutils_run_tests 1
%endif
+# Enable this when testing on device to:
+# 1. Enable macro to turn on testsuite building ('binutils_run_tests 1')
+# 2. Keep 'obj/' folder in build stage as we do not want to rebuild all binutils
+# again on device after invoking rpmbuild --short-circuit -bc ...
+# 3. Skip configure and make commands and go directly to 'make check'
+%if 0%{?run_tests_on_device}
+%define binutils_run_tests 1
+%define binutils_keep_build_dir 1
+%define binutils_skip_configure 1
+%define binutils_skip_make 1
+%endif
+
+# Exit right after 'make ..' step to keep all object files produced by binutils build
+%if 0%{?exit_on_make_finish}
+%define binutils_exit_on_make_finish 1
+%endif
+
Name: binutils%{?cross:-%{cross}}
BuildRequires: makeinfo
BuildRequires: bison
Java, and other languages, by executing them in a controlled fashion
and printing their data.
-This package provides a program that allows you to run GDB on a different machine than the one
+This package provides a program that allows you to run GDB on a different machine than the one
which is running the program being debugged.
+%{?binutils_run_tests:
+%package testresults
+Summary: Testsuite results
+License: SUSE-Public-Domain
+Group: Development/Languages
+%description testresults
+Results from running the gcc and target library testsuites.
+}
+
+
%prep
%setup -q -n binutils-%{version}
cp %{SOURCE1001} .
export CFLAGS="${RPM_OPT_FLAGS}"
export CXXFLAGS="${RPM_OPT_FLAGS}"
+%{!?binutils_keep_build_dir:
+rm -rf build-dir
+}
mkdir build-dir
cd build-dir
+%{!?binutils_skip_configure:
../configure \
--prefix=%{_prefix} --libdir=%{_libdir} \
--infodir=%{_infodir} --mandir=%{_mandir} \
--with-separate-debug-dir=/usr/lib/debug \
--disable-sim \
--with-expat
-
+}
+%{!?binutils_skip_make:
make %{?_smp_mflags}
+}
+
+%{?binutils_exit_on_make_finish:
+ exit 1
+}
-%check
%{?binutils_run_tests:
- make %{?_smp_mflags} -C build-dir check -k
+ echo "Run testsuite"
+ # asan needs a whole shadow address space
+ ulimit -v unlimited || true
+ make -k check %{?_smp_mflags} || true
+ mkdir ../testresults
+ ../contrib/test_summary | tee ../testresults/test_summary.txt
}
%install
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_prefix}/%{_lib}
install -m 644 ../include/libiberty.h %{buildroot}%{_prefix}/include
+%{?binutils_run_tests:
+ find . \( -name "*.sum" -o -name "*.log" -a \! -name "config.log" \) -exec tar -rf testresults.tar {} \;
+ mkdir -p ../testresults && tar -xf testresults.tar -C ../testresults
+ find ../testresults/ -type f -exec chmod 644 {} \;
+}
+
# Remove unwanted files to shut up rpm
%{remove_docs}
rm -rf %{buildroot}%{_libdir}/lib{bfd,opcodes,inproctrace}.{so,la}
%{_bindir}/gdbserver
}
+%{?binutils_run_tests:
+%files testresults
+%defattr(-,root,root)
+%doc testresults/test_summary.txt
+%doc testresults/*
+}
+
%changelog
%define binutils_run_tests 1
%endif
+# Enable this when testing on device to:
+# 1. Enable macro to turn on testsuite building ('binutils_run_tests 1')
+# 2. Keep 'obj/' folder in build stage as we do not want to rebuild all binutils
+# again on device after invoking rpmbuild --short-circuit -bc ...
+# 3. Skip configure and make commands and go directly to 'make check'
+%if 0%{?run_tests_on_device}
+%define binutils_run_tests 1
+%define binutils_keep_build_dir 1
+%define binutils_skip_configure 1
+%define binutils_skip_make 1
+%endif
+
+# Exit right after 'make ..' step to keep all object files produced by binutils build
+%if 0%{?exit_on_make_finish}
+%define binutils_exit_on_make_finish 1
+%endif
+
Name: binutils%{?cross:-%{cross}}
BuildRequires: makeinfo
BuildRequires: bison
Java, and other languages, by executing them in a controlled fashion
and printing their data.
-This package provides a program that allows you to run GDB on a different machine than the one
+This package provides a program that allows you to run GDB on a different machine than the one
which is running the program being debugged.
+%{?binutils_run_tests:
+%package testresults
+Summary: Testsuite results
+License: SUSE-Public-Domain
+Group: Development/Languages
+%description testresults
+Results from running the gcc and target library testsuites.
+}
+
+
%prep
%setup -q -n binutils-%{version}
cp %{SOURCE1001} .
export CFLAGS="${RPM_OPT_FLAGS}"
export CXXFLAGS="${RPM_OPT_FLAGS}"
+%{!?binutils_keep_build_dir:
+rm -rf build-dir
+}
mkdir build-dir
cd build-dir
+%{!?binutils_skip_configure:
../configure \
--prefix=%{_prefix} --libdir=%{_libdir} \
--infodir=%{_infodir} --mandir=%{_mandir} \
--with-separate-debug-dir=/usr/lib/debug \
--disable-sim \
--with-expat
-
+}
+%{!?binutils_skip_make:
make %{?_smp_mflags}
+}
+
+%{?binutils_exit_on_make_finish:
+ exit 1
+}
-%check
%{?binutils_run_tests:
- make %{?_smp_mflags} -C build-dir check -k
+ echo "Run testsuite"
+ # asan needs a whole shadow address space
+ ulimit -v unlimited || true
+ make -k check %{?_smp_mflags} || true
+ mkdir ../testresults
+ ../contrib/test_summary | tee ../testresults/test_summary.txt
}
%install
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_prefix}/%{_lib}
install -m 644 ../include/libiberty.h %{buildroot}%{_prefix}/include
+%{?binutils_run_tests:
+ find . \( -name "*.sum" -o -name "*.log" -a \! -name "config.log" \) -exec tar -rf testresults.tar {} \;
+ mkdir -p ../testresults && tar -xf testresults.tar -C ../testresults
+ find ../testresults/ -type f -exec chmod 644 {} \;
+}
+
# Remove unwanted files to shut up rpm
%{remove_docs}
rm -rf %{buildroot}%{_libdir}/lib{bfd,opcodes,inproctrace}.{so,la}
%{_bindir}/gdbserver
}
+%{?binutils_run_tests:
+%files testresults
+%defattr(-,root,root)
+%doc testresults/test_summary.txt
+%doc testresults/*
+}
+
%changelog
%define binutils_run_tests 1
%endif
+# Enable this when testing on device to:
+# 1. Enable macro to turn on testsuite building ('binutils_run_tests 1')
+# 2. Keep 'obj/' folder in build stage as we do not want to rebuild all binutils
+# again on device after invoking rpmbuild --short-circuit -bc ...
+# 3. Skip configure and make commands and go directly to 'make check'
+%if 0%{?run_tests_on_device}
+%define binutils_run_tests 1
+%define binutils_keep_build_dir 1
+%define binutils_skip_configure 1
+%define binutils_skip_make 1
+%endif
+
+# Exit right after 'make ..' step to keep all object files produced by binutils build
+%if 0%{?exit_on_make_finish}
+%define binutils_exit_on_make_finish 1
+%endif
+
Name: binutils%{?cross:-%{cross}}
BuildRequires: makeinfo
BuildRequires: bison
Java, and other languages, by executing them in a controlled fashion
and printing their data.
-This package provides a program that allows you to run GDB on a different machine than the one
+This package provides a program that allows you to run GDB on a different machine than the one
which is running the program being debugged.
+%{?binutils_run_tests:
+%package testresults
+Summary: Testsuite results
+License: SUSE-Public-Domain
+Group: Development/Languages
+%description testresults
+Results from running the gcc and target library testsuites.
+}
+
+
%prep
%setup -q -n binutils-%{version}
cp %{SOURCE1001} .
export CFLAGS="${RPM_OPT_FLAGS}"
export CXXFLAGS="${RPM_OPT_FLAGS}"
+%{!?binutils_keep_build_dir:
+rm -rf build-dir
+}
mkdir build-dir
cd build-dir
+%{!?binutils_skip_configure:
../configure \
--prefix=%{_prefix} --libdir=%{_libdir} \
--infodir=%{_infodir} --mandir=%{_mandir} \
--with-separate-debug-dir=/usr/lib/debug \
--disable-sim \
--with-expat
-
+}
+%{!?binutils_skip_make:
make %{?_smp_mflags}
+}
+
+%{?binutils_exit_on_make_finish:
+ exit 1
+}
-%check
%{?binutils_run_tests:
- make %{?_smp_mflags} -C build-dir check -k
+ echo "Run testsuite"
+ # asan needs a whole shadow address space
+ ulimit -v unlimited || true
+ make -k check %{?_smp_mflags} || true
+ mkdir ../testresults
+ ../contrib/test_summary | tee ../testresults/test_summary.txt
}
%install
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_prefix}/%{_lib}
install -m 644 ../include/libiberty.h %{buildroot}%{_prefix}/include
+%{?binutils_run_tests:
+ find . \( -name "*.sum" -o -name "*.log" -a \! -name "config.log" \) -exec tar -rf testresults.tar {} \;
+ mkdir -p ../testresults && tar -xf testresults.tar -C ../testresults
+ find ../testresults/ -type f -exec chmod 644 {} \;
+}
+
# Remove unwanted files to shut up rpm
%{remove_docs}
rm -rf %{buildroot}%{_libdir}/lib{bfd,opcodes,inproctrace}.{so,la}
%{_bindir}/gdbserver
}
+%{?binutils_run_tests:
+%files testresults
+%defattr(-,root,root)
+%doc testresults/test_summary.txt
+%doc testresults/*
+}
+
%changelog
%define binutils_run_tests 1
%endif
+# Enable this when testing on device to:
+# 1. Enable macro to turn on testsuite building ('binutils_run_tests 1')
+# 2. Keep 'obj/' folder in build stage as we do not want to rebuild all binutils
+# again on device after invoking rpmbuild --short-circuit -bc ...
+# 3. Skip configure and make commands and go directly to 'make check'
+%if 0%{?run_tests_on_device}
+%define binutils_run_tests 1
+%define binutils_keep_build_dir 1
+%define binutils_skip_configure 1
+%define binutils_skip_make 1
+%endif
+
+# Exit right after 'make ..' step to keep all object files produced by binutils build
+%if 0%{?exit_on_make_finish}
+%define binutils_exit_on_make_finish 1
+%endif
+
Name: binutils%{?cross:-%{cross}}
BuildRequires: makeinfo
BuildRequires: bison
Java, and other languages, by executing them in a controlled fashion
and printing their data.
-This package provides a program that allows you to run GDB on a different machine than the one
+This package provides a program that allows you to run GDB on a different machine than the one
which is running the program being debugged.
+%{?binutils_run_tests:
+%package testresults
+Summary: Testsuite results
+License: SUSE-Public-Domain
+Group: Development/Languages
+%description testresults
+Results from running the gcc and target library testsuites.
+}
+
+
%prep
%setup -q -n binutils-%{version}
cp %{SOURCE1001} .
export CFLAGS="${RPM_OPT_FLAGS}"
export CXXFLAGS="${RPM_OPT_FLAGS}"
+%{!?binutils_keep_build_dir:
+rm -rf build-dir
+}
mkdir build-dir
cd build-dir
+%{!?binutils_skip_configure:
../configure \
--prefix=%{_prefix} --libdir=%{_libdir} \
--infodir=%{_infodir} --mandir=%{_mandir} \
--with-separate-debug-dir=/usr/lib/debug \
--disable-sim \
--with-expat
-
+}
+%{!?binutils_skip_make:
make %{?_smp_mflags}
+}
+
+%{?binutils_exit_on_make_finish:
+ exit 1
+}
-%check
%{?binutils_run_tests:
- make %{?_smp_mflags} -C build-dir check -k
+ echo "Run testsuite"
+ # asan needs a whole shadow address space
+ ulimit -v unlimited || true
+ make -k check %{?_smp_mflags} || true
+ mkdir ../testresults
+ ../contrib/test_summary | tee ../testresults/test_summary.txt
}
%install
install -m 644 libiberty/pic/libiberty.a %{buildroot}%{_prefix}/%{_lib}
install -m 644 ../include/libiberty.h %{buildroot}%{_prefix}/include
+%{?binutils_run_tests:
+ find . \( -name "*.sum" -o -name "*.log" -a \! -name "config.log" \) -exec tar -rf testresults.tar {} \;
+ mkdir -p ../testresults && tar -xf testresults.tar -C ../testresults
+ find ../testresults/ -type f -exec chmod 644 {} \;
+}
+
# Remove unwanted files to shut up rpm
%{remove_docs}
rm -rf %{buildroot}%{_libdir}/lib{bfd,opcodes,inproctrace}.{so,la}
%{_bindir}/gdbserver
}
+%{?binutils_run_tests:
+%files testresults
+%defattr(-,root,root)
+%doc testresults/test_summary.txt
+%doc testresults/*
+}
+
%changelog