comp.lang.ada
 help / color / mirror / Atom feed
* ANN: GCC 11.1.0 for macOS
@ 2021-05-02 16:28 Simon Wright
  2021-05-02 16:54 ` Dmitry A. Kazakov
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Simon Wright @ 2021-05-02 16:28 UTC (permalink / raw)


GCC 11.1.0 x86_64-apple-darwin for macOS is available at:

https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/11.1.0/native

The release no longer supports ASIS.

Libadalang and tools (gnatmetric, gnatpp, gnatstub, gnattest) are
included.

Please note:

* This release is made as an installer package. Because I don't have a
  signing ID, you can't double-click on it; instead, right-button, Open,
  and ignore the warnings. Sorry.

* In the past, I've included modified versions of the compiler specs
  files. This time, such a modified specs file wouldn't run on El
  Capitan, so I've supplied the compiler as-built; if you're on Mojave
  or later, you need to set SDKROOT to pick up the place where Apple
  provide them. This means that the compiler won't automatically look in
  /usr/local/include (affects C, C++) or /usr/local/lib (affects all
  languages).

See the release notes at Sourceforge.

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-02 16:28 ANN: GCC 11.1.0 for macOS Simon Wright
@ 2021-05-02 16:54 ` Dmitry A. Kazakov
  2021-05-04 17:47   ` Stephen Leake
  2021-05-03  8:29 ` J-P. Rosen
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Dmitry A. Kazakov @ 2021-05-02 16:54 UTC (permalink / raw)


On 2021-05-02 18:28, Simon Wright wrote:
> GCC 11.1.0 x86_64-apple-darwin for macOS is available at:
> 
> https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/11.1.0/native
> 
> The release no longer supports ASIS.
> 
> Libadalang and tools (gnatmetric, gnatpp, gnatstub, gnattest) are
> included.
> 
> Please note:
> 
> * This release is made as an installer package. Because I don't have a
>    signing ID, you can't double-click on it; instead, right-button, Open,
>    and ignore the warnings. Sorry.
> 
> * In the past, I've included modified versions of the compiler specs
>    files. This time, such a modified specs file wouldn't run on El
>    Capitan, so I've supplied the compiler as-built; if you're on Mojave
>    or later, you need to set SDKROOT to pick up the place where Apple
>    provide them. This means that the compiler won't automatically look in
>    /usr/local/include (affects C, C++) or /usr/local/lib (affects all
>    languages).
> 
> See the release notes at Sourceforge.

Thanks Simon!

--------------
As a side note. The version 11 brings new incompatibilities breaking old 
code. In some cases X'Access is no more accepted and need to be replaced 
by X'Unchecked_Access.

I am to lazy to analyze whether that it is a bug of feature, just be aware.

I dare say that every Ada style guideline should require 
'Unchecked_Access everywhere. The issue became a permanent maintenance 
nightmare.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-02 16:28 ANN: GCC 11.1.0 for macOS Simon Wright
  2021-05-02 16:54 ` Dmitry A. Kazakov
@ 2021-05-03  8:29 ` J-P. Rosen
  2021-05-03 10:46   ` Luke A. Guest
  2021-05-03 11:14   ` Simon Wright
  2021-05-03 15:16 ` Bill Findlay
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 13+ messages in thread
From: J-P. Rosen @ 2021-05-03  8:29 UTC (permalink / raw)


Le 02/05/2021 à 18:28, Simon Wright a écrit :
> GCC 11.1.0 x86_64-apple-darwin for macOS is available at:
> 
> https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/11.1.0/native
> 
> The release no longer supports ASIS.
That's unfortunate. Actually, Gnat FSF could be a good opportunity to 
continue support for ASIS.
> 
> Libadalang and tools (gnatmetric, gnatpp, gnatstub, gnattest) are
> included.
But I guess not gnatcheck, since it needs ASIS.

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52
https://www.adalog.fr

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-03  8:29 ` J-P. Rosen
@ 2021-05-03 10:46   ` Luke A. Guest
  2021-05-03 11:50     ` J-P. Rosen
  2021-05-03 11:14   ` Simon Wright
  1 sibling, 1 reply; 13+ messages in thread
From: Luke A. Guest @ 2021-05-03 10:46 UTC (permalink / raw)


On 03/05/2021 09:29, J-P. Rosen wrote:
> Le 02/05/2021 à 18:28, Simon Wright a écrit :
>> GCC 11.1.0 x86_64-apple-darwin for macOS is available at:
>>
>> https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/11.1.0/native 
>>
>>
>> The release no longer supports ASIS.
> That's unfortunate. Actually, Gnat FSF could be a good opportunity to 
> continue support for ASIS.

Why? ASIS is dead, even the WG don't bother anymore.

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-03  8:29 ` J-P. Rosen
  2021-05-03 10:46   ` Luke A. Guest
@ 2021-05-03 11:14   ` Simon Wright
  1 sibling, 0 replies; 13+ messages in thread
From: Simon Wright @ 2021-05-03 11:14 UTC (permalink / raw)


"J-P. Rosen" <rosen@adalog.fr> writes:

> But I guess not gnatcheck, since it needs ASIS.

gnatcheck isn't in any of the recent releases of CE. [1], see the
[Tools] section at the end, says it's not.

The [Tools] section also says ASIS is available as an add-on.
But it says that about GNATtest.

[1] https://www.adacore.com/gnatpro/comparison

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-03 10:46   ` Luke A. Guest
@ 2021-05-03 11:50     ` J-P. Rosen
  0 siblings, 0 replies; 13+ messages in thread
From: J-P. Rosen @ 2021-05-03 11:50 UTC (permalink / raw)


Le 03/05/2021 à 12:46, Luke A. Guest a écrit :
> Why? ASIS is dead, even the WG don't bother anymore.
Many tools depend on ASIS, and there might well be an update of the 
standard. It is still supported by GnatPro (and PTC).

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52
https://www.adalog.fr

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-02 16:28 ANN: GCC 11.1.0 for macOS Simon Wright
  2021-05-02 16:54 ` Dmitry A. Kazakov
  2021-05-03  8:29 ` J-P. Rosen
@ 2021-05-03 15:16 ` Bill Findlay
  2021-05-03 15:44   ` Simon Wright
  2021-05-04 15:20 ` Simon Wright
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Bill Findlay @ 2021-05-03 15:16 UTC (permalink / raw)


On 2 May 2021, Simon Wright wrote
(in article <lyeeep2j8m.fsf@pushface.org>):

> GCC 11.1.0 x86_64-apple-darwin for macOS is available at:
>
> https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/11.1.0/native
>
> The release no longer supports ASIS.

Thanks for that Simon.
My KDF9 emulator (~25KSLOC of Ada 2012) compiles and runs correctly,
but the (stripped) object codeis about10% bigger and runs about
10% slower than a verion compiled with GNAT CE 2020.

Is an Apple Silicon compiler a reasonable thing to hope
for in the not too distant future? (Hint 8-)

-- 
Bill Findlay

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-03 15:16 ` Bill Findlay
@ 2021-05-03 15:44   ` Simon Wright
  0 siblings, 0 replies; 13+ messages in thread
From: Simon Wright @ 2021-05-03 15:44 UTC (permalink / raw)


Bill Findlay <findlaybill@blueyonder.co.uk> writes:

> My KDF9 emulator (~25KSLOC of Ada 2012) compiles and runs correctly,
> but the (stripped) object codeis about10% bigger and runs about
> 10% slower than a verion compiled with GNAT CE 2020.

Sorry to hear that.

> Is an Apple Silicon compiler a reasonable thing to hope
> for in the not too distant future? (Hint 8-)

Work is in progress, but not so far by me since I don't own any Apple
Silicon :-(

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-02 16:28 ANN: GCC 11.1.0 for macOS Simon Wright
                   ` (2 preceding siblings ...)
  2021-05-03 15:16 ` Bill Findlay
@ 2021-05-04 15:20 ` Simon Wright
  2021-05-23  7:32 ` Blady
  2021-06-10 16:21 ` Simon Wright
  5 siblings, 0 replies; 13+ messages in thread
From: Simon Wright @ 2021-05-04 15:20 UTC (permalink / raw)


GCC 11.1.0 arm-eabi-apple-darwin for macOS is available at:

https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/11.1.0/arm-eabi

Please note:
This release is made as an installer package. Because I don't have a
signing ID, you can't double-click on it; instead, right-button, Open,
and ignore the warnings. Sorry.

See the release notes at Sourceforge.

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-02 16:54 ` Dmitry A. Kazakov
@ 2021-05-04 17:47   ` Stephen Leake
  2021-05-04 20:12     ` Dmitry A. Kazakov
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Leake @ 2021-05-04 17:47 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> As a side note. The version 11 brings new incompatibilities breaking
> old code. In some cases X'Access is no more accepted and need to be
> replaced by X'Unchecked_Access.
>
> I am to lazy to analyze whether that it is a bug of feature, just be aware.
>
> I dare say that every Ada style guideline should require
> 'Unchecked_Access everywhere. The issue became a permanent maintenance 
> nightmare.

I had a similar issue upgrading from GNAT Community 2020 to GNAT Pro 21.
The GNAT compiler has gotten smarter about enforcing accessibility
rules.

Since those rules are there to prevent dangling references, they should
be respected; I fixed my code to compile with 'Access.

It is a pain that GNAT didn't get this totally correct the first time
around, but that's life.
-- 
-- Stephe

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-04 17:47   ` Stephen Leake
@ 2021-05-04 20:12     ` Dmitry A. Kazakov
  0 siblings, 0 replies; 13+ messages in thread
From: Dmitry A. Kazakov @ 2021-05-04 20:12 UTC (permalink / raw)


On 2021-05-04 19:47, Stephen Leake wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> 
>> As a side note. The version 11 brings new incompatibilities breaking
>> old code. In some cases X'Access is no more accepted and need to be
>> replaced by X'Unchecked_Access.
>>
>> I am to lazy to analyze whether that it is a bug of feature, just be aware.
>>
>> I dare say that every Ada style guideline should require
>> 'Unchecked_Access everywhere. The issue became a permanent maintenance
>> nightmare.
> 
> I had a similar issue upgrading from GNAT Community 2020 to GNAT Pro 21.
> The GNAT compiler has gotten smarter about enforcing accessibility
> rules.

Alas.

> Since those rules are there to prevent dangling references, they should
> be respected; I fixed my code to compile with 'Access.

For example:

    declare
       Location : Abstract_Layer'Class renames
                  Abstract_Layer'Class (Under.all);
    begin
       ...
       if Location'Access = Location.Widget.Bottom then

This does not compile anymore. Clearly there cannot be any dangling 
references here.

Recent changes broke a lot of code involving comparisons of access 
types, especially if an anonymous access type is involved. Among them 
are cases when even 'Unchecked_Access does not help. So, one should 
resort to awful 'Address instead.

The situation is quite dire. I would even suggest introducing a built-in 
operation to compare an object with an access, e.g.

    P'Refers (X)  -- True if P points to X

since comparison of access types became too volatile.

> It is a pain that GNAT didn't get this totally correct the first time
> around, but that's life.

I am not a language lawyer to judge. My impression that in practice 
accessibility rules significantly reduce safety and code quality rather 
than add it.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-02 16:28 ANN: GCC 11.1.0 for macOS Simon Wright
                   ` (3 preceding siblings ...)
  2021-05-04 15:20 ` Simon Wright
@ 2021-05-23  7:32 ` Blady
  2021-06-10 16:21 ` Simon Wright
  5 siblings, 0 replies; 13+ messages in thread
From: Blady @ 2021-05-23  7:32 UTC (permalink / raw)


Le 02/05/2021 à 18:28, Simon Wright a écrit :
> GCC 11.1.0 x86_64-apple-darwin for macOS is available at:
> 
> https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/11.1.0/native

Thanks Simon for that significant full work!

How to know which Ada 202x features are included in this 11.1.0 release?

Thanks, Pascal.

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

* Re: ANN: GCC 11.1.0 for macOS
  2021-05-02 16:28 ANN: GCC 11.1.0 for macOS Simon Wright
                   ` (4 preceding siblings ...)
  2021-05-23  7:32 ` Blady
@ 2021-06-10 16:21 ` Simon Wright
  5 siblings, 0 replies; 13+ messages in thread
From: Simon Wright @ 2021-06-10 16:21 UTC (permalink / raw)


Simon Wright <simon@pushface.org> writes:

> GCC 11.1.0 x86_64-apple-darwin for macOS is available at:
>
> https://sourceforge.net/projects/gnuada/files/GNAT_GCC%20Mac%20OS%20X/11.1.0/native

This release contains versions of gnatstub, gnattest, gnatpp and
gnatmetric which fail to load:

$ /opt/gcc-11.1.0/bin/gnattest --help
dyld: Library not loaded: @rpath/libgnarl-11.dylib
Referenced from: /opt/gcc-11.1.0/bin/gnattest
Reason: image not found
Abort trap: 6

Workround:
export DYLD_FALLBACK_LIBRARY_PATH=/opt/gcc-11.1.0/lib/gcc/x86_64-apple-darwin15/11.1.0/adalib

~~~~~~~~~~~~~~~~~~~

You may not be aware that gprbuild now lets you specify building
standalone static libraries "for Library_Interface use (list-of-units);"
- this doesn't work on macOS, and in fact cannot work, because it uses
features of binutils object binaries that aren't available in
Mach-O. The effect of this is that a static link against such a library
will fail if the library involves any tasking. If you try to fix this by
using the relocatable version, and then move the executable, it won't
find the GNAT runtime dylibs.

I wonder why the GNAT runtime dylibs are all the way down there without
a symlink in $prefix/lib?

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

end of thread, other threads:[~2021-06-10 16:21 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-02 16:28 ANN: GCC 11.1.0 for macOS Simon Wright
2021-05-02 16:54 ` Dmitry A. Kazakov
2021-05-04 17:47   ` Stephen Leake
2021-05-04 20:12     ` Dmitry A. Kazakov
2021-05-03  8:29 ` J-P. Rosen
2021-05-03 10:46   ` Luke A. Guest
2021-05-03 11:50     ` J-P. Rosen
2021-05-03 11:14   ` Simon Wright
2021-05-03 15:16 ` Bill Findlay
2021-05-03 15:44   ` Simon Wright
2021-05-04 15:20 ` Simon Wright
2021-05-23  7:32 ` Blady
2021-06-10 16:21 ` Simon Wright

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