comp.lang.ada
 help / color / mirror / Atom feed
* Petition ARM to not hinder Ada
@ 2015-10-01 14:08 Paul Colin de Gloucester
  2015-10-14 14:02 ` Simon Wright
  2016-01-21 23:11 ` Simon Wright
  0 siblings, 2 replies; 8+ messages in thread
From: Paul Colin de Gloucester @ 2015-10-01 14:08 UTC (permalink / raw)


It is possible to obtain GNAT for ARM if one is already an Ada
programmer and wants to obtain an Ada compiler. However, a person who
is simply planning on targeting ARM hardware might accept a
cross-compiler for bad languages. ARM provides a copy of GCC with a
customized configuration script which is incompatible with the
standard switch  --enable-languages=ada  for configure but ARM
indicated to me that if demand could be shown, then ARM might support
Ada.

Colin Paul de Glocester emailed for ARM:
"[. . .]

I built cross compilers from
  HTTPS://LaunchPad.net/gcc-arm-embedded/4.9/4.9-2015-q2-update/+download/gcc-arm-none-eabi-4_9-2015q2-20150609-src.tar.bz2 
on different GNU/Linux distributions than Ubuntu.

Congratulations, but it is not perfect.

[. . .]

Ada is a better language than the languages which
gcc-arm-none-eabi-4_9-2015q2-20150609-src.tar.bz2 supports. Please
consider supporting Ada. [. . .]
[. . .]"

ARM emailed on September 22nd, 2015:
"> From: Colin Paul de Glocester [. . .]
> Sent: Monday, September 21, 2015 6:48 PM
>
> Ada is a very good engineering language. You should consider it.

Note that including it or not result of a compromise: including it
will make our toolchain bigger which incurs a penalty for all the
people not using
this language but downloading our toolchain. So it needs to be
balanced with the number of people who would benefit from having this
support. I invite
you to create a question on the Launchpad page to keep public track of
this request."

Would you like to ask such a question on
  HTTPS://Answers.Launchpad.net/gcc-arm-embedded 
?

ARM mistakenly claimed "including it will make our toolchain bigger",
because even if ARM would merely provide an installation script which
would be compatible with  --enable-languages=ada  instead of with a
pre-compiled GNAT then this would be a partial victory.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Petition ARM to not hinder Ada
  2015-10-01 14:08 Petition ARM to not hinder Ada Paul Colin de Gloucester
@ 2015-10-14 14:02 ` Simon Wright
  2015-11-06 15:16   ` Paul Colin Gloster
  2016-01-21 23:11 ` Simon Wright
  1 sibling, 1 reply; 8+ messages in thread
From: Simon Wright @ 2015-10-14 14:02 UTC (permalink / raw)


Paul Colin de Gloucester <Gloster@nicht.at> writes:

> It is possible to obtain GNAT for ARM if one is already an Ada
> programmer and wants to obtain an Ada compiler. However, a person who
> is simply planning on targeting ARM hardware might accept a
> cross-compiler for bad languages. ARM provides a copy of GCC with a
> customized configuration script which is incompatible with the
> standard switch --enable-languages=ada for configure but ARM indicated
> to me that if demand could be shown, then ARM might support Ada.

So far as I can see there are three places where said script says
"--enable-languages=c,c++" (and one "--enable-languages=c", probably for
bootstrap) which wouldn't be too hard to change?

More serious is that build-prerequisites failed in mpfr-2.4.2 with
"error: invalid instruction mnemonic 'ffreep'", ugh.

This might I suppose have to do with the Howto still referring to OS X
10.7, while the world has moved on to 10.11 ...

> ARM emailed on September 22nd, 2015:
> "> From: Colin Paul de Glocester [. . .]
>> Sent: Monday, September 21, 2015 6:48 PM
>>
>> Ada is a very good engineering language. You should consider it.
>
> Note that including it or not result of a compromise: including it
> will make our toolchain bigger which incurs a penalty for all the
> people not using this language but downloading our toolchain. So it
> needs to be balanced with the number of people who would benefit from
> having this support. I invite you to create a question on the
> Launchpad page to keep public track of this request."
>
> Would you like to ask such a question on
>  HTTPS://Answers.Launchpad.net/gcc-arm-embedded ?

And did you?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Petition ARM to not hinder Ada
  2015-10-14 14:02 ` Simon Wright
@ 2015-11-06 15:16   ` Paul Colin Gloster
  2016-01-26 11:10     ` Lucretia
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Colin Gloster @ 2015-11-06 15:16 UTC (permalink / raw)


On October 14th, 2015, Simon Wright has sent:
|------------------------------------------------------------------------|
|"Paul Colin de Gloucester <Gloster@nicht.at> writes:                    |
|                                                                        |
|> It is possible to obtain GNAT for ARM if one is already an Ada        |
|> programmer and wants to obtain an Ada compiler. However, a person who |
|> is simply planning on targeting ARM hardware might accept a           |
|> cross-compiler for bad languages. ARM provides a copy of GCC with a   |
|> customized configuration script which is incompatible with the        |
|> standard switch --enable-languages=ada for configure but ARM indicated|
|> to me that if demand could be shown, then ARM might support Ada.      |
|                                                                        |
|So far as I can see there are three places where said script says       |
|"--enable-languages=c,c++" (and one "--enable-languages=c", probably for|
|bootstrap) which wouldn't be too hard to change?"                       |
|------------------------------------------------------------------------|

Hi,

They had not been hard to add "ada," to. As I had reported, ARM
provided a "script which is incompatible" with this option. For
example:
"[. . .]
checking for gnatmake... gnatmake
checking whether compiler driver understands Ada... yes
[. . .]
make[3]: Leaving directory
'/home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/gcc-final/arm-none-eabi/libgcc'
make[2]: Leaving directory
'/home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/gcc-final/arm-none-eabi/libgcc'
Checking multilib configuration for libada...
[. . .]
checking for
arm-none-eabi-gcc... /home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/gcc-final/./gcc/xgcc
-B/home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/gcc-final/./gcc/
-B/home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native/arm-none-eabi/bin/
-B/home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native/arm-none-eabi/lib/
-isystem
/home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native/arm-none-eabi/include
-isystem
/home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/install-native/arm-none-eabi/sys-include
checking for C compiler default output file name...
configure: error: in
`/home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/gcc-final/arm-none-eabi/libada':
configure: error: C compiler cannot create executables
See `config.log' for more details.
Makefile:11773: recipe for target 'configure-target-libada' failed
make[1]: *** [configure-target-libada] Error 1
make[1]: Leaving directory
'/home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/gcc-final'
Makefile:839: recipe for target 'all' failed
make: *** [all] Error 2"

|------------------------------------------------------------------------|
|"More serious is that build-prerequisites failed in mpfr-2.4.2 with     |
|"error: invalid instruction mnemonic 'ffreep'", ugh."                   |
|------------------------------------------------------------------------|

Maybe for thee but not for me. From the same build log:
"[. . .]
make[1]: Leaving directory
'/home/gloucester/Not_building_native_GNAT_when_trying_this_toolchain/gcc-arm-none-eabi-4_9-2015q2-20150609/build-native/mpfr'
+ make install
[. . .]
checking for the correct version of mpfr.h... yes
[. . .]"

|------------------------------------------------------------------------|
|"This might I suppose have to do with the Howto still referring to OS X |
|10.7, while the world has moved on to 10.11 ..."                        |
|------------------------------------------------------------------------|

I believe that ARM would be receptive to feedback from thee.

|------------------------------------------------------------------------|
|"> ARM emailed on September 22nd, 2015:                                 |
|> "> From: Colin Paul de Glocester [. . .]                              |
|>> Sent: Monday, September 21, 2015 6:48 PM                             |
|>>                                                                      |
|>> Ada is a very good engineering language. You should consider it.     |
|>                                                                       |
|> Note that including it or not result of a compromise: including it    |
|> will make our toolchain bigger which incurs a penalty for all the     |
|> people not using this language but downloading our toolchain. So it   |
|> needs to be balanced with the number of people who would benefit from |
|> having this support. I invite you to create a question on the         |
|> Launchpad page to keep public track of this request."                 |
|>                                                                       |
|> Would you like to ask such a question on                              |
|>  HTTPS://Answers.Launchpad.net/gcc-arm-embedded ?                     |
|                                                                        |
|And did you?"                                                           |
|------------------------------------------------------------------------|

No. If I would had, would others had responded?

Thy sincerely,
Nicholas Collin Paul de Gloucester

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Petition ARM to not hinder Ada
  2015-10-01 14:08 Petition ARM to not hinder Ada Paul Colin de Gloucester
  2015-10-14 14:02 ` Simon Wright
@ 2016-01-21 23:11 ` Simon Wright
  2016-01-22 12:19   ` Brian Drummond
  2016-01-25 18:22   ` Simon Wright
  1 sibling, 2 replies; 8+ messages in thread
From: Simon Wright @ 2016-01-21 23:11 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

Paul Colin de Gloucester <Gloster@nicht.at> writes:

> ARM provides a copy of GCC with a customized configuration script
> which is incompatible with the standard switch --enable-languages=ada
> for configure

ARM have released GCC 5.2 (.1), which is not very incompatible with
building GNAT.

The diff I made is at the end (I hope).

I'm building on OS X El Capitan, so there are various other issues with
the script: re-running it starts again at the beginning; it builds with
-static-libgcc, so for example arm-none-eabi-gnatchop -h ends with a
segv; the last section uses GNU tar with options incompatible with Apple
tar; it may not relocate too well. Still, it just built my Arduino Due
testbed OK (I haven't run it yet!).


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch to build Ada --]
[-- Type: text/x-patch, Size: 1282 bytes --]

--- build-toolchain.sh	2015-12-19 15:52:31.000000000 +0000
+++ build-toolchain-ada.sh	2016-01-21 22:24:44.000000000 +0000
@@ -404,9 +404,10 @@
     --mandir=$INSTALLDIR_NATIVE_DOC/man \
     --htmldir=$INSTALLDIR_NATIVE_DOC/html \
     --pdfdir=$INSTALLDIR_NATIVE_DOC/pdf \
-    --enable-languages=c,c++ \
+    --enable-languages=c,c++,ada \
     --enable-plugins \
     --disable-decimal-float \
+    --disable-libada \
     --disable-libffi \
     --disable-libgomp \
     --disable-libmudflap \
@@ -439,6 +440,8 @@
   make -j$JOBS INHIBIT_LIBC_CFLAGS="-DUSE_TM_CLONE_REGISTRY=0"
 fi
 
+make -w -C gcc cross-gnattools ada.all.cross
+
 make install
 
 if [ "x$skip_manual" != "xyes" ]; then
@@ -481,8 +484,9 @@
 
 $SRCDIR/$GCC/configure --target=$TARGET \
     --prefix=$BUILDDIR_NATIVE/target-libs \
-    --enable-languages=c,c++ \
+    --enable-languages=c,c++,ada \
     --disable-decimal-float \
+    --disable-libada \
     --disable-libffi \
     --disable-libgomp \
     --disable-libmudflap \
@@ -505,6 +509,7 @@
     ${MULTILIB_LIST}
 
 make -j$JOBS CXXFLAGS_FOR_TARGET="-g -Os -ffunction-sections -fdata-sections -fno-exceptions"
+make -w -C gcc cross-gnattools ada.all.cross
 make install
 
 copy_multi_libs src_prefix="$BUILDDIR_NATIVE/target-libs/arm-none-eabi/lib" \

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Petition ARM to not hinder Ada
  2016-01-21 23:11 ` Simon Wright
@ 2016-01-22 12:19   ` Brian Drummond
  2016-01-25 18:22   ` Simon Wright
  1 sibling, 0 replies; 8+ messages in thread
From: Brian Drummond @ 2016-01-22 12:19 UTC (permalink / raw)


On Thu, 21 Jan 2016 23:11:27 +0000, Simon Wright wrote:

> Paul Colin de Gloucester <Gloster@nicht.at> writes:
> 
>> ARM provides a copy of GCC with a customized configuration script which
>> is incompatible with the standard switch --enable-languages=ada for
>> configure
> 
> ARM have released GCC 5.2 (.1), which is not very incompatible with
> building GNAT.
> 
> The diff I made is at the end (I hope).

Let me applaud ARM for this, and contrast it with Texas Instruments who 
release a version of gcc for the MSP430 at

http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/
latest/index_FDS.html

This page does include gcc source code - but it is incomplete - all Gnat 
and gnatlib sources have been deleted, so simply enabling Ada and 
building the cross-tools won't work.

So when I get round to revising the MSP430 Ada project (soon I hope) it 
won't be based on TI's own sources but the FSF  code.

-- Brian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Petition ARM to not hinder Ada
  2016-01-21 23:11 ` Simon Wright
  2016-01-22 12:19   ` Brian Drummond
@ 2016-01-25 18:22   ` Simon Wright
  2016-01-26 17:42     ` Simon Wright
  1 sibling, 1 reply; 8+ messages in thread
From: Simon Wright @ 2016-01-25 18:22 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> ARM have released GCC 5.2 (.1), which is not very incompatible with
> building GNAT.
[...]
> I'm building on OS X El Capitan, so there are various other issues
> with the script: re-running it starts again at the beginning; it
> builds with -static-libgcc, so for example arm-none-eabi-gnatchop -h
> ends with a segv; the last section uses GNU tar with options
> incompatible with Apple tar; it may not relocate too well. Still, it
> just built my Arduino Due testbed OK (I haven't run it yet!).

Not so good. Both the STM32F4 and Arduino Due builds failed to execute
properly, in bizarre ways.

A shame, since it is meant to support armv6-m, armv7-m, armv7e-m,
armv7-r, armv8-m.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Petition ARM to not hinder Ada
  2015-11-06 15:16   ` Paul Colin Gloster
@ 2016-01-26 11:10     ` Lucretia
  0 siblings, 0 replies; 8+ messages in thread
From: Lucretia @ 2016-01-26 11:10 UTC (permalink / raw)


On Friday, 6 November 2015 15:16:35 UTC, Paul Colin Gloster  wrote:

> Hi,
> 
> They had not been hard to add "ada," to. As I had reported, ARM
> provided a "script which is incompatible" with this option. For

It's not incompatible. The sources most likely don't have the ability to build for bare metal targets, which was recently added back into 5.x. Find my patch in free-ada which I use to add that functionality back in for 4.9.2.

Luke.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Petition ARM to not hinder Ada
  2016-01-25 18:22   ` Simon Wright
@ 2016-01-26 17:42     ` Simon Wright
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Wright @ 2016-01-26 17:42 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> Simon Wright <simon@pushface.org> writes:
>
>> ARM have released GCC 5.2 (.1), which is not very incompatible with
>> building GNAT.
> [...]
>> I'm building on OS X El Capitan, so there are various other issues
>> with the script: re-running it starts again at the beginning; it
>> builds with -static-libgcc, so for example arm-none-eabi-gnatchop -h
>> ends with a segv; the last section uses GNU tar with options
>> incompatible with Apple tar; it may not relocate too well. Still, it
>> just built my Arduino Due testbed OK (I haven't run it yet!).
>
> Not so good. Both the STM32F4 and Arduino Due builds failed to execute
> properly, in bizarre ways.
>
> A shame, since it is meant to support armv6-m, armv7-m, armv7e-m,
> armv7-r, armv8-m.

I take that back; today it built my testbeds for both MCUs and buth
worked as designed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-01-26 17:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-01 14:08 Petition ARM to not hinder Ada Paul Colin de Gloucester
2015-10-14 14:02 ` Simon Wright
2015-11-06 15:16   ` Paul Colin Gloster
2016-01-26 11:10     ` Lucretia
2016-01-21 23:11 ` Simon Wright
2016-01-22 12:19   ` Brian Drummond
2016-01-25 18:22   ` Simon Wright
2016-01-26 17:42     ` Simon Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox