Skip to content

Commit

Permalink
configure: Add check for presence of readelf
Browse files Browse the repository at this point in the history
Since we're now using $READELF in the libxdp Makefile, we should make sure the
utility is present (and the variable set), or we may get weird 'make' errors.

Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
  • Loading branch information
tohojo committed Sep 21, 2023
1 parent e4ba50e commit 4738472
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,13 @@ check_toolchain()
: ${M4=m4}
: ${EMACS=emacs}
: ${BPFTOOL=bpftool}
: ${READELF=readelf}
: ${ARCH_INCLUDES=}

CLANG=$(find_tool clang "$CLANG")
LLC=$(find_tool llc "$LLC")

for TOOL in $PKG_CONFIG $CC $LD $OBJCOPY $CLANG $LLC $M4 $BPFTOOL; do
for TOOL in $PKG_CONFIG $CC $LD $OBJCOPY $CLANG $LLC $M4 $BPFTOOL $READELF; do
if [ ! $(command -v ${TOOL} 2>/dev/null) ]; then
echo "*** ERROR: Cannot find tool ${TOOL}" ;
exit 1;
Expand Down Expand Up @@ -134,6 +135,7 @@ check_toolchain()
echo "EMACS:=${EMACS}" >>$CONFIG
echo "ARCH_INCLUDES:=$ARCH_INCLUDES" >> $CONFIG
echo "BPFTOOL:=${BPFTOOL}" >> $CONFIG
echo "READELF:=${READELF}" >> $CONFIG
}

check_zlib()
Expand Down

0 comments on commit 4738472

Please sign in to comment.