Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r11500 - main/trunk/bin
Date: Wed, 10 Sep 2008 20:46:14
Message-Id: E1KdWZn-00010c-R3@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-09-10 20:46:05 +0000 (Wed, 10 Sep 2008)
3 New Revision: 11500
4
5 Modified:
6 main/trunk/bin/prepstrip
7 Log:
8 New debugedit support for FEATURES=splitdebug, by Sven Wegener:
9
10 This will create new-style buildid symlinks for the splitted debuginfo and also
11 a symlink to the binary that belongs to the debuginfo. Requires debugedit from
12 rpm 5. Old versions of debugedit ignore all unkown command line arguments, so
13 this is a no-op for them.
14
15 Information: http://fedoraproject.org/wiki/Releases/FeatureBuildId
16 New debugedit tarball: http://dev.gentoo.org/~swegener/distfiles/debugedit-5.0.0.tar.bz2
17
18
19
20 Modified: main/trunk/bin/prepstrip
21 ===================================================================
22 --- main/trunk/bin/prepstrip 2008-09-10 08:33:53 UTC (rev 11499)
23 +++ main/trunk/bin/prepstrip 2008-09-10 20:46:05 UTC (rev 11500)
24 @@ -56,12 +56,23 @@
25 # dont save debug info twice
26 [[ ${x} == *".debug" ]] && return 0
27
28 + # this will recompute the build-id, but for now that's ok
29 + local buildid="$( type -P debugedit >/dev/null && debugedit -i "${x}" )"
30 +
31 mkdir -p $(dirname "${y}")
32 ${OBJCOPY} --only-keep-debug "${x}" "${y}"
33 ${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
34 [[ -g ${x} ]] && chmod go-r "${y}"
35 [[ -u ${x} ]] && chmod go-r "${y}"
36 chmod a-x,o-w "${y}"
37 +
38 + if [[ -n ${buildid} ]] ; then
39 + local buildid_dir="${D}usr/lib/debug/.build-id/${buildid:0:2}"
40 + local buildid_file="${buildid_dir}/${buildid:2}"
41 + mkdir -p "${buildid_dir}"
42 + ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug"
43 + ln -s "/${x:${#D}}" "${buildid_file}"
44 + fi
45 }
46
47 # The existance of the section .symtab tells us that a binary is stripped.