summaryrefslogtreecommitdiff
path: root/build-prebuilts.sh
diff options
context:
space:
mode:
authorAlistair Delva <adelva@google.com>2021-01-11 11:13:28 -0800
committerAlistair Delva <adelva@google.com>2021-01-11 11:41:41 -0800
commitc552cb8e753abff96127e33b80955efea799c4b9 (patch)
tree407c9cffbf0aa0a640dd7ff24d626ef82c2df644 /build-prebuilts.sh
parent1b53df925d372883e3f87e220c667bfebbf2ef21 (diff)
downloadbuild-tools-c552cb8e753abff96127e33b80955efea799c4b9.tar.gz
Build libelf libs and headers
Needed for some host tools during kernel builds. Bug: 175705438 Change-Id: I0e4473d88c125081d84b2341f9df20fc6fab01e6 Signed-off-by: Alistair Delva <adelva@google.com>
Diffstat (limited to 'build-prebuilts.sh')
-rwxr-xr-xbuild-prebuilts.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/build-prebuilts.sh b/build-prebuilts.sh
index d652076..ab6174b 100755
--- a/build-prebuilts.sh
+++ b/build-prebuilts.sh
@@ -45,6 +45,7 @@ EOF
SOONG_LIBRARIES=(
libcrypto-host.so
+ libelf.so
)
binaries="${SOONG_BINARIES[@]/#/${SOONG_HOST_OUT}/bin/}"
@@ -63,6 +64,15 @@ EOF
mkdir -p ${include_dir}/openssl/
cp -a ${TOP}/external/boringssl/include/openssl/* ${include_dir}/openssl/
+ # The elfutils header locations are messy; just make them match
+ # common Linux distributions, as this is what Linux expects
+ mkdir -p ${include_dir}/elfutils
+ cp -a ${TOP}/external/elfutils/libelf/gelf.h ${include_dir}/
+ cp -a ${TOP}/external/elfutils/libelf/libelf.h ${include_dir}/
+ cp -a ${TOP}/external/elfutils/libelf/nlist.h ${include_dir}/
+ cp -a ${TOP}/external/elfutils/libelf/elf-knowledge.h ${include_dir}/elfutils/
+ cp -a ${TOP}/external/elfutils/version.h ${include_dir}/elfutils/
+
# Patch dist dir
(
cd ${SOONG_OUT}/dist/