Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/, dev-libs/elfutils/files/
Date: Sat, 30 May 2020 21:58:19
Message-Id: 1590875884.58357ad14a1f2f507e9e705cb8c2f9afbc706076.slyfox@gentoo
1 commit: 58357ad14a1f2f507e9e705cb8c2f9afbc706076
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat May 30 21:58:04 2020 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat May 30 21:58:04 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58357ad1
7
8 dev-libs/elfutils: use $CC in tests consistently, bug #718872
9
10 Reported-by: Agostino Sarubbo
11 Closes: https://bugs.gentoo.org/718872
12 Package-Manager: Portage-2.3.100, Repoman-2.3.22
13 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
14
15 dev-libs/elfutils/elfutils-0.179.ebuild | 3 ++
16 .../files/elfutils-0.179-CC-in-tests.patch | 45 ++++++++++++++++++++++
17 2 files changed, 48 insertions(+)
18
19 diff --git a/dev-libs/elfutils/elfutils-0.179.ebuild b/dev-libs/elfutils/elfutils-0.179.ebuild
20 index 5313453d1a0..70c6f757d6a 100644
21 --- a/dev-libs/elfutils/elfutils-0.179.ebuild
22 +++ b/dev-libs/elfutils/elfutils-0.179.ebuild
23 @@ -31,6 +31,7 @@ PATCHES=(
24 "${FILESDIR}"/${PN}-0.175-disable-biarch-test-PR24158.patch
25 "${FILESDIR}"/${PN}-0.177-disable-large.patch
26 "${FILESDIR}"/${PN}-0.179-PaX-support.patch
27 + "${FILESDIR}"/${PN}-0.179-CC-in-tests.patch
28 )
29
30 src_prepare() {
31 @@ -66,8 +67,10 @@ multilib_src_configure() {
32 }
33
34 multilib_src_test() {
35 + # CC is a workaround for tests using ${CC-gcc}
36 env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
37 LC_ALL="C" \
38 + CC="$(gc-getCC)" \
39 emake check VERBOSE=1
40 }
41
42
43 diff --git a/dev-libs/elfutils/files/elfutils-0.179-CC-in-tests.patch b/dev-libs/elfutils/files/elfutils-0.179-CC-in-tests.patch
44 new file mode 100644
45 index 00000000000..aa58862ec89
46 --- /dev/null
47 +++ b/dev-libs/elfutils/files/elfutils-0.179-CC-in-tests.patch
48 @@ -0,0 +1,45 @@
49 +https://bugs.gentoo.org/718872
50 +--- a/tests/run-disasm-x86-64.sh
51 ++++ b/tests/run-disasm-x86-64.sh
52 +@@ -22,7 +22,7 @@ case "`uname -m`" in
53 + x86_64)
54 + tempfiles testfile45.o
55 + testfiles testfile45.S testfile45.expect
56 +- gcc -m64 -c -o testfile45.o testfile45.S
57 ++ ${CC-gcc} -m64 -c -o testfile45.o testfile45.S
58 + testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect
59 + ;;
60 + esac
61 +--- a/tests/run-disasm-x86.sh
62 ++++ b/tests/run-disasm-x86.sh
63 +@@ -22,7 +22,7 @@ case "`uname -m`" in
64 + x86_64 | i?86 )
65 + tempfiles testfile44.o
66 + testfiles testfile44.S testfile44.expect
67 +- gcc -m32 -c -o testfile44.o testfile44.S
68 ++ ${CC-gcc} -m32 -c -o testfile44.o testfile44.S
69 + testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect
70 + ;;
71 + esac
72 +--- a/tests/run-strip-g.sh
73 ++++ b/tests/run-strip-g.sh
74 +@@ -25,7 +25,7 @@
75 + tempfiles a.out strip.out debug.out readelf.out
76 +
77 + echo Create debug a.out.
78 +-echo "int main() { return 1; }" | gcc -g -xc -
79 ++echo "int main() { return 1; }" | ${CC-gcc} -g -xc -
80 +
81 + echo strip -g to file with debug file
82 + testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out ||
83 +--- a/tests/run-strip-nothing.sh
84 ++++ b/tests/run-strip-nothing.sh
85 +@@ -23,7 +23,7 @@
86 + tempfiles a.out strip.out debug.out
87 +
88 + # Create no-debug a.out.
89 +-echo "int main() { return 1; }" | gcc -s -xc -
90 ++echo "int main() { return 1; }" | ${CC-gcc} -s -xc -
91 +
92 + # strip to file
93 + testrun ${abs_top_builddir}/src/strip -g -o strip.out ||