Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 460510 | Differences between
and this patch

Collapse All | Expand All

(-)a/bin/ebuild-helpers/prepstrip (-5 / +4 lines)
Lines 74-80 case $(${STRIP} --version 2>/dev/null) in Link Here
74
	# We'll leave out -R .note for now until we can check out the relevance
74
	# We'll leave out -R .note for now until we can check out the relevance
75
	# of the section when it has the ALLOC flag set on it ...
75
	# of the section when it has the ALLOC flag set on it ...
76
	SAFE_STRIP_FLAGS="--strip-unneeded"
76
	SAFE_STRIP_FLAGS="--strip-unneeded"
77
	DEF_STRIP_FLAGS="-R .comment -R .GCC.command.line"
77
	DEF_STRIP_FLAGS="-R .comment -R .GCC.command.line -R .note.gnu.gold-version"
78
	SPLIT_STRIP_FLAGS=
78
	SPLIT_STRIP_FLAGS=
79
	;;
79
	;;
80
esac
80
esac
Lines 159-173 save_elf_debug() { Link Here
159
	# if we don't already have build-id from debugedit, look it up
159
	# if we don't already have build-id from debugedit, look it up
160
	if [[ -z ${buildid} ]] ; then
160
	if [[ -z ${buildid} ]] ; then
161
		# convert the readelf output to something useful
161
		# convert the readelf output to something useful
162
		buildid=$(${READELF} -x .note.gnu.build-id "${x}" 2>/dev/null \
162
		buildid=$(${READELF} -n "${x}" 2>/dev/null | awk '/Build ID:/{ print $NF; exit }')
163
			| awk '$NF ~ /GNU/ { getline; printf $2$3$4$5; getline; print $2 }')
164
	fi
163
	fi
165
	if [[ -n ${buildid} ]] ; then
164
	if [[ -n ${buildid} ]] ; then
166
		local buildid_dir="${ED}usr/lib/debug/.build-id/${buildid:0:2}"
165
		local buildid_dir="${ED}usr/lib/debug/.build-id/${buildid:0:2}"
167
		local buildid_file="${buildid_dir}/${buildid:2}"
166
		local buildid_file="${buildid_dir}/${buildid:2}"
168
		mkdir -p "${buildid_dir}"
167
		mkdir -p "${buildid_dir}"
169
		ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug"
168
		[ -L "${buildid_file}".debug ] || ln -s "../../${x:${#D}}.debug" "${buildid_file}.debug"
170
		ln -s "/${x:${#D}}" "${buildid_file}"
169
		[ -L "${buildid_file}" ] || ln -s "/${x:${#D}}" "${buildid_file}"
171
	fi
170
	fi
172
}
171
}
173
172

Return to bug 460510