From d2009241ea4be82c64dcaeffea70a31aeaf6217d Mon Sep 17 00:00:00 2001 From: Renato Botelho do Couto Date: Fri, 29 Nov 2024 00:33:40 -0300 Subject: [PATCH] buildtools: do not require tac BSD systems don't have tac binary available. Replace it by common sed expression that works on both GNU and BSD sed. Signed-off-by: Renato Botelho do Couto --- buildtools/options-ibverbs-static.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildtools/options-ibverbs-static.sh b/buildtools/options-ibverbs-static.sh index 0740a711ffe..6f21ddfd943 100755 --- a/buildtools/options-ibverbs-static.sh +++ b/buildtools/options-ibverbs-static.sh @@ -16,6 +16,6 @@ pkg-config --libs --static $lib | tr '[:space:]' '\n' | sed -r "/^-l($deps)/! s,(^-l)(.*),\1:lib\2.a," | # explicit .a sed -n '/^-[Ll]/p' | # extra link options may break with make - tac | + sed '1!G;h;$!d' | # emulate tac using sed awk "/^-l:$lib.a/&&c++ {next} 1" | # drop first duplicates of main lib - tac + sed '1!G;h;$!d'