diff --git a/dwz-remove-odr-struct-multifile.sh.patch b/dwz-remove-odr-struct-multifile.sh.patch new file mode 100644 index 0000000..a5ccdc0 --- /dev/null +++ b/dwz-remove-odr-struct-multifile.sh.patch @@ -0,0 +1,59 @@ +diff --git a/testsuite/dwz.tests/odr-struct-multifile.sh b/testsuite/dwz.tests/odr-struct-multifile.sh +deleted file mode 100644 +index cc462c9..0000000 +--- a/testsuite/dwz.tests/odr-struct-multifile.sh ++++ /dev/null +@@ -1,53 +0,0 @@ +-if ! $execs/dwz-for-test --odr -v 2>/dev/null; then +- exit 77 +-fi +- +-cp $execs/odr-struct 1 +-cp 1 2 +- +-for name in aaa bbb ccc; do +- cnt=$(readelf -wi 1 | grep -c "DW_AT_name.*:.*$name" || true) +- [ $cnt -eq 2 ] +-done +- +-for name in member_one member_two member_three member_four; do +- cnt=$(readelf -wi 1 | grep -c "DW_AT_name.*:.*$name" || true) +- case $name in +- member_one|member_two) +- [ $cnt -eq 2 ] +- ;; +- member_three|member_four) +- [ $cnt -eq 1 ] +- ;; +- esac +-done +- +-decl_cnt=$(readelf -wi 1 | grep -c "DW_AT_declaration" || true) +- +-$execs/dwz-for-test --odr 1 2 -m 3 +- +-verify-dwarf.sh 1 +-verify-dwarf.sh 3 +- +-for name in aaa bbb ccc; do +- cnt=$(readelf -wi 3 | grep -c "DW_AT_name.*:.*$name" || true) +- [ $cnt -eq 1 ] +-done +- +-for name in member_one member_two member_three member_four; do +- cnt=$(readelf -wi 3 | grep -c "DW_AT_name.*:.*$name" || true) +- [ $cnt -eq 1 ] +-done +- +- +-for name in aaa bbb ccc; do +- cnt=$(readelf -wi 1 | grep -c "DW_AT_name.*:.*$name" || true) +- [ $cnt -eq 0 ] +-done +- +-for name in member_one member_two member_three member_four; do +- cnt=$(readelf -wi 1 | grep -c "DW_AT_name.*:.*$name" || true) +- [ $cnt -eq 0 ] +-done +- +-rm -f 1 2 3 diff --git a/dwz.changes b/dwz.changes index 8396f9b..8055266 100644 --- a/dwz.changes +++ b/dwz.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed Jan 5 06:20:01 UTC 2022 - Martin Liška + +- Add dwz-remove-odr-struct-multifile.sh.patch that removes problematic + testcase. + +------------------------------------------------------------------- +Thu Dec 23 10:59:49 UTC 2021 - Martin Liška + +- Start using -O3 and PGO with tramp3d as training binary. + ------------------------------------------------------------------- Wed Mar 17 15:54:22 UTC 2021 - Tom de Vries diff --git a/dwz.spec b/dwz.spec index ef6476e..6123a7f 100644 --- a/dwz.spec +++ b/dwz.spec @@ -1,7 +1,7 @@ # -# spec file for package dwz%{name_suffix} +# spec file # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -58,12 +58,12 @@ Group: Development/Tools/Building #Git-Web: https://sourceware.org/git/?p=dwz.git;a=summary Source: dwz-%{version}.tar.xz URL: https://sourceware.org/dwz/ +BuildRequires: gcc-c++ BuildRequires: libelf-devel BuildRequires: xz %if %{build_testsuite} BuildRequires: dejagnu BuildRequires: elfutils -BuildRequires: gcc-c++ BuildRequires: gdb %ifnarch riscv64 BuildRequires: binutils-gold @@ -79,11 +79,13 @@ NoSource: 0 %endif Source1: dwz-rpmlintrc +Source2: tramp3d-v4.cpp.xz Patch1: dwz-fix-another-reference-from-pu-to-cu-for-odr.patch Patch2: dwz-handle-reordered-dup-chains-in-create-import-tree.patch Patch3: dwz-enable-odr-by-default.patch Patch4: dwz-testsuite-fix-pr27463.sh-on-riscv64.patch +Patch5: dwz-remove-odr-struct-multifile.sh.patch %if %{build_main} %description @@ -116,9 +118,22 @@ This package contains the testsuite results from DWZ. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 +cp ../../SOURCES/tramp3d-v4.cpp.xz . +xz -d tramp3d-v4.cpp.xz %build -make %{?_smp_mflags} CFLAGS="%{optflags}" +%define flags %{optflags} -O3 + +# Do PGO with tramp3d as input file +%make_build CFLAGS="%{flags} -fprofile-generate" LDFLAGS="-fprofile-generate" +g++ tramp3d-v4.cpp -O2 -g -o t1 +cp t1 t2 +cp t1 t3 +cp t1 t4 +./dwz -m tmp.debug t1 t2 t3 t4 +make clean +%make_build CFLAGS="%{flags} -fprofile-use" LDFLAGS="-fprofile-use" %check %if %{build_testsuite} diff --git a/tramp3d-v4.cpp.xz b/tramp3d-v4.cpp.xz new file mode 100644 index 0000000..758f90b --- /dev/null +++ b/tramp3d-v4.cpp.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fcc7c2d957b9baa4bab5eecc3ffa2e0e545ca77b00495ba158654cdee7a02d22 +size 153712