Preparatory work on toolchains - v4
cover Preparatory work on toolchains - v4
Hello All!
These are preparatory work on toolchain, laying ground to later add crosstool-NG as a backend.
Changes since v3:
- rebased against latest tree
- removed patch #5 (rename base makefile target) as there's issue with it
Changes since v2:
- rebased againts latest tree
- enhance commit message for 3rd patch
Changes since v1:
- rebased against latest tree
- patches formatted to detect renames/copies
Yann E. MORIN (4):
toolchain: move helper functions from external toolchain
toolchain: rename external toolchain dir
toolchain: move makefile includes
toolchain: move buildroot config files
Makefile | 15 +-
toolchain/Config.in | 16 +-
toolchain/external-toolchain/ext-tool.mk | 356 --------------------
toolchain/helpers.mk | 244 ++++++++++++++
toolchain/toolchain-buildroot.mk | 12 +
.../{Config.in.1 => toolchain-buildroot/Config.in} | 2 +-
toolchain/toolchain-buildroot/Config.in.2 | 37 ++
toolchain/{Config.in.2 => toolchain-common.in} | 46 +--
toolchain/toolchain-external.mk | 14 +
.../Config.in | 0
.../Config.in.2 | 0
toolchain/toolchain-external/ext-tool.mk | 115 +++++++
12 files changed, 439 insertions(+), 418 deletions(-)
delete mode 100644 toolchain/external-toolchain/ext-tool.mk
create mode 100644 toolchain/helpers.mk
create mode 100644 toolchain/toolchain-buildroot.mk
rename toolchain/{Config.in.1 => toolchain-buildroot/Config.in} (82%)
create mode 100644 toolchain/toolchain-buildroot/Config.in.2
rename toolchain/{Config.in.2 => toolchain-common.in} (84%)
create mode 100644 toolchain/toolchain-external.mk
rename toolchain/{external-toolchain => toolchain-external}/Config.in (100%)
rename toolchain/{external-toolchain => toolchain-external}/Config.in.2 (100%)
create mode 100644 toolchain/toolchain-external/ext-tool.mkPATCH 1/4 toolchain: move helper functions from external toolchain
The helper functions used for external toolchains may also be useful to alternate toolchain backends (currently, the external toolchain is the sole user).
--- Makefile | 1 + toolchain/external-toolchain/ext-tool.mk | 241 ----------------------------- toolchain/helpers.mk | 244 ++++++++++++++++++++++++++++++ 3 files changed, 245 insertions(+), 241 deletions(-) create mode 100644 toolchain/helpers.mk
Makefile +1 -0
@@ -307,6 +307,7 @@ include toolchain/mklibs/mklibs.mk include toolchain/sstrip/sstrip.mk include toolchain/uClibc/uclibc.mk else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +include toolchain/helpers.mk include toolchain/*/*.mk endif
toolchain/external-toolchain/ext-tool.mk +0 -241
247 lines not on this page · raw message
toolchain/helpers.mk new file +244 -0
244 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH 2/4 toolchain: rename external toolchain dir
In reply to Yann E. MORINRename the external toolchain directory.
When new backends are here, it will be easier to sort them out if they are all prefixed the same way.
---
toolchain/Config.in | 4 ++--
.../Config.in | 0
.../Config.in.2 | 0
.../ext-tool.mk | 0
4 files changed, 2 insertions(+), 2 deletions(-)
rename toolchain/{external-toolchain => toolchain-external}/Config.in (100%)
rename toolchain/{external-toolchain => toolchain-external}/Config.in.2 (100%)
rename toolchain/{external-toolchain => toolchain-external}/ext-tool.mk (100%)toolchain/Config.in +2 -2
@@ -17,7 +17,7 @@ config BR2_TOOLCHAIN_EXTERNAL endchoice source "toolchain/Config.in.1" -source "toolchain/external-toolchain/Config.in" +source "toolchain/toolchain-external/Config.in" # we want gdb config in the middle of both source and external # toolchains, but mconf won't let us source the same file twice,
@@ -26,6 +26,6 @@ source "toolchain/gdb/Config.in" comment "Common Toolchain Options" source "toolchain/Config.in.2" -source "toolchain/external-toolchain/Config.in.2" +source "toolchain/toolchain-external/Config.in.2" endmenu
toolchain/toolchain-external/Config.in renamed from toolchain/external-toolchain/Config.in +0 -0
toolchain/toolchain-external/Config.in.2 renamed from toolchain/external-toolchain/Config.in.2 +0 -0
toolchain/toolchain-external/ext-tool.mk renamed from toolchain/external-toolchain/ext-tool.mk +0 -0
Signature · 1 line
1.7.1
PATCH 3/4 toolchain: move makefile includes
In reply to Yann E. MORINIncluding a bunch of Makefiles with wildcard makes it impossible to add new toolchain backends. Avoid that by namely including needed files.
The external toolchain still needs to include all the toolchain/*/*.mk sub-makefiles, as they are needed to build a toolchain that runs on the target. It is to be noted that the cross-toolchain is not built in this case, as the make-targets to build the cross-toolchain are not present in the $(BASE_TARGETS) variable, which is later used to create the dependency rules.
Also, the comment 'Explicit ordering' has been removed, as it is mis- leading. It is make's responsibility to create the proper ordering based on the dependency rules it finds in the Makefiles
--- Makefile | 16 ++-------------- toolchain/toolchain-buildroot.mk | 12 ++++++++++++ toolchain/toolchain-external.mk | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 toolchain/toolchain-buildroot.mk create mode 100644 toolchain/toolchain-external.mk
Makefile +2 -14
@@ -294,21 +294,9 @@ all: world # each selected package to TARGETS if that package was selected # in the .config file. ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) -# avoid pulling in external toolchain which is broken for toplvl parallel builds -# Explicit ordering: -include toolchain/dependencies/dependencies.mk -include toolchain/binutils/binutils.mk -include toolchain/ccache/ccache.mk -include toolchain/elf2flt/elf2flt.mk -include toolchain/gcc/gcc-uclibc-4.x.mk -include toolchain/gdb/gdb.mk -include toolchain/kernel-headers/kernel-headers.mk -include toolchain/mklibs/mklibs.mk -include toolchain/sstrip/sstrip.mk -include toolchain/uClibc/uclibc.mk +include toolchain/toolchain-buildroot.mk else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) -include toolchain/helpers.mk -include toolchain/*/*.mk +include toolchain/toolchain-external.mk endif include package/*/*.mk
toolchain/toolchain-buildroot.mk new file +12 -0
@@ -0,0 +1,12 @@ +# Include files required for the internal toolchain backend + +include toolchain/dependencies/dependencies.mk +include toolchain/binutils/binutils.mk +include toolchain/ccache/ccache.mk +include toolchain/elf2flt/elf2flt.mk +include toolchain/gcc/gcc-uclibc-4.x.mk +include toolchain/gdb/gdb.mk +include toolchain/kernel-headers/kernel-headers.mk +include toolchain/mklibs/mklibs.mk +include toolchain/sstrip/sstrip.mk +include toolchain/uClibc/uclibc.mk
toolchain/toolchain-external.mk new file +14 -0
@@ -0,0 +1,14 @@ +# Required includes for the external toolchain backend + +include toolchain/helpers.mk +include toolchain/binutils/binutils.mk +include toolchain/ccache/ccache.mk +include toolchain/dependencies/dependencies.mk +include toolchain/elf2flt/elf2flt.mk +include toolchain/gcc/gcc-uclibc-4.x.mk +include toolchain/gdb/gdb.mk +include toolchain/kernel-headers/kernel-headers.mk +include toolchain/mklibs/mklibs.mk +include toolchain/sstrip/sstrip.mk +include toolchain/toolchain-external/ext-tool.mk +include toolchain/uClibc/uclibc.mk
Signature · 1 line
1.7.1
PATCH 4/4 toolchain: move buildroot config files
In reply to Yann E. MORINHandle the internal toolchain backend mechanism the same way we handle other backends.
---
toolchain/Config.in | 12 +----
.../{Config.in.1 => toolchain-buildroot/Config.in} | 2 +-
toolchain/toolchain-buildroot/Config.in.2 | 37 ++++++++++++++++
toolchain/{Config.in.2 => toolchain-common.in} | 46 ++++----------------
4 files changed, 50 insertions(+), 47 deletions(-)
rename toolchain/{Config.in.1 => toolchain-buildroot/Config.in} (82%)
create mode 100644 toolchain/toolchain-buildroot/Config.in.2
rename toolchain/{Config.in.2 => toolchain-common.in} (84%)toolchain/Config.in +3 -9
@@ -16,16 +16,10 @@ config BR2_TOOLCHAIN_EXTERNAL endchoice -source "toolchain/Config.in.1" +source "toolchain/toolchain-buildroot/Config.in" source "toolchain/toolchain-external/Config.in" - -# we want gdb config in the middle of both source and external -# toolchains, but mconf won't let us source the same file twice, -# so put it here instead -source "toolchain/gdb/Config.in" -comment "Common Toolchain Options" - -source "toolchain/Config.in.2" +source "toolchain/toolchain-common.in" +source "toolchain/toolchain-buildroot/Config.in.2" source "toolchain/toolchain-external/Config.in.2" endmenu
toolchain/toolchain-buildroot/Config.in renamed from toolchain/Config.in.1 +1 -1
@@ -1,4 +1,4 @@ -# +# Config entries for internal toolchain backend if BR2_TOOLCHAIN_BUILDROOT source "toolchain/kernel-headers/Config.in"
toolchain/toolchain-buildroot/Config.in.2 new file +37 -0
@@ -0,0 +1,37 @@ +# Buildroot backend specific options + +if BR2_TOOLCHAIN_BUILDROOT +source "toolchain/elf2flt/Config.in" +source "toolchain/mklibs/Config.in" +source "toolchain/sstrip/Config.in" + +config BR2_ENABLE_MULTILIB + bool "Enable multilib support?" + help + Build libraries to support different ABIs. + +config BR2_VFP_FLOAT + bool "Use ARM Vector Floating Point unit" + depends on !BR2_SOFT_FLOAT + depends on BR2_arm || BR2_armeb + help + Setting this option will enable the "-mfpu=vfp" option. + If your ARM CPU has a Vector Floating Point Unit (VFP) + and the toolchain supports the option, then the + code can be optimized. + + Most people will answer N. + +config BR2_CROSS_TOOLCHAIN_TARGET_UTILS + bool "Include target utils in cross toolchain" + default y + help + When using buildroot to build a deployable cross toolchain, + it is handy to include certain target apps with that toolchain + as a convenience. + Examples include ldd, gdbserver, and strace. + + Answer Y if you want these apps (if built) copied into the + cross toolchain dir under <arch>-linux-uclibc/target_utils/. + +endif
toolchain/toolchain-common.in renamed from toolchain/Config.in.2 +9 -37
52 lines not on this page · raw message
Signature · 1 line
1.7.1
cover Preparatory work on toolchains - v4
In reply to Yann E. MORINQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Yann> Hello All!
Yann> These are preparatory work on toolchain, laying ground to later add Yann> crosstool-NG as a backend.
Committed, thanks!
Signature · 1 line
Bye, Peter Korsgaard