Skip to contentSkip to conversation

Toolchain - Add option to enable Ada language.

PATCH New Patrick Noffke 3 participants 7 messages Apr 7, 2015 – Jul 21, 2015

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 Toolchain - Add option to enable Ada language.

hello

please resend your patch as an inline patch... ideally using git send-email

moreover, from a quick review, you seem to have a commented line/section in your patch, please remove it so the patch is cleaner...

Cordialement

J?r?my Rosen
+33 (0)1 42 68 28 04

fight key loggers : write some perl using vim

Open Wide Ingenierie

23, rue Daviel
75013 Paris - France
www.openwide.fr

----- Mail original -----

Quoted 5 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

PATCH 1/1 Toolchain - Add option to enable Ada language.

Quoted 3 lines · Jeremy Rosen

please resend your patch as an inline patch... ideally using git send-email

I will send the patch separately using git send-email. I have to send from another PC.

Quoted 4 lines

moreover, from a quick review, you seem to have a commented line/section in your patch, please remove it so the patch is cleaner...

The comments are nearby lines in the source file. I did not add them. I generated the patch following the buildroot manual, specifically using:

$ git format-patch -M -n -s -o outgoing origin/master

Please let me know if I'm doing something wrong -- this is my first patch to buildroot.

Thanks,
Patrick

#3 lore raw

PATCH 1/1 Toolchain - Add option to enable Ada language.

Quoted 4 lines · Patrick Noffke

The comments are nearby lines in the source file. I did not add them.
I generated the patch following the buildroot manual, specifically
using:

Sorry, I see the comment now. I'll remove it. Thanks.

Patrick

#4 lore raw

PATCH 1/1 Toolchain - Add option to enable Ada language.

In reply to Patrick Noffke

Dear Patrick Noffke,

Sorry for the long response time. However, unless I missed it, you never resent your patch with git send-email. Can you do this? Also, see some comments below.

Quoted 17 lines · Patrick Noffke

From d429cdacd2584e561c754bc7d7cf0eb78d7c03f0 Mon Sep 17 00:00:00 2001
From: Patrick Noffke <[email protected]>
Date: Tue, 7 Apr 2015 09:04:45 -0500
Subject: [PATCH 1/1] Toolchain - Add option to enable Ada language.

---
 package/gcc/Config.in.host         | 10 ++++++++++
 package/gcc/gcc-final/gcc-final.mk |  9 +++++++++
 toolchain/toolchain-common.in      |  3 +++
 3 files changed, 22 insertions(+)
package/gcc/Config.in.host +0 -0
index cf96c73..be55b4f 100644

package/gcc/Config.in.host config BR2_TOOLCHAIN_BUILDROOT_CXX · line 113

Quoted 6 lines
package/gcc/Config.in.host +3 -0
@@ -108,6 +108,16 @@ config BR2_TOOLCHAIN_BUILDROOT_CXX
 	  C++ language and you want C++ libraries to be installed on
 	  your target system.
 
+config BR2_TOOLCHAIN_BUILDROOT_ADA
+	bool "Enable Ada support"
+	select BR2_INSTALL_LIBADA

Technically speaking, this hidden boolean will only become necessary when some packages will need Ada support. We've recently added Fortran support, without a similar boolean. I guess we'll have to add it only when some packages will start using Fortran support.

package/gcc/Config.in.host config BR2_TOOLCHAIN_BUILDROOT_CXX · line 114

Quoted 1 line
package/gcc/Config.in.host +1 -0
+	depends on !(BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 && \

This gcc version has since then been remove.

package/gcc/Config.in.host config BR2_TOOLCHAIN_BUILDROOT_CXX · line 115

Quoted 1 line
package/gcc/Config.in.host +1 -0
+		     BR2_TOOLCHAIN_BUILDROOT_LOCALE)

So a toolchain with locale support cannot have Ada support? This seems weird, can you add a comment that explains why?

Quoted 32 lines
package/gcc/Config.in.host +5 -0
+	help
+	  Enable this option if you want your toolchain to support the
+	  Ada language and you want Ada libraries to be installed on
+	  your target system.
+
 config BR2_GCC_ENABLE_TLS
 	bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
 	default y
package/gcc/gcc-final/gcc-final.mk +5 -0
index d76eb31..7defb97 100644
@@ -44,6 +44,7 @@ endef
 # Languages supported by the cross-compiler
 GCC_FINAL_CROSS_LANGUAGES-y = c
 GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++
+GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBADA) += ada
 GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y))
 
 HOST_GCC_FINAL_CONF_OPTS = \
@@ -65,6 +66,10 @@ else
 HOST_GCC_FINAL_CONF_OPTS += --disable-libgomp
 endif
 
+ifeq ($(BR2_INSTALL_LIBADA),y)
+HOST_GCC_FINAL_CONF_OPTS += --enable-libada
+endif
+
 # End with user-provided options, so that they can override previously
 # defined options.
 HOST_GCC_FINAL_CONF_OPTS += \

package/gcc/gcc-final/gcc-final.mk ifeq ($(BR2_INSTALL_LIBSTDCPP),y) · line 135

Quoted 6 lines
package/gcc/gcc-final/gcc-final.mk +3 -0
@@ -125,6 +130,10 @@ ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
 HOST_GCC_FINAL_USR_LIBS += libstdc++
 endif
 
+ifeq ($(BR2_INSTALL_LIBADA),y)
+#HOST_GCC_FINAL_USR_LIBS += libgnat
+endif

This is commented out, why? If you need some library on the target to run Ada programs, you indeed need to add something to HOST_GCC_FINAL_USR_LIBS.

Also, if I understood correctly, building the Ada support in gcc requires having an already working Ada compiler on your machine. Is this correct? If it is, then support/dependencies/dependencies.sh need to be adjusted to also check for an Ada compiler when Ada support is selected in the toolchain.

Could you work on these issues and submit an updated version of your patch? In the mean time, I'll mark your patch as "Changes Requested" in our patch tracking system.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#5 lore raw

PATCH 1/1 Toolchain - Add option to enable Ada language.

Hi Thomas,

Quoted 5 lines · Thomas Petazzoni

Dear Patrick Noffke,

Sorry for the long response time. However, unless I missed it, you never resent your patch with git send-email. Can you do this? Also, see some comments below.

I did resend it from another PC on 08 April 2015 at 11:05 a.m. my time. But it did not address all of your below comments. I will resend again.

Quoted 85 lines · Patrick Noffke
Quoted 17 lines

From d429cdacd2584e561c754bc7d7cf0eb78d7c03f0 Mon Sep 17 00:00:00 2001
From: Patrick Noffke <[email protected]>
Date: Tue, 7 Apr 2015 09:04:45 -0500
Subject: [PATCH 1/1] Toolchain - Add option to enable Ada language.

---
  package/gcc/Config.in.host         | 10 ++++++++++
  package/gcc/gcc-final/gcc-final.mk |  9 +++++++++
  toolchain/toolchain-common.in      |  3 +++
  3 files changed, 22 insertions(+)
package/gcc/Config.in.host +0 -0
index cf96c73..be55b4f 100644

package/gcc/Config.in.host config BR2_TOOLCHAIN_BUILDROOT_CXX · line 113

Quoted 6 lines
package/gcc/Config.in.host +3 -0
@@ -108,6 +108,16 @@ config BR2_TOOLCHAIN_BUILDROOT_CXX
  	  C++ language and you want C++ libraries to be installed on
  	  your target system.
 
+config BR2_TOOLCHAIN_BUILDROOT_ADA
+	bool "Enable Ada support"
+	select BR2_INSTALL_LIBADA

Technically speaking, this hidden boolean will only become necessary when some packages will need Ada support. We've recently added Fortran support, without a similar boolean. I guess we'll have to add it only when some packages will start using Fortran support.

package/gcc/Config.in.host config BR2_TOOLCHAIN_BUILDROOT_CXX · line 114

Quoted 1 line
package/gcc/Config.in.host +1 -0
+	depends on !(BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 && \

This gcc version has since then been remove.

package/gcc/Config.in.host config BR2_TOOLCHAIN_BUILDROOT_CXX · line 115

Quoted 1 line
package/gcc/Config.in.host +1 -0
+		     BR2_TOOLCHAIN_BUILDROOT_LOCALE)

So a toolchain with locale support cannot have Ada support? This seems weird, can you add a comment that explains why?

Quoted 32 lines
package/gcc/Config.in.host +5 -0
+	help
+	  Enable this option if you want your toolchain to support the
+	  Ada language and you want Ada libraries to be installed on
+	  your target system.
+
  config BR2_GCC_ENABLE_TLS
  	bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
  	default y
package/gcc/gcc-final/gcc-final.mk +5 -0
index d76eb31..7defb97 100644
@@ -44,6 +44,7 @@ endef
  # Languages supported by the cross-compiler
  GCC_FINAL_CROSS_LANGUAGES-y = c
  GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++
+GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBADA) += ada
  GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y))
 
  HOST_GCC_FINAL_CONF_OPTS = \
@@ -65,6 +66,10 @@ else
  HOST_GCC_FINAL_CONF_OPTS += --disable-libgomp
  endif
 
+ifeq ($(BR2_INSTALL_LIBADA),y)
+HOST_GCC_FINAL_CONF_OPTS += --enable-libada
+endif
+
  # End with user-provided options, so that they can override previously
  # defined options.
  HOST_GCC_FINAL_CONF_OPTS += \

package/gcc/gcc-final/gcc-final.mk ifeq ($(BR2_INSTALL_LIBSTDCPP),y) · line 135

Quoted 6 lines
package/gcc/gcc-final/gcc-final.mk +3 -0
@@ -125,6 +130,10 @@ ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
  HOST_GCC_FINAL_USR_LIBS += libstdc++
  endif
 
+ifeq ($(BR2_INSTALL_LIBADA),y)
+#HOST_GCC_FINAL_USR_LIBS += libgnat
+endif

This is commented out, why? If you need some library on the target to run Ada programs, you indeed need to add something to HOST_GCC_FINAL_USR_LIBS.

Also, if I understood correctly, building the Ada support in gcc requires having an already working Ada compiler on your machine. Is this correct? If it is, then support/dependencies/dependencies.sh need to be adjusted to also check for an Ada compiler when Ada support is selected in the toolchain.

Quoted 7 lines

Could you work on these issues and submit an updated version of your patch? In the mean time, I'll mark your patch as "Changes Requested" in our patch tracking system.

Thanks a lot!

Thomas

Thanks,
Patrick

#6 lore raw

PATCH 1/1 Toolchain - Add option to enable Ada language.

Patrick,

Quoted 10 lines · Patrick Noffke

Hi Thomas,

Quoted 5 lines · Thomas Petazzoni

Dear Patrick Noffke,

Sorry for the long response time. However, unless I missed it, you never resent your patch with git send-email. Can you do this? Also, see some comments below.

I did resend it from another PC on 08 April 2015 at 11:05 a.m. my time.

For some reason it apparently never made it to the list. See the archives at
http://lists.busybox.net/pipermail/buildroot/2015-April/thread.html.

Quoted 1 line

But it did not address all of your below comments. I will resend again.

Excellent, thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com