From 61c4ccac5c751a7e9900d32af53e9f01e6c09bd8 Mon Sep 17 00:00:00 2001 From: Dries Deschout Date: Mon, 12 Sep 2022 20:22:12 +0200 Subject: [PATCH] binutils: add option to build libopcodes for target It provides functionality to disassemble executable binaries. Signed-off-by: Dries Deschout --- config/binutils/binutils.in | 5 +++++ scripts/build/binutils/binutils.sh | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config/binutils/binutils.in b/config/binutils/binutils.in index 2aa877fc..f9b0c096 100644 --- a/config/binutils/binutils.in +++ b/config/binutils/binutils.in @@ -184,6 +184,11 @@ config BINUTILS_FOR_TARGET_BFD prompt "libbfd" default y +config BINUTILS_FOR_TARGET_OPCODES + bool + prompt "libopcodes" + default y + endif # BINUTILS_FOR_TARGET if ARCH_BINFMT_FLAT diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index b16be904..fdec508f 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -310,8 +310,9 @@ do_binutils_for_target() { local -a install_targets local t - [ "${CT_BINUTILS_FOR_TARGET_IBERTY}" = "y" ] && targets+=("libiberty") - [ "${CT_BINUTILS_FOR_TARGET_BFD}" = "y" ] && targets+=("bfd") + [ "${CT_BINUTILS_FOR_TARGET_IBERTY}" = "y" ] && targets+=("libiberty") + [ "${CT_BINUTILS_FOR_TARGET_BFD}" = "y" ] && targets+=("bfd") + [ "${CT_BINUTILS_FOR_TARGET_OPCODES}" = "y" ] && targets+=("opcodes") for t in "${targets[@]}"; do build_targets+=("all-${t}") install_targets+=("install-${t}")