Support for D: check and doc
cover Support for D: check and doc
Hi!
This series adds some missing checks and documentation for the support of the D programming language.
Eric Le Bihan (3):
package/gcc: install wrapper for GDC toolchain/toolchain-external: add a check for D language support docs/manual: document D language support
docs/manual/adding-packages-directory.txt | 4 ++++ package/gcc/gcc.mk | 2 +- toolchain/helpers.mk | 18 ++++++++++++++++++ .../pkg-toolchain-external.mk | 6 +++++- 4 files changed, 28 insertions(+), 2 deletions(-)
--
2.21.0
PATCH 1/3 package/gcc: install wrapper for GDC
Signed-off-by Eric Le Bihan <[email protected]>
--- package/gcc/gcc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/gcc/gcc.mk +1 -1
@@ -301,7 +301,7 @@ define HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS *-ar|*-ranlib|*-nm) \ ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \ ;; \ - *cc|*cc-*|*++|*++-*|*cpp|*-gfortran) \ + *cc|*cc-*|*++|*++-*|*cpp|*-gfortran|*-gdc) \ rm -f $$i.br_real; \ mv $$i $$i.br_real; \ ln -sf toolchain-wrapper $$i; \
Signature · 1 line
2.21.0
PATCH 1/3 package/gcc: install wrapper for GDC
Quoted 4 lines · On Sat, 2 Nov 2019 19:00:50 +0100 Eric Le Bihan <[email protected]>…
Signed-off-by Eric Le Bihan <[email protected]>--- package/gcc/gcc.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Series applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 2/3 toolchain/toolchain-external: add a check for D language support
In reply to Eric Le BihanSigned-off-by Eric Le Bihan <[email protected]>
--- toolchain/helpers.mk | 18 ++++++++++++++++++ .../pkg-toolchain-external.mk | 6 +++++- 2 files changed, 23 insertions(+), 1 deletion(-)
toolchain/helpers.mk +18 -0
@@ -340,6 +340,24 @@ check_cplusplus = \ exit 1 ; \ fi +# +# +# Check that the external toolchain supports D language +# +# $1: cross-gdc path +# +check_dlang = \ + __CROSS_GDC=$(strip $1) ; \ + __o=$(BUILD_DIR)/.br-toolchain-test-dlang.tmp ; \ + printf 'import std.stdio;\nvoid main() { writeln("Hello World!"); }\n' | \ + $${__CROSS_GDC} -x d -o $${__o} - ; \ + if test $$? -ne 0 ; then \ + rm -f $${__o}* ; \ + echo "D language support is selected but is not available in external toolchain" ; \ + exit 1 ; \ + fi ; \ + rm -f $${__o}* \ + # # # Check that the external toolchain supports Fortran
toolchain/toolchain-external/pkg-toolchain-external.mk +5 -1
@@ -93,6 +93,7 @@ TOOLCHAIN_EXTERNAL_SUFFIX = \ TOOLCHAIN_EXTERNAL_CROSS = $(TOOLCHAIN_EXTERNAL_BIN)/$(TOOLCHAIN_EXTERNAL_PREFIX)- TOOLCHAIN_EXTERNAL_CC = $(TOOLCHAIN_EXTERNAL_CROSS)gcc$(TOOLCHAIN_EXTERNAL_SUFFIX) TOOLCHAIN_EXTERNAL_CXX = $(TOOLCHAIN_EXTERNAL_CROSS)g++$(TOOLCHAIN_EXTERNAL_SUFFIX) +TOOLCHAIN_EXTERNAL_GDC = $(TOOLCHAIN_EXTERNAL_CROSS)gdc$(TOOLCHAIN_EXTERNAL_SUFFIX) TOOLCHAIN_EXTERNAL_FC = $(TOOLCHAIN_EXTERNAL_CROSS)gfortran$(TOOLCHAIN_EXTERNAL_SUFFIX) TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf
@@ -266,7 +267,7 @@ define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER *-ar|*-ranlib|*-nm) \ ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%..%') .; \ ;; \ - *cc|*cc-*|*++|*++-*|*cpp|*-gfortran) \ + *cc|*cc-*|*++|*++-*|*cpp|*-gfortran|*-gdc) \ ln -sf toolchain-wrapper $$base; \ ;; \ *gdb|*gdbtui) \
@@ -551,6 +552,9 @@ define $(2)_CONFIGURE_CMDS if test "$$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \ $$(call check_cplusplus,$$(TOOLCHAIN_EXTERNAL_CXX)) ; \ fi ; \ + if test "$$(BR2_TOOLCHAIN_HAS_DLANG)" = "y" ; then \ + $$(call check_dlang,$$(TOOLCHAIN_EXTERNAL_GDC)) ; \ + fi ; \ if test "$$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \ $$(call check_fortran,$$(TOOLCHAIN_EXTERNAL_FC)) ; \ fi ; \
Signature · 1 line
2.21.0
PATCH 3/3 docs/manual: document D language support
In reply to Eric Le BihanSigned-off-by Eric Le Bihan <[email protected]>
--- docs/manual/adding-packages-directory.txt | 4 ++++ 1 file changed, 4 insertions(+)
docs/manual/adding-packages-directory.txt +4 -0
@@ -322,6 +322,10 @@ use in the comment. ** Dependency symbol: +BR2_INSTALL_LIBSTDCPP+ ** Comment string: `C++` +* D support +** Dependency symbol: +BR2_TOOLCHAIN_HAS_DLANG+ +** Comment string: `Dlang` + * Fortran support ** Dependency symbol: +BR2_TOOLCHAIN_HAS_FORTRAN+ ** Comment string: `fortran`
Signature · 1 line
2.21.0