Browse Source

x86_64: check for libelf-dev in prereq

Waldemar Brodkorb 2 days ago
parent
commit
9aa46a499e
1 changed files with 10 additions and 0 deletions
  1. 10 0
      scripts/prereq.sh

+ 10 - 0
scripts/prereq.sh

@@ -751,6 +751,9 @@ else
   # scan host-tool prerequisites of certain packages before building.
   . $topdir/.config
 
+  if [ -n "$ADK_TARGET_ARCH_X86_64" ]; then
+    NEED_LIBELF="$NEED_LIBELF x86_64 arch"
+  fi
   if [ -n "$ADK_PACKAGE_FIREFOX" ]; then
     NEED_RUST="$NEED_RUST firefox"
   fi
@@ -876,6 +879,13 @@ else
     fi
   fi
 
+  if [ -n "$NEED_LIBELF" ]; then
+    if ! test -f /usr/include/gelf.h >/dev/null 2>&1; then
+      printf "You need libelf-dev to build $NEED_LIBELF \n"
+      out=1
+    fi
+  fi
+
   if [ -n "$NEED_STATIC_LIBSTDCXX" ]; then
 cat >test.c <<-'EOF'
 	#include <stdio.h>