QA: detect pkg-config files that bleed LDFLAGS
authorMike Frysinger <vapier@gentoo.org>
Mon, 12 Mar 2012 05:29:32 +0000 (01:29 -0400)
committerMike Frysinger <vapier@gentoo.org>
Mon, 12 Mar 2012 05:29:32 +0000 (01:29 -0400)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
bin/misc-functions.sh

index 26141515043a0683da0adae1bca6db7bb958aab3..d2de0a709d6c3b16038b1cfa0d76d4e4f03870d3 100755 (executable)
@@ -564,6 +564,13 @@ install_qa_check() {
                done
        done
 
+       # Look for leaking LDFLAGS into pkg-config files
+       f=$(egrep -sH '^Libs.*-Wl,(-O[012]|--hash-style)' "${ED}"/usr/*/pkgconfig/*.pc)
+       if [[ -n ${f} ]] ; then
+               eqawarn "QA Notice: pkg-config files with wrong LDFLAGS detected:"
+               eqawarn "${f//${D}}"
+       fi
+
        # this should help to ensure that all (most?) shared libraries are executable
        # and that all libtool scripts / static libraries are not executable
        local j