Skip to contentSkip to conversation

binutils: Use configure options to disable gdb and dependencies

PATCH New Khem Raj 1 participant 1 message Apr 4, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 binutils: Use configure options to disable gdb and dependencies

Deleting sources is a rough way of dealing with disabling components, using configure option is elegant way and we also keep the sources unchanged, this should not cause any funcitonal changes otherwise

---
 meta/recipes-devtools/binutils/binutils-2.34.inc | 4 ----
 meta/recipes-devtools/binutils/binutils.inc      | 5 +++++
 meta/recipes-devtools/binutils/binutils_2.34.bb  | 5 +++++
 3 files changed, 10 insertions(+), 4 deletions(-)
meta/recipes-devtools/binutils/binutils-2.34.inc +0 -4
index ed9f902fd2..4b085b6fe0 100644
@@ -43,7 +43,3 @@ SRC_URI = "\
      file://CVE-2020-0551.patch \
 "
 S  = "${WORKDIR}/git"
-
-do_configure_prepend () {
-        rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
-}
meta/recipes-devtools/binutils/binutils.inc +5 -0
index f6c20fc229..4119960c63 100644
@@ -75,6 +75,11 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
                 --disable-werror \
                 --enable-deterministic-archives \
                 --enable-plugins \
+                --disable-gdb \
+                --disable-gdbserver \
+                --disable-libdecnumber \
+                --disable-readline \
+                --disable-sim \
                 ${LDGOLD} \
                 ${EXTRA_TARGETS} \
                 ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)}"
meta/recipes-devtools/binutils/binutils_2.34.bb +5 -0
index bfc9346822..2e645e1ed8 100644
@@ -18,6 +18,11 @@ EXTRA_OECONF_class-native = "--enable-targets=all \
                              --enable-64-bit-bfd \
                              --enable-install-libiberty \
                              --enable-install-libbfd \
+                             --disable-gdb \
+                             --disable-gdbserver \
+                             --disable-libdecnumber \
+                             --disable-readline \
+                             --disable-sim \
                              --disable-werror"
 
 # gcc9.0 end up mis-compiling libbfd.so with O2 which then crashes on target
Signature · 1 line
2.26.0