package/binutils-bare-metal: add multiple tuple support
PATCH v5 1/5 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
---V1->V2:
- no changesV2->V3:
- removed unnecessary symlinks
- removed unnecessary semi-colonsV3->V4:
- added all relevant autotools configs
- removed any configs not relevant to binutils
- corrected some configs already included in binutils-bare-metal V4->V5:
- --disable-gprof was actually working fine and did not need to be changed
--- .../binutils-bare-metal.mk | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-)
package/binutils-bare-metal/binutils-bare-metal.mk +34 -2
@@ -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))
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 2/5 package/gcc-bare-metal: add multiple tuple support
Add support to gcc-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_GCC_BARE_METAL_CONF_OPTS while removing any configurations that do not apply to gcc and removing redundant configs.
autotools redundant configs covered by $(HOST_CONFIGURE_OPTS):
CFLAGS="$$(HOST_CFLAGS)" LDFLAGS="$$(HOST_LDFLAGS)"
autotools configs not applicable to gcc:
--disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --disable-debug --with-xmlto=no --with-fop=no --disable-nls
Some of the configurations already in the gcc-bare-metal package also needed to be changed because they were incorrect.
Configs Incorrect:
--disable-initfini_array -> --disable-initfini-array --disable-libstdcxx-pch -> --disable-libstdcxx
---V1->V2:
- corrected sysroot configurationV2->V3:
- removed unnecessary symlinks
- removed unnecessary semi-colonsV3->V4:
- added all relevant autotools configs
- removed any configs not relevant to gcc
- corrected some configs already included in gcc-bare-metal V4->V5:
- no changes
--- package/gcc-bare-metal/gcc-bare-metal.mk | 60 +++++++++++++++++------- 1 file changed, 44 insertions(+), 16 deletions(-)
package/gcc-bare-metal/gcc-bare-metal.mk +44 -16
@@ -20,15 +20,9 @@ HOST_GCC_BARE_METAL_DEPENDENCIES = \ host-mpfr \ host-isl -# gcc doesn't support in-tree build, so we create a 'build' -# subdirectory in the gcc sources, and build from there. -define HOST_GCC_BARE_METAL_CONFIGURE_SYMLINK - mkdir -p $(@D)/build - ln -sf ../configure $(@D)/build/configure -endef - -HOST_GCC_BARE_METAL_PRE_CONFIGURE_HOOKS += HOST_GCC_BARE_METAL_CONFIGURE_SYMLINK -HOST_GCC_BARE_METAL_SUBDIR = build +# Don't build documentation. It takes up extra space / build time, +# and sometimes needs specific makeinfo versions to work +HOST_GCC_BARE_METAL_CONF_ENV = MAKEINFO=missing HOST_GCC_BARE_METAL_MAKE_OPTS = \ $(HOST_GCC_COMMON_MAKE_OPTS) \
@@ -38,10 +32,15 @@ HOST_GCC_BARE_METAL_MAKE_OPTS = \ HOST_GCC_BARE_METAL_INSTALL_OPTS = install-gcc install-target-libgcc HOST_GCC_BARE_METAL_CONF_OPTS = \ - --target=$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE) \ - --disable-initfini_array \ + --prefix=$(HOST_DIR) \ + --sysconfdir=$(HOST_DIR)/etc \ + --localstatedir=$(HOST_DIR)/var \ + $(if $$($$(PKG)_OVERRIDE_SRCDIR),,--disable-dependency-tracking) \ + $(QUIET) \ + --disable-shared \ + --disable-initfini-array \ --disable-__cxa_atexit \ - --disable-libstdcxx-pch \ + --disable-libstdcxx \ --with-newlib \ --disable-threads \ --enable-plugins \
@@ -54,9 +53,38 @@ HOST_GCC_BARE_METAL_CONF_OPTS = \ --with-gmp=$(HOST_DIR) \ --with-mpc=$(HOST_DIR) \ --with-mpfr=$(HOST_DIR) \ - --with-isl=$(HOST_DIR) \ - --with-sysroot=$(TOOLCHAIN_BARE_METAL_BUILDROOT_SYSROOT) \ - AR_FOR_TARGET=$(HOST_DIR)/bin/$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE)-ar \ - RANLIB_FOR_TARGET=$(HOST_DIR)/bin/$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE)-ranlib + --with-isl=$(HOST_DIR) + +define HOST_GCC_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_GCC_BARE_METAL_CONF_ENV) \ + CONFIG_SITE=/dev/null \ + $(@D)/configure \ + $(HOST_GCC_BARE_METAL_CONF_OPTS) \ + --target=$(arch_tuple) \ + --with-sysroot=$(HOST_DIR)/$(arch_tuple)/sysroot \ + AR_FOR_TARGET=$(HOST_DIR)/bin/$(arch_tuple)-ar \ + RANLIB_FOR_TARGET=$(HOST_DIR)/bin/$(arch_tuple)-ranlib + ) +endef + +define HOST_GCC_BARE_METAL_BUILD_CMDS + $(foreach arch_tuple, $(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE), \ + $(HOST_MAKE_ENV) $(MAKE) \ + $(HOST_GCC_BARE_METAL_MAKE_OPTS) \ + -C $(@D)/build-$(arch_tuple) + ) +endef + +define HOST_GCC_BARE_METAL_INSTALL_CMDS + $(foreach arch_tuple, $(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE), \ + $(HOST_MAKE_ENV) $(MAKE) \ + $(HOST_GCC_BARE_METAL_INSTALL_OPTS) \ + -C $(@D)/build-$(arch_tuple) + ) +endef $(eval $(host-autotools-package))
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 2/5] package/gcc-bare-metal: add multiple tuple support
Quoted 25 lines · Neal Frager
Add support to gcc-bare-metal to support multiple architecture tuples with the
BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCHstring.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_GCC_BARE_METAL_CONF_OPTSwhile removing any configurations that do not apply to gcc and removing redundant configs.autotools redundant configs covered by $(HOST_CONFIGURE_OPTS):
CFLAGS="$$(HOST_CFLAGS)" LDFLAGS="$$(HOST_LDFLAGS)"autotools configs not applicable to gcc:
--disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --disable-debug --with-xmlto=no --with-fop=no --disable-nls
Quoted 5 lines
Some of the configurations already in the gcc-bare-metal package also needed to be changed because they were incorrect.
Configs Incorrect:
--disable-initfini_array -> --disable-initfini-array
This is in fact "harmless" because configure converts all - to _ in the
options anyway.
Quoted 1 line
--disable-libstdcxx-pch -> --disable-libstdcxx
The --disable-libstdcxx-pch option does in fact exist. pch are the
pre-compiled headers, while --disable-libstdcxx would disable C++ entirely... I can imagine that there's code for the auxiliary processors that is written in C++ so I don't think it's a good idea to disable it. And it's a static library anyway so just costs a bit of build time.
Well, we actually pass --languages=c so it doesn't matter either way...
Anyway, I've kept the --disable-libstdcxx-pch option. No need to change things
that don't need to be changed :-)
Regards,
Arnout
Quoted 92 lines
Signed-off-by Neal Frager <[email protected]>---
V1->V2:
- corrected sysroot configurationV2->V3:
- removed unnecessary symlinks
- removed unnecessary semi-colonsV3->V4:
- added all relevant autotools configs
- removed any configs not relevant to gcc
- corrected some configs already included in gcc-bare-metalV4->V5:
- no changes--- package/gcc-bare-metal/gcc-bare-metal.mk | 60 +++++++++++++++++------- 1 file changed, 44 insertions(+), 16 deletions(-)package/gcc-bare-metal/gcc-bare-metal.mk +36
-16@@ -20,15 +20,9 @@ HOST_GCC_BARE_METAL_DEPENDENCIES = \ host-mpfr \ host-isl -# gcc doesn't support in-tree build, so we create a 'build' -# subdirectory in the gcc sources, and build from there. -define HOST_GCC_BARE_METAL_CONFIGURE_SYMLINK - mkdir -p $(@D)/build - ln -sf ../configure $(@D)/build/configure -endef - -HOST_GCC_BARE_METAL_PRE_CONFIGURE_HOOKS += HOST_GCC_BARE_METAL_CONFIGURE_SYMLINK -HOST_GCC_BARE_METAL_SUBDIR = build +# Don't build documentation. It takes up extra space / build time, +# and sometimes needs specific makeinfo versions to work +HOST_GCC_BARE_METAL_CONF_ENV = MAKEINFO=missing HOST_GCC_BARE_METAL_MAKE_OPTS = \ $(HOST_GCC_COMMON_MAKE_OPTS) \@@ -38,10 +32,15 @@ HOST_GCC_BARE_METAL_MAKE_OPTS = \ HOST_GCC_BARE_METAL_INSTALL_OPTS = install-gcc install-target-libgcc HOST_GCC_BARE_METAL_CONF_OPTS = \ - --target=$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE) \ - --disable-initfini_array \ + --prefix=$(HOST_DIR) \ + --sysconfdir=$(HOST_DIR)/etc \ + --localstatedir=$(HOST_DIR)/var \ + $(if $$($$(PKG)_OVERRIDE_SRCDIR),,--disable-dependency-tracking) \ + $(QUIET) \ + --disable-shared \ + --disable-initfini-array \ --disable-__cxa_atexit \ - --disable-libstdcxx-pch \ + --disable-libstdcxx \ --with-newlib \ --disable-threads \ --enable-plugins \@@ -54,9 +53,38 @@ HOST_GCC_BARE_METAL_CONF_OPTS = \ --with-gmp=$(HOST_DIR) \ --with-mpc=$(HOST_DIR) \ --with-mpfr=$(HOST_DIR) \ - --with-isl=$(HOST_DIR) \ - --with-sysroot=$(TOOLCHAIN_BARE_METAL_BUILDROOT_SYSROOT) \ - AR_FOR_TARGET=$(HOST_DIR)/bin/$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE)-ar \ - RANLIB_FOR_TARGET=$(HOST_DIR)/bin/$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE)-ranlib + --with-isl=$(HOST_DIR) + +define HOST_GCC_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_GCC_BARE_METAL_CONF_ENV) \ + CONFIG_SITE=/dev/null \ + $(@D)/configure \ + $(HOST_GCC_BARE_METAL_CONF_OPTS) \ + --target=$(arch_tuple) \ + --with-sysroot=$(HOST_DIR)/$(arch_tuple)/sysroot \ + AR_FOR_TARGET=$(HOST_DIR)/bin/$(arch_tuple)-ar \ + RANLIB_FOR_TARGET=$(HOST_DIR)/bin/$(arch_tuple)-ranlib + ) +endef + +define HOST_GCC_BARE_METAL_BUILD_CMDS + $(foreach arch_tuple, $(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE), \ + $(HOST_MAKE_ENV) $(MAKE) \ + $(HOST_GCC_BARE_METAL_MAKE_OPTS) \ + -C $(@D)/build-$(arch_tuple) + ) +endef
package/gcc-bare-metal/gcc-bare-metal.mk HOST_GCC_BARE_METAL_CONF_OPTS = \ · line 90
Quoted 10 lines
package/gcc-bare-metal/gcc-bare-metal.mk +8
-0+ +define HOST_GCC_BARE_METAL_INSTALL_CMDS + $(foreach arch_tuple, $(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE), \ + $(HOST_MAKE_ENV) $(MAKE) \ + $(HOST_GCC_BARE_METAL_INSTALL_OPTS) \ + -C $(@D)/build-$(arch_tuple) + ) +endef $(eval $(host-autotools-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 2/5] package/gcc-bare-metal: add multiple tuple support
Hi Arnout,
Quoted 25 lines
Add support to gcc-bare-metal to support multiple architecture tuples with the
BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCHstring.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_GCC_BARE_METAL_CONF_OPTSwhile removing any configurations that do not apply to gcc and removing redundant configs.autotools redundant configs covered by $(HOST_CONFIGURE_OPTS):
CFLAGS="$$(HOST_CFLAGS)" LDFLAGS="$$(HOST_LDFLAGS)"autotools configs not applicable to gcc:
--disable-gtk-doc --disable-gtk-doc-html --disable-doc --disable-docs --disable-documentation --disable-debug --with-xmlto=no --with-fop=no --disable-nls
Quoted 8 lines
Some of the configurations already in the gcc-bare-metal package also needed to be changed because they were incorrect.
Configs Incorrect:
--disable-initfini_array -> --disable-initfini-arrayThis is in fact "harmless" because configure converts all - to _ in the
options anyway.
Ok. That is good to know. I am glad you changed it anyway for consistency.
Quoted 8 lines
--disable-libstdcxx-pch -> --disable-libstdcxx
The --disable-libstdcxx-pch option does in fact exist. pch are the
pre-compiled headers, while --disable-libstdcxx would disable C++ entirely... I can imagine that there's code for the auxiliary processors that is written in C++ so I don't think it's a good idea to disable it. And it's a static library anyway so just costs a bit of build time.
Quoted 4 lines
Well, we actually pass --languages=c so it doesn't matter either way...
Anyway, I've kept the --disable-libstdcxx-pch option. No need to change things
that don't need to be changed :-)
That's true. If this bare-metal toolchain starts getting used more, I could imagine adding C++ will be useful. Until then, the Xilinx boot firmware applications are written in C, so I think it is best to wait for C++ to be needed / used by someone before adding it.
Best regards,
Neal Frager
AMD
--- snip ---
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 3/5 package/newlib-bare-metal: add multiple tuple support
In reply to Neal Frager via buildrootAdd support to gcc-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 target configurations have been copied into the NEWLIB_BARE_METAL_CONF_OPTS while removing any configurations that do not apply to newlib.
Also, the following configs were not taken because newlib is being built for each of the bare-metal targets and not the main target of Buildroot.
$$(TARGET_CONFIGURE_OPTS)
$$(TARGET_CONFIGURE_ARGS)
--target=$$(GNU_TARGET_NAME)
--host=$$(GNU_TARGET_NAME)
---V1->V2:
- no changesV2->V3:
- removed unnecessary symlinks
- removed unnecessary semi-colonsV3->V4:
- added all relevant autotools configs
- removed any configs not relevant to newlib
- placed common configs in NEWLIB_BARE_METAL_CONF_OPTS V4->V5:
- no changes
--- .../newlib-bare-metal/newlib-bare-metal.mk | 47 ++++++++++++++----- 1 file changed, 34 insertions(+), 13 deletions(-)
package/newlib-bare-metal/newlib-bare-metal.mk +34 -13
@@ -22,28 +22,49 @@ NEWLIB_BARE_METAL_INSTALL_STAGING = YES NEWLIB_BARE_METAL_INSTALL_TARGET = NO NEWLIB_BARE_METAL_MAKE_OPTS = MAKEINFO=true +NEWLIB_BARE_METAL_CONF_OPTS = \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --program-prefix="" \ + $(if $$($$(PKG)_OVERRIDE_SRCDIR),,--disable-dependency-tracking) \ + $(QUIET) \ + --enable-newlib-io-c99-formats \ + --enable-newlib-io-long-long \ + --enable-newlib-io-float \ + --enable-newlib-io-long-double \ + --disable-multilib \ + --with-tooldir=/usr + define NEWLIB_BARE_METAL_CONFIGURE_CMDS - (cd $(@D) && \ + $(foreach arch_tuple, $(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE), \ + mkdir -p $(@D)/build-$(arch_tuple) && \ + cd $(@D)/build-$(arch_tuple) && \ PATH=$(BR_PATH) \ - ./configure \ - --target=$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE) \ - --prefix=/usr \ - --enable-newlib-io-c99-formats \ - --enable-newlib-io-long-long \ - --enable-newlib-io-float \ - --enable-newlib-io-long-double \ - --disable-multilib \ - --with-tooldir=/usr \ + CONFIG_SITE=/dev/null \ + $(@D)/configure \ + $(NEWLIB_BARE_METAL_CONF_OPTS) \ + --target=$(arch_tuple) ) endef define NEWLIB_BARE_METAL_BUILD_CMDS - PATH=$(BR_PATH) $(MAKE1) $(NEWLIB_BARE_METAL_MAKE_OPTS) -C $(@D) + $(foreach arch_tuple, $(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE), \ + PATH=$(BR_PATH) $(MAKE1) \ + $(NEWLIB_BARE_METAL_MAKE_OPTS) \ + -C $(@D)/build-$(arch_tuple) + ) endef define NEWLIB_BARE_METAL_INSTALL_STAGING_CMDS - PATH=$(BR_PATH) $(MAKE1) -C $(@D) $(NEWLIB_BARE_METAL_MAKE_OPTS) \ - DESTDIR=$(TOOLCHAIN_BARE_METAL_BUILDROOT_SYSROOT) install + $(foreach arch_tuple, $(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE), \ + PATH=$(BR_PATH) $(MAKE1) \ + $(NEWLIB_BARE_METAL_MAKE_OPTS) \ + -C $(@D)/build-$(arch_tuple) \ + DESTDIR=$(HOST_DIR)/$(arch_tuple)/sysroot install + ) endef $(eval $(generic-package))
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 4/5 toolchain/toolchain-bare-metal-buildroot: update help text for multiple tuple support
In reply to Neal Frager via buildrootNow that binutils-bare-metal, gcc-bare-metal and newlib-bare-metal packages have been upgraded to support a list of architecture tuples, this patch updates the toolchain-bare-metal-buildroot help text to describe the new capability.
BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH is still backwards compatible with its prior definition as defining a single tuple with this new definition works exactly the same as before.
---V1->V2:
- no changesV2->V3:
- improved help textV3->V5:
- no changes
--- toolchain/Config.in | 2 +- toolchain/toolchain-bare-metal-buildroot/Config.in | 12 +++++++++--- .../toolchain-bare-metal-buildroot.mk | 1 - 3 files changed, 10 insertions(+), 5 deletions(-)
toolchain/Config.in +1 -1
@@ -941,7 +941,7 @@ config BR2_TOOLCHAIN_HAS_LIBQUADMATH comment "Bare metal toolchain" config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT - bool "Build a bare metal toolchain" + bool "Build bare metal toolchains" select BR2_PACKAGE_NEWLIB_BARE_METAL help Select if you need a bare-metal toolchain for building
toolchain/toolchain-bare-metal-buildroot/Config.in +9 -3
@@ -1,10 +1,16 @@ if BR2_TOOLCHAIN_BARE_METAL_BUILDROOT config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH - string "architecture tuple" + string "list of architecture tuples" help - This option allows to define the architecture tuple for the - bare-metal toolchain. + This option allows to define the list of architecture + tuples for which bare-metal toolchains will be created. + One toolchain will be built for each of the architecture + tuples specified in this option. + + For example, to build both a Microblaze and a RISC-V bare + metal toolchain, use the following definition: + "microblazeel-buildroot-elf riscv32-buildroot-elf" source "package/newlib-bare-metal/Config.in"
toolchain/toolchain-bare-metal-buildroot/toolchain-bare-metal-buildroot.mk +0 -1
@@ -6,7 +6,6 @@ TOOLCHAIN_BARE_METAL_BUILDROOT_DEPENDENCIES = newlib-bare-metal TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE = $(call qstrip,$(BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH)) -TOOLCHAIN_BARE_METAL_BUILDROOT_SYSROOT = $(HOST_DIR)/$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE)/sysroot TOOLCHAIN_BARE_METAL_BUILDROOT_ADD_TOOLCHAIN_DEPENDENCY = NO $(eval $(virtual-package))
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 4/5] toolchain/toolchain-bare-metal-buildroot: update help text for multiple tuple support
Quoted 47 lines · Neal Frager
Now that binutils-bare-metal, gcc-bare-metal and newlib-bare-metal packages have been upgraded to support a list of architecture tuples, this patch updates the toolchain-bare-metal-buildroot help text to describe the new capability.
BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCHis still backwards compatible with its prior definition as defining a single tuple with this new definition works exactly the same as before.Signed-off-by Neal Frager <[email protected]>---
V1->V2:
- no changesV2->V3:
- improved help textV3->V5:
- no changes--- toolchain/Config.in | 2 +- toolchain/toolchain-bare-metal-buildroot/Config.in | 12 +++++++++--- .../toolchain-bare-metal-buildroot.mk | 1 - 3 files changed, 10 insertions(+), 5 deletions(-)toolchain/Config.in +1
-1@@ -941,7 +941,7 @@ config BR2_TOOLCHAIN_HAS_LIBQUADMATH comment "Bare metal toolchain" config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT - bool "Build a bare metal toolchain" + bool "Build bare metal toolchains" select BR2_PACKAGE_NEWLIB_BARE_METAL help Select if you need a bare-metal toolchain for buildingtoolchain/toolchain-bare-metal-buildroot/Config.in +1
-1@@ -1,10 +1,16 @@ if BR2_TOOLCHAIN_BARE_METAL_BUILDROOT config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH - string "architecture tuple" + string "list of architecture tuples" help
toolchain/toolchain-bare-metal-buildroot/Config.in line 13
Quoted 10 lines
toolchain/toolchain-bare-metal-buildroot/Config.in +8
-2- This option allows to define the architecture tuple for the - bare-metal toolchain. + This option allows to define the list of architecture + tuples for which bare-metal toolchains will be created. + One toolchain will be built for each of the architecture + tuples specified in this option. + + For example, to build both a Microblaze and a RISC-V bare + metal toolchain, use the following definition: + "microblazeel-buildroot-elf riscv32-buildroot-elf"
Since the microblaze toolchain is only ever going to be used for xilinx
platforms, and they apparently expect the exact tuply microblazeel-xilinx-elf, I kept that one as an example.
Regards,
Arnout
Quoted 8 lines
toolchain/toolchain-bare-metal-buildroot/Config.in +0
-0source "package/newlib-bare-metal/Config.in"toolchain/toolchain-bare-metal-buildroot/toolchain-bare-metal-buildroot.mk +0
-0
toolchain/toolchain-bare-metal-buildroot/toolchain-bare-metal-buildroot.mk line 11
Quoted 7 lines
toolchain/toolchain-bare-metal-buildroot/toolchain-bare-metal-buildroot.mk +0
-1@@ -6,7 +6,6 @@ TOOLCHAIN_BARE_METAL_BUILDROOT_DEPENDENCIES = newlib-bare-metal TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE = $(call qstrip,$(BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH)) -TOOLCHAIN_BARE_METAL_BUILDROOT_SYSROOT = $(HOST_DIR)/$(TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH_TUPLE)/sysroot TOOLCHAIN_BARE_METAL_BUILDROOT_ADD_TOOLCHAIN_DEPENDENCY = NO $(eval $(virtual-package))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 4/5] toolchain/toolchain-bare-metal-buildroot: update help text for multiple tuple support
Hi Arnout,
Quoted 59 lines
Now that binutils-bare-metal, gcc-bare-metal and newlib-bare-metal packages have been upgraded to support a list of architecture tuples, this patch updates the toolchain-bare-metal-buildroot help text to describe the new capability.
BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCHis still backwards compatible with its prior definition as defining a single tuple with this new definition works exactly the same as before.Signed-off-by Neal Frager <[email protected]>---
V1->V2:
- no changesV2->V3:
- improved help textV3->V5:
- no changes--- toolchain/Config.in | 2 +- toolchain/toolchain-bare-metal-buildroot/Config.in | 12 +++++++++--- .../toolchain-bare-metal-buildroot.mk | 1 - 3 files changed, 10 insertions(+), 5 deletions(-)toolchain/Config.in +1
-1@@ -941,7 +941,7 @@ config BR2_TOOLCHAIN_HAS_LIBQUADMATH comment "Bare metal toolchain" config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT - bool "Build a bare metal toolchain" + bool "Build bare metal toolchains" select BR2_PACKAGE_NEWLIB_BARE_METAL help Select if you need a bare-metal toolchain for buildingtoolchain/toolchain-bare-metal-buildroot/Config.in +9
-3@@ -1,10 +1,16 @@ if BR2_TOOLCHAIN_BARE_METAL_BUILDROOT config BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH - string "architecture tuple" + string "list of architecture tuples" help - This option allows to define the architecture tuple for the - bare-metal toolchain. + This option allows to define the list of architecture + tuples for which bare-metal toolchains will be created. + One toolchain will be built for each of the architecture + tuples specified in this option. + + For example, to build both a Microblaze and a RISC-V bare + metal toolchain, use the following definition: + "microblazeel-buildroot-elf riscv32-buildroot-elf" Since the microblaze toolchain is only ever going to be used for xilinx
Quoted 2 lines
platforms, and they apparently expect the exact tuply microblazeel-xilinx-elf, I kept that one as an example.
While this is true, I have been thinking more about this the last few days since working on expanding the bare-metal toolchain from one to many toolchains.
Even though Microblaze only ever exists on Xilinx silicon, if someone wanted to run Linux on a Microblaze core, they would get a toolchain named microblazeel-buildroot-linux-gnu and not microblazeel-xilinx-linux-gnu.
Since we are using Buildroot as the build system, and since the vendor name does not change functionality, it is probably better if we re-name the bare-metal toolchain to microblazeel-buildroot-elf instead of microblazeel-xilinx-elf as it is named today.
The toolchain package is called toolchain-bare-metal-buildroot and not toolchain-bare-metal-xilinx after all...
Assuming you agree with this, I will submit a patch that changes the name.
Best regards,
Neal Frager
AMD
--- snip ---
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 4/5] toolchain/toolchain-bare-metal-buildroot: update help text for multiple tuple support
Quoted 1 line · Neal
Hi Arnout,
[snip]
Quoted 8 lines
Even though Microblaze only ever exists on Xilinx silicon, if someone wanted to run Linux on a Microblaze core, they would get a toolchain named microblazeel-buildroot-linux-gnu and not microblazeel-xilinx-linux-gnu.
Since we are using Buildroot as the build system, and since the vendor name does not change functionality, it is probably better if we re-name the bare-metal toolchain to microblazeel-buildroot-elf instead of microblazeel-xilinx-elf as it is named today.
It might have been better, but changing it now means that anybody who has a
current config which includes xilinx-embeddedsw will also already have the tuple set to microblazeel-xilinx-elf and will get a build failure when xilinx-embeddedsw tries to build with microblazeel-buildroot-elf.
Quoted 4 lines
The toolchain package is called toolchain-bare-metal-buildroot and not toolchain-bare-metal-xilinx after all...
Assuming you agree with this, I will submit a patch that changes the name.
I don't think the consistency aspect is important enough to be worth the churn
and the backward incompatibility.
Regards,
Arnout
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 4/5] toolchain/toolchain-bare-metal-buildroot: update help text for multiple tuple support
Hi Arnout,
Quoted 11 lines
Hi Arnout,
[snip]
Even though Microblaze only ever exists on Xilinx silicon, if someone wanted to run Linux on a Microblaze core, they would get a toolchain named microblazeel-buildroot-linux-gnu and not microblazeel-xilinx-linux-gnu.Since we are using Buildroot as the build system, and since the vendor name does not change functionality, it is probably better if we re-name the bare-metal toolchain to microblazeel-buildroot-elf instead of microblazeel-xilinx-elf as it is named today.
Quoted 4 lines
It might have been better, but changing it now means that anybody who has a
current config which includes xilinx-embeddedsw will also already have the tuple set to microblazeel-xilinx-elf and will get a build failure when xilinx-embeddedsw tries to build with microblazeel-buildroot-elf.
I understand. However, unless I am wrong, we have not yet issued any release tags with xilinx-embeddedsw included.
This means that anyone working with xilinx-embeddedsw already is working from the buildroot master branch, and would probably catch the name change.
Do you think it is really too late to change this?
Quoted 7 lines
The toolchain package is called toolchain-bare-metal-buildroot and not toolchain-bare-metal-xilinx after all...
Assuming you agree with this, I will submit a patch that changes the name.
I don't think the consistency aspect is important enough to be worth the churn
and the backward incompatibility.
I understand. It is a bit of a shame to have to live with it.
I suppose another solution is creating a symlink for backwards compatibility, but not sure if this is better...
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 4/5] toolchain/toolchain-bare-metal-buildroot: update help text for multiple tuple support
Quoted 18 lines · Neal
Hi Arnout,
Quoted 11 lines
Hi Arnout,
[snip]
Even though Microblaze only ever exists on Xilinx silicon, if someone wanted to run Linux on a Microblaze core, they would get a toolchain named microblazeel-buildroot-linux-gnu and not microblazeel-xilinx-linux-gnu.Since we are using Buildroot as the build system, and since the vendor name does not change functionality, it is probably better if we re-name the bare-metal toolchain to microblazeel-buildroot-elf instead of microblazeel-xilinx-elf as it is named today.
Quoted 4 lines
It might have been better, but changing it now means that anybody who has a
current config which includes xilinx-embeddedsw will also already have the tuple set to microblazeel-xilinx-elf and will get a build failure when xilinx-embeddedsw tries to build with microblazeel-buildroot-elf.
Quoted 7 lines
I understand. However, unless I am wrong, we have not yet issued any release tags with xilinx-embeddedsw included.
This means that anyone working with xilinx-embeddedsw already is working from the buildroot master branch, and would probably catch the name change.
Do you think it is really too late to change this?
Ah, I didn't realize that that was the case... In that case, it is worth
"fixing" it.
Regards,
Arnout
Quoted 9 lines
Quoted 8 lines
The toolchain package is called toolchain-bare-metal-buildroot and not toolchain-bare-metal-xilinx after all...
Assuming you agree with this, I will submit a patch that changes the name.
I don't think the consistency aspect is important enough to be worth the churn
and the backward incompatibility.
Quoted 8 lines
I understand. It is a bit of a shame to have to live with it.
I suppose another solution is creating a symlink for backwards compatibility, but not sure if this is better...
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 4/5] toolchain/toolchain-bare-metal-buildroot: update help text for multiple tuple support
Hi Arnout,
Quoted 21 lines
Hi Arnout,
Quoted 11 lines
Hi Arnout,
[snip]
Even though Microblaze only ever exists on Xilinx silicon, if someone wanted to run Linux on a Microblaze core, they would get a toolchain named microblazeel-buildroot-linux-gnu and not microblazeel-xilinx-linux-gnu.Since we are using Buildroot as the build system, and since the vendor name does not change functionality, it is probably better if we re-name the bare-metal toolchain to microblazeel-buildroot-elf instead of microblazeel-xilinx-elf as it is named today.
Quoted 4 lines
It might have been better, but changing it now means that anybody who has a
current config which includes xilinx-embeddedsw will also already have the tuple set to microblazeel-xilinx-elf and will get a build failure when xilinx-embeddedsw tries to build with microblazeel-buildroot-elf.I understand. However, unless I am wrong, we have not yet issued any release tags with xilinx-embeddedsw included.
Quoted 7 lines
This means that anyone working with xilinx-embeddedsw already is working from the buildroot master branch, and would probably catch the name change.
Do you think it is really too late to change this?
Ah, I didn't realize that that was the case... In that case, it is worth
"fixing" it.
In this case, I leave it up to you regarding which version to take.
v1: vendor name change without backwards compatibility
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
v2: either xilinx or buildroot vendor name supported
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
I am fine with either solution.
Best regards,
Neal Frager
AMD
Quoted 12 lines
Regards,
ArnoutQuoted 7 lines
The toolchain package is called toolchain-bare-metal-buildroot and not toolchain-bare-metal-xilinx after all...
Assuming you agree with this, I will submit a patch that changes the name.
I don't think the consistency aspect is important enough to be worth the churn
and the backward incompatibility.
Quoted 8 lines
I understand. It is a bit of a shame to have to live with it.
I suppose another solution is creating a symlink for backwards compatibility, but not sure if this is better...
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v5 4/5] toolchain/toolchain-bare-metal-buildroot: update help text for multiple tuple support
In reply to Arnout Vandecappelle via buildrootHi Arnout,
Quoted 17 lines
Hi Arnout,
[snip]
Even though Microblaze only ever exists on Xilinx silicon, if someone wanted to run Linux on a Microblaze core, they would get a toolchain named microblazeel-buildroot-linux-gnu and not microblazeel-xilinx-linux-gnu.Since we are using Buildroot as the build system, and since the vendor name does not change functionality, it is probably better if we re-name the bare-metal toolchain to microblazeel-buildroot-elf instead of microblazeel-xilinx-elf as it is named today.
It might have been better, but changing it now means that anybody who has a
current config which includes xilinx-embeddedsw will also already have the tuple set to microblazeel-xilinx-elf and will get a build failure when xilinx-embeddedsw tries to build with microblazeel-buildroot-elf.
Quoted 7 lines
The toolchain package is called toolchain-bare-metal-buildroot and not toolchain-bare-metal-xilinx after all...
Assuming you agree with this, I will submit a patch that changes the name.
I don't think the consistency aspect is important enough to be worth the churn
and the backward incompatibility.
I have thought of a better solution. I could update the xilinx-embeddedsw package to be compatible with either tuple string. I have thought of a nice way to do it too. You will see my v2 shortly.
Best regards,
Neal Frager
AMD
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v5 5/5 boot/xilinx-embeddedsw: change dependency
In reply to Neal Frager via buildrootNow that BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH can contain multiple tuples, BR2_TARGET_XILINX_EMBEDDEDSW can no longer be dependent on:
depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH = "microblazeel-xilinx-elf"
A valid definition could have "microblazeel-xilinx-elf" as just one of many tuples in the list.
For this reason, this patch changes the dependency to:
depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT
One side effect of this is that the user comment will be displayed now when using multiple tuples, even if one of them is the required tuple.
---V1->V3:
- new patch with V3 of seriesV3->V5:
- no changes
--- boot/xilinx-embeddedsw/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
boot/xilinx-embeddedsw/Config.in +1 -1
@@ -1,7 +1,7 @@ config BR2_TARGET_XILINX_EMBEDDEDSW bool "xilinx-embeddedsw" depends on BR2_aarch64 - depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCH = "microblazeel-xilinx-elf" + depends on BR2_TOOLCHAIN_BARE_METAL_BUILDROOT help Build boot firmware applications from source for Xilinx boards. Users can mix and match applications to be built
Signature · 6 lines
2.25.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 25 lines · Neal Frager
Add support to binutils-bare-metal to support multiple architecture tuples with the
BR2_TOOLCHAIN_BARE_METAL_BUILDROOT_ARCHstring.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_OPTSwhile 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
Quoted 6 lines
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 <[email protected]>
Series applied to master with some changes as indicated in individual patches,
thanks.
Regards,
Arnout
Quoted 58 lines
---
V1->V2:
- no changesV2->V3:
- removed unnecessary symlinks
- removed unnecessary semi-colonsV3->V4:
- added all relevant autotools configs
- removed any configs not relevant to binutils
- corrected some configs already included in binutils-bare-metalV4->V5:
- --disable-gprof was actually working fine and did not need to be changed--- .../binutils-bare-metal.mk | 36 +++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-)package/binutils-bare-metal/binutils-bare-metal.mk +25
-2@@ -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
package/binutils-bare-metal/binutils-bare-metal.mk HOST_BINUTILS_BARE_METAL_MAKE_OPTS += MAKEINFO=true · line 66
Quoted 10 lines
package/binutils-bare-metal/binutils-bare-metal.mk +9
-0+ +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))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot