SHA256
1
0
forked from pool/dwz

Accepting request 946023 from devel:tools:compiler

OBS-URL: https://build.opensuse.org/request/show/946023
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/dwz?expand=0&rev=17
This commit is contained in:
Dominique Leuenberger 2022-01-21 00:25:24 +00:00 committed by Git OBS Bridge
commit 2aa4bb0754
4 changed files with 92 additions and 4 deletions

View File

@ -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

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Wed Jan 5 06:20:01 UTC 2022 - Martin Liška <mliska@suse.cz>
- Add dwz-remove-odr-struct-multifile.sh.patch that removes problematic
testcase.
-------------------------------------------------------------------
Thu Dec 23 10:59:49 UTC 2021 - Martin Liška <mliska@suse.cz>
- Start using -O3 and PGO with tramp3d as training binary.
-------------------------------------------------------------------
Wed Mar 17 15:54:22 UTC 2021 - Tom de Vries <tdevries@suse.com>

View File

@ -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}

BIN
tramp3d-v4.cpp.xz (Stored with Git LFS) Normal file

Binary file not shown.