Commit acd2cc94 authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

configure: handle lib64 for DPDK libdir



When building with DPDK provided via --with-dpdk=/path/to/dpdk
we need to guess the --libdir that was used when compiling DPDK.

This is not a problem with system installed DPDK, as appropriate
PKG_CONFIG_PATH for pkgconfig is already known. So it is possible
to retrieve --libdir.

Rather than just keeping it hardcoded to just 'lib', add second
popular one 'lib64'.

Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic041289b326fb67f4f6fb5d5114c873ea513389e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15713


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent c9b4654b
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -188,23 +188,28 @@ function check_dir() {

# On x86_64 'clang -dumpmachine' produces x86_64-pc-linux-gnu
# whereas the dpdk might be built with gcc and its libs lie in
# x86_64-linux-gnu. Let's find the right libdir for dpdkd libs.
# x86_64-linux-gnu. Let's find the right libdir for dpdk libs.
function find_dpdk_arch_libdir() {
	local dpdk_dir=$1
	local dpdk_libdir="$1/lib"

	# Use libdir with 'lib' or 'lib64'
	if [[ ! -d "$dpdk_libdir" ]]; then
		dpdk_libdir+="64"
	fi

	# Checking first what we have with $arch, then clang
	# variant of arch.
	arches=("$arch" "$(echo $arch | sed 's/-pc//g')")
	for a in "${arches[@]}"; do
		local libdir="$dpdk_dir/lib/$a"
		if [[ -d $libdir ]]; then
			echo $libdir
		local libdir_arch="$dpdk_libdir/$a"
		if [[ -d "$libdir_arch" ]]; then
			echo "$libdir_arch"
			return
		fi
	done

	# Fallback to the libdir without arch component
	echo "$dpdk_dir/lib"
	echo "$dpdk_libdir"
}

function check_IPSec_mb() {