[v3,3/7] devtools: add abi dump generation script
diff mbox series

Message ID 20191129210905.1865-4-kevin.laatz@intel.com
State Superseded, archived
Delegated to: David Marchand
Headers show
  • Add ABI compatibility checks to the meson build
Related show


Context Check Description
ci/Intel-compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Kevin Laatz Nov. 29, 2019, 9:09 p.m. UTC
This patch adds a script to generate ABI dump files. These files will be
required to perform ABI compatibility checks during the build later in the
patchset. This script should be run on a DPDK version with a stable ABI.

Since this is a tool designed for human use, we simplify it to just work
off a whole build directory, taking the parameter of the builddir and
generating the lib|drivers/abi dir. This is hardcoded into the script since
the meson build expects the .dump files in these directories.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
 devtools/gen-abi-dump.sh | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100755 devtools/gen-abi-dump.sh

diff mbox series

diff --git a/devtools/gen-abi-dump.sh b/devtools/gen-abi-dump.sh
new file mode 100755
index 000000000..ffedef10c
--- /dev/null
+++ b/devtools/gen-abi-dump.sh
@@ -0,0 +1,24 @@ 
+if [ -z "$builddir" ] ; then
+	echo "Usage: $(basename $0) build_dir"
+	exit 1
+if [ ! -d "$builddir" ] ; then
+	echo "Error: build directory, '$builddir', doesn't exist"
+	exit 1
+for d in lib drivers ; do
+	mkdir -p $d/abi
+	for f in $builddir/$d/*.so* ; do
+		test -L "$f" && continue
+		libname=$(basename $f)
+		abidw --out-file $d/abi/${libname%.so*}.dump $f || exit 1
+	done