mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 00:20:38 -09:00
package/binutils-bare-metal: add multiple tuple support
Add support to binutils-bare-metal to support multiple architecture tuples with the BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH string. To do this, custom configure, build and install commands are needed, so that each step goes through a loop of the architecture tuples in the list. To keep consistency with autotools, all the relevant host configurations have been copied into the HOST_BINUTILS_BARE_METAL_CONF_OPTS while removing any configurations that do not apply to binutils and removing redundant configs. autotools redundant configs covered by $(HOST_CONFIGURE_OPTS): CFLAGS="$$(HOST_CFLAGS)" LDFLAGS="$$(HOST_LDFLAGS)" autotools configs not applicable to binutils: --disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --disable-debug --with-xmlto=no --with-fop=no --disable-nls One of the configurations already in the binutils-bare-metal package was not needed. --enable-static -> handled by --disable-shared Signed-off-by: Neal Frager <neal.frager@amd.com> Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
8a1ae9e0b1
commit
57d73ec8e0
@@ -22,13 +22,45 @@ HOST_BINUTILS_BARE_METAL_MAKE_OPTS += MAKEINFO=true
|
||||
HOST_BINUTILS_BARE_METAL_INSTALL_OPTS += MAKEINFO=true install
|
||||
|
||||
HOST_BINUTILS_BARE_METAL_CONF_OPTS = \
|
||||
--target=$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE) \
|
||||
--prefix=$(HOST_DIR) \
|
||||
--sysconfdir=$(HOST_DIR)/etc \
|
||||
--localstatedir=$(HOST_DIR)/var \
|
||||
$(if $$($$(PKG)_OVERRIDE_SRCDIR),,--disable-dependency-tracking) \
|
||||
$(QUIET) \
|
||||
--disable-gprof \
|
||||
--disable-shared \
|
||||
--enable-lto \
|
||||
--enable-static \
|
||||
--disable-initfini-array \
|
||||
--disable-multilib \
|
||||
--disable-werror
|
||||
|
||||
define HOST_BINUTILS_BARE_METAL_CONFIGURE_CMDS
|
||||
$(foreach arch_tuple, $(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE), \
|
||||
mkdir -p $(@D)/build-$(arch_tuple) && \
|
||||
cd $(@D)/build-$(arch_tuple) && \
|
||||
$(HOST_CONFIGURE_OPTS) \
|
||||
$(HOST_BINUTILS_BARE_METAL_CONF_ENV) \
|
||||
CONFIG_SITE=/dev/null \
|
||||
$(@D)/configure \
|
||||
$(HOST_BINUTILS_BARE_METAL_CONF_OPTS) \
|
||||
--target=$(arch_tuple)
|
||||
)
|
||||
endef
|
||||
|
||||
define HOST_BINUTILS_BARE_METAL_BUILD_CMDS
|
||||
$(foreach arch_tuple, $(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE), \
|
||||
$(HOST_MAKE_ENV) $(MAKE) \
|
||||
$(HOST_BINUTILS_BARE_METAL_MAKE_OPTS) \
|
||||
-C $(@D)/build-$(arch_tuple)
|
||||
)
|
||||
endef
|
||||
|
||||
define HOST_BINUTILS_BARE_METAL_INSTALL_CMDS
|
||||
$(foreach arch_tuple, $(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE), \
|
||||
$(HOST_MAKE_ENV) $(MAKE) \
|
||||
$(HOST_BINUTILS_BARE_METAL_INSTALL_OPTS) \
|
||||
-C $(@D)/build-$(arch_tuple)
|
||||
)
|
||||
endef
|
||||
|
||||
$(eval $(host-autotools-package))
|
||||
|
||||
Reference in New Issue
Block a user