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

Collapse All | Expand All

(-)a/bin/install-qa-check.d/80libraries (-3 / +19 lines)
Lines 1-7 Link Here
1
# Check for issues with installed libraries
1
# Check for issues with installed libraries
2
2
3
scanelf_lib_check() {
3
scanelf_lib_check() {
4
	local f x i j
4
	local t v
5
	for t in NM:nm ; do
6
		v=${t%:*} # NM
7
		t=${t#*:} # nm
8
		eval ${v}=\"${!v:-${CHOST}-${t}}\"
9
		type -P -- ${!v} >/dev/null || eval ${v}=${t}
10
	done
11
12
	local f x i j library libraries
5
13
6
	# Check for shared libraries lacking SONAMEs
14
	# Check for shared libraries lacking SONAMEs
7
	local qa_var="QA_SONAME_${ARCH/-/_}"
15
	local qa_var="QA_SONAME_${ARCH/-/_}"
Lines 40-46 scanelf_lib_check() { Link Here
40
	# Check for shared libraries lacking NEEDED entries
48
	# Check for shared libraries lacking NEEDED entries
41
	qa_var="QA_DT_NEEDED_${ARCH/-/_}"
49
	qa_var="QA_DT_NEEDED_${ARCH/-/_}"
42
	eval "[[ -n \${!qa_var} ]] && QA_DT_NEEDED=(\"\${${qa_var}[@]}\")"
50
	eval "[[ -n \${!qa_var} ]] && QA_DT_NEEDED=(\"\${${qa_var}[@]}\")"
43
	f=$(scanelf -ByF '%n %p' "${ED%/}"/{,usr/}lib*/lib*.so* | awk '$2 == "" { print }' | sed -e "s:^[[:space:]]${ED%/}/:/:")
51
	f=
52
	libraries=$(scanelf -ByF '%n %p' "${ED%/}"/{,usr/}lib*/lib*.so* | awk '$2 == "" { print }' | sed -e "s:^[[:space:]]::")
53
	if [[ -n ${libraries} ]] ; then
54
		while IFS= read -r library ; do
55
			# Only shared libraries containing undefined non-weak symbols actually need NEEDED entries.
56
			if [[ -n $(${NM} -D "${library}" | grep -E "^ +U ") ]] ; then
57
				f+="/${library#${ED%/}/}"$'\n'
58
			fi
59
		done <<< "${libraries}"
60
	fi
44
	if [[ -n ${f} ]] ; then
61
	if [[ -n ${f} ]] ; then
45
		echo "${f}" > "${T}"/scanelf-missing-NEEDED.log
62
		echo "${f}" > "${T}"/scanelf-missing-NEEDED.log
46
		if [[ "${QA_STRICT_DT_NEEDED-unset}" == unset ]] ; then
63
		if [[ "${QA_STRICT_DT_NEEDED-unset}" == unset ]] ; then
47
- 

Return to bug 516016