diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk index 77d075176f..4888eeba99 100644 --- a/package/binutils/binutils.mk +++ b/package/binutils/binutils.mk @@ -42,11 +42,18 @@ BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison HOST_BINUTILS_DEPENDENCIES += host-texinfo host-flex host-bison endif +# When binutils sources are fetched from the binutils-gdb repository, +# they also contain the gdb sources, but gdb shouldn't be built, so we +# disable it. +BINUTILS_DISABLE_GDB_CONF_OPT = \ + --disable-sim --disable-gdb + # We need to specify host & target to avoid breaking ARM EABI BINUTILS_CONF_OPT = --disable-multilib --disable-werror \ --host=$(GNU_TARGET_NAME) \ --target=$(GNU_TARGET_NAME) \ --enable-install-libiberty \ + $(BINUTILS_DISABLE_GDB_CONF_OPT) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) # Don't build documentation. It takes up extra space / build time, @@ -65,6 +72,7 @@ HOST_BINUTILS_CONF_OPT = --disable-multilib --disable-werror \ --target=$(GNU_TARGET_NAME) \ --disable-shared --enable-static \ --with-sysroot=$(STAGING_DIR) \ + $(BINUTILS_DISABLE_GDB_CONF_OPT) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) # We just want libbfd and libiberty, not the full-blown binutils in staging diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk index 6640d2c280..063a7acdf5 100644 --- a/package/gdb/gdb.mk +++ b/package/gdb/gdb.mk @@ -50,6 +50,14 @@ GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH HOST_GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH endif +# When gdb sources are fetched from the binutils-gdb repository, they +# also contain the binutils sources, but binutils shouldn't be built, +# so we disable it. +GDB_DISABLE_BINUTILS_CONF_OPT = \ + --disable-binutils \ + --disable-ld \ + --disable-gas + GDB_CONF_ENV = \ ac_cv_type_uintptr_t=yes \ gt_cv_func_gettext_libintl=yes \ @@ -67,6 +75,7 @@ GDB_CONF_OPT = \ --disable-gdbtk \ --without-x \ --disable-sim \ + $(GDB_DISABLE_BINUTILS_CONF_OPT) \ $(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver) \ --with-curses \ --without-included-gettext \ @@ -111,6 +120,7 @@ HOST_GDB_CONF_OPT = \ --enable-threads \ --disable-werror \ --without-included-gettext \ + $(GDB_DISABLE_BINUTILS_CONF_OPT) \ --disable-sim ifeq ($(GDB_FROM_GIT),y)