X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=buildtools%2Foptions-ibverbs-static.sh;h=0740a711ffe2168da90d635d2fdb8d8fc9ef95dd;hb=4f299b7169000aa55fe7a48fe98736f728e4f710;hp=0f285a343b7f3c0edbaf4e0bc867c303470a112c;hpb=2c0dd7b69fb00fc3e422a6058ff8429edc869f68;p=dpdk.git diff --git a/buildtools/options-ibverbs-static.sh b/buildtools/options-ibverbs-static.sh index 0f285a343b..0740a711ff 100755 --- a/buildtools/options-ibverbs-static.sh +++ b/buildtools/options-ibverbs-static.sh @@ -9,6 +9,13 @@ # # PKG_CONFIG_PATH may be required to be set if libibverbs.pc is not installed. -pkg-config --libs-only-l --static libibverbs | +lib='libibverbs' +deps='pthread|nl' + +pkg-config --libs --static $lib | tr '[:space:]' '\n' | - sed -r '/^-l(pthread|nl)/! s,(^-l)(.*),\1:lib\2.a,' + sed -r "/^-l($deps)/! s,(^-l)(.*),\1:lib\2.a," | # explicit .a + sed -n '/^-[Ll]/p' | # extra link options may break with make + tac | + awk "/^-l:$lib.a/&&c++ {next} 1" | # drop first duplicates of main lib + tac