[Ada] Tighten crtbegin files for VxWorks
authorOlivier Hainque <hainque@adacore.com>
Tue, 29 May 2018 09:41:02 +0000 (09:41 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 29 May 2018 09:41:02 +0000 (09:41 +0000)
commit1f39fcd651b3334e7b12b35f7e822ca6c4b57376
tree985fe7a6d4ee2c3b8cc794c84f41a3ef891b88e5
parent8f1edbd3ac32fe45d5bd48fd1fa42a17aee6e14d
[Ada] Tighten crtbegin files for VxWorks

Enforce a more explicit distinction of crtbegin objects holding
either functions with ctor/dtor attributes or _ctors/_dtors arrays,
or none of the two (no array, no attributes). Then allow/enforce
different linking strategies for VxWorks 7.

2018-05-29  Olivier Hainque  <hainque@adacore.com>

gcc/ada/

* vx_crtbegin.inc: Use a consistent naming convention for the
registration/deregistration functions across RTP or kernel.  Remove the
ctor/dtor attribute setting based on RTP/kernel, expect the optional
attribute extension to be provided by includers instead.
* vx_crtbegin.c: Mere inclusion of vx_crtbegin.inc with empty attribute
extension for the registration/deregistration functions.
* vx_crtbegin_attr.c: New file. Include vx_crtbegin.inc with explicit
constructor/destructor attribute extensions.
* vx_crtbegin_array.c: New file. Include vx_crtbegin.inc with empty
attribute extensions and declare _ctors/_dtors arrays.
* vx_crtbegin_auto.c: Remove.
* libgnat/system-vxworks7-aarch64-rtp-smp.ads: Use
vxworks7-gnat-crtbe-link.spec.
* libgnat/system-vxworks7-aarch64.ads: Likewise.
* libgnat/system-vxworks7-e500-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-x86-kernel.ads: Likewise.
* libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
* libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.

From-SVN: r260876
15 files changed:
gcc/ada/ChangeLog
gcc/ada/libgnat/system-vxworks7-aarch64-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-aarch64.ads
gcc/ada/libgnat/system-vxworks7-e500-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-ppc-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-ppc64-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-x86-kernel.ads
gcc/ada/libgnat/system-vxworks7-x86-rtp-smp.ads
gcc/ada/libgnat/system-vxworks7-x86_64-kernel.ads
gcc/ada/libgnat/system-vxworks7-x86_64-rtp-smp.ads
gcc/ada/vx_crtbegin.c
gcc/ada/vx_crtbegin.inc
gcc/ada/vx_crtbegin_array.c [new file with mode: 0644]
gcc/ada/vx_crtbegin_attr.c [new file with mode: 0644]
gcc/ada/vx_crtbegin_auto.c [deleted file]