public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH] binutils: Use configure options to disable gdb and dependencies
Date: Fri,  3 Apr 2020 17:44:45 -0700	[thread overview]
Message-ID: <20200404004445.3088044-1-raj.khem@gmail.com> (raw)

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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 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(-)

diff --git a/meta/recipes-devtools/binutils/binutils-2.34.inc b/meta/recipes-devtools/binutils/binutils-2.34.inc
index ed9f902fd2..4b085b6fe0 100644
--- a/meta/recipes-devtools/binutils/binutils-2.34.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.34.inc
@@ -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
-}
diff --git a/meta/recipes-devtools/binutils/binutils.inc b/meta/recipes-devtools/binutils/binutils.inc
index f6c20fc229..4119960c63 100644
--- a/meta/recipes-devtools/binutils/binutils.inc
+++ b/meta/recipes-devtools/binutils/binutils.inc
@@ -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)}"
diff --git a/meta/recipes-devtools/binutils/binutils_2.34.bb b/meta/recipes-devtools/binutils/binutils_2.34.bb
index bfc9346822..2e645e1ed8 100644
--- a/meta/recipes-devtools/binutils/binutils_2.34.bb
+++ b/meta/recipes-devtools/binutils/binutils_2.34.bb
@@ -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
-- 
2.26.0


                 reply	other threads:[~2020-04-04  0:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200404004445.3088044-1-raj.khem@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox