Browse Source

d/rules: check for accidental perf linkage

with libraries that are not GPL-2-only compatible, fix previously typoed
variable, and add build-dep on libiberty-dev for CPLUS demangling.

Signed-off-by: Fabian Grünbichler <[email protected]>
Fabian Grünbichler 7 years ago
parent
commit
7cbdd0b90d
2 changed files with 5 additions and 1 deletions
  1. 1 0
      debian/control.in
  2. 4 1
      debian/rules

+ 1 - 0
debian/control.in

@@ -7,6 +7,7 @@ Build-Depends: asciidoc,
                bison,
                flex,
                gcc-6 (>= 6.3.0-18+deb9u1),
+               libiberty-dev,
                libssl-dev,
                lintian,
                sed,

+ 4 - 1
debian/rules

@@ -125,7 +125,10 @@ binary: install
 	touch $@
 
 .tools_compile_mark: .compile_mark
-	${MAKE} -C ${KERNEL_SRC}/tools/perf prefix=/usr HAVE_CPLUS_DEMANGLE=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python2.7
+	${MAKE} -C ${KERNEL_SRC}/tools/perf prefix=/usr HAVE_NO_LIBBFD=1 HAVE_CPLUS_DEMANGLE_SUPPORT=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python2.7
+	echo "checking GPL-2 only perf binary for library linkage with incompatible licenses.."
+	! ldd ${KERNEL_SRC}/tools/perf/perf | grep -q -E '\blibbfd'
+	! ldd ${KERNEL_SRC}/tools/perf/perf | grep -q -E '\blibcrypto'
 	${MAKE} -C ${KERNEL_SRC}/tools/perf man
 	# contained in linux-base
 	rm -f ${KERNEL_SRC}/tools/perf/Documentation/perf.1