[Ada] Elaboration order v4.0 and linker switches
authorHristian Kirtchev <kirtchev@adacore.com>
Wed, 10 Jul 2019 08:59:46 +0000 (08:59 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Wed, 10 Jul 2019 08:59:46 +0000 (08:59 +0000)
commit19448640ac04e980ef665ae72bc3f106b4e5b6e0
tree20d634a5fcbf09b983aef0012360fa7828ee4d59
parent3f833dc291c4ece5b7419e9dacf08b0831782693
[Ada] Elaboration order v4.0 and linker switches

This patch adds a missing functionality with respect to elaboration
order v3.0.  Units carry an attribute called Elab_Position which among
other things controls the sorting of linker switches by gnatbind.
Setting the proper position ensures the gnatbind will output the linker
switches in an order compatible with what gnatlink expects.

No simple test available as this requires a Windows cross-compiler.

2019-07-10  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* bindo-elaborators.adb (Elaborate_Units): Set attribute
Elab_Position of all elaborated units.
(Set_Unit_Elaboration_Positions): New routine.

From-SVN: r273326
gcc/ada/ChangeLog
gcc/ada/bindo-elaborators.adb