aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/Makefile.rtl
AgeCommit message (Collapse)AuthorFilesLines
2024-10-09Remove support for HP-UX 10Eric Botcazou1-26/+0
gcc/ada * Makefile.rtl: Remove HP-UX 10 section. * libgnarl/s-osinte__hpux-dce.ads: Delete. * libgnarl/s-osinte__hpux-dce.adb: Likewise. * libgnarl/s-taprop__hpux-dce.adb: Likewise. * libgnarl/s-taspri__hpux-dce.ads: Likewise. * libgnat/s-oslock__hpux-dce.ads: Likewise.
2024-10-08ada: Rework the Android sigtramp implementationOlivier Hainque1-7/+5
The initial signal handling code introduced for aarch64-android overlooked details of the tasking runtime, not in the initial testing perimeter. Specifically, a reference to __gnat_sigtramp from __gnat_error_handler, initially introduced for the arm port, was prevented if !arm on the grounds that other ports would rely on kernel CFI. aarch64-android does provide kernel CFI and __gnat_sigtramp was not provided for this configuration. But there is a similar reference from s-intman__android, which kicks in as soon as the tasking runtime gets activated, triggering link failures. Testing for more precise target specific parameters from Ada code is inconvenient and replicating the logic is not attractive in any case, so this change addresses the problem in the following fashion: - Always provide a __gnat_sigtramp entry point, common to the tasking and non-tasking signal handling code for all the Android configurations, - There (C code), from target definition macros, select a path that either routes directly to the actual signal handler or goes through the intermediate layer providing hand crafted CFI information which allows unwinding up to the interrupted code. - Similarily to what was done for VxWorks, move the arm specific definitions to a separate header file to make the general structure of the common C code easier to grasp, - Adjust the comments in the common sigtramp.h header to account for such an organisation possibility. gcc/ada/ChangeLog: * sigtramp-armdroid.c: Refactor into ... * sigtramp-android.c, sigtramp-android-asm.h: New files. * Makefile.rtl (arm/aarch64-android section): Add sigtramp-android.o to EXTRA_LIBGNAT_OBJS unconditionally. Add sigtramp.h and sigtramp-android-asm.h to EXTRA_LIBGNAT_SRCS. * init.c (android section, __gnat_error_handler): Defer to __gnat_sigramp unconditionally again. * sigtramp.h: Adjust comments to allow neutral signal handling relays, merely forwarding to the underlying handler without any intermediate CFI magic.
2024-10-08ada: Use a-nallfl__wraplf.ads for AndroidOlivier Hainque1-0/+1
This is the most common definition. Otherwise, from the default: a-nallfl.ads:51:13: ... intrinsic binding type mismatch on result a-nallfl.ads:51:13: ... intrinsic binding type mismatch on parameter 1 a-nallfl.ads:51:13: ... profile of "Sin" doesn't match the builtin it binds gcc/ada/ChangeLog: * Makefile.rtl (arm/aarch64-android): Associate a-nallfl.ads with libgnat/a-nallfl__wraplf.ads.
2024-10-08ada: Rework s-linux/osinte for arm/aarch64-android sigactionsOlivier Hainque1-1/+4
Building an aarch64-android compiler with the current sources initially intended for arm-android expectedly trips on problems. This change is meant to address: ``` .../gcc/ada/rts % ../../gnat1 -quiet ... a-stbufi.adb -I. s-osinte.ads:591:07: error: component "sa_flags" overlaps "sa_mask" at line 590 ``` s-linux__android.ads makes hardcoded assumptions on the size of sigset_t, based on observations performed in the course of the arm port. Then sysem headers show sa_flags placed VERY differently between the 32 and the 64 bits variants. See android-sysroot/usr/include/bits/signal_types.h ``` %if defined(__LP64__) int sa_flags; \ union { \ sighandler_t sa_handler; \ void (*sa_sigaction)(int, struct siginfo*, void*); \ }; \ sigset_t sa_mask; \ void (*sa_restorer)(void); \ %else union { sighandler_t sa_handler; void (*sa_sigaction)(int, struct siginfo*, void*); }; sigset_t sa_mask; int sa_flags; void (*sa_restorer)(void); ``` gcc/ada/ChangeLog: * libgnarl/s-linux__android-arm.ads: New file, renaming of ... * libgnarl/s-linux__android.ads: ... this file. * libgnarl/s-linux__android-aarch64.ads: New file. Based on the -arm variant, with sa_ field positions adjusted. * Makefile.rtl (arm/aarch64-android pairs): Adjust accordingly. * libgnarl/s-osinte__android.ads: Rather than making assumptions on the actual type of the C sigset_t, use Os_Constants.SIZEOF_sigset_t to define an Ada sigset_t type of the proper size. Use C.int instead of unsigned_long for sa_flags.
2024-10-08ada: Extend arm-android section of Makefile.rtl to aarch64Olivier Hainque1-5/+223
gcc/ada/ChangeLog: * Makefile.rtl: Extend arm-android section to aarch64, in a similar fashion as other arm/arch64 configurations. Introduce pair selection guards to prevent match of aarch64-linux-android on the regular aarch64-linux% cross as well.
2024-06-13ada: Streamline elaboration of local tagged typesEric Botcazou1-0/+3
This set of changes is aimed at streamlining the code generated for the elaboration of local tagged types. The dispatch tables and other related data structures are built dynamically on the stack for them and a few of the patterns used for this turn out to be problematic for the optimizer: 1. the array of primitives in the dispatch table is default-initialized to null values by calling the initialization routine of an unconstrained array type, and then immediately assigned an aggregate made up of the same null values. 2. the external tag is initialized by means of a dynamic concatenation involving the secondary stack, but all the elements have a fixed size. 3. the _size primitive is saved in the TSD by means of the dereference of the address of the TSD that was previously saved in the dispatch table. gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-imad32$(objext), s-imad64$(objext) and s-imagea$(objext). * exp_atag.ads (Build_Set_Size_Function): Replace Tag_Node parameter with Typ parameter. * exp_atag.adb: Add clauses for Sinfo.Utils. (Build_Set_Size_Function): Retrieve the TSD object statically. * exp_disp.adb: Add clauses for Ttypes. (Make_DT): Call Address_Image{32,64] instead of Address_Image. (Register_Primitive): Pass Tag_Typ to Build_Set_Size_Function. * rtsfind.ads (RTU_Id): Remove System_Address_Image and add System_Img_Address_{32;64}. (RE_Id): Remove entry for RE_Address_Image and add entries for RE_Address_Image{32,64}. * rtsfind.adb (System_Descendant): Adjust to above changes. * libgnat/a-tags.ads (Address_Array): Suppress initialization. * libgnat/s-addima.adb (System.Address_Image): Call the appropriate routine based on the address size. * libgnat/s-imad32.ads: New file. * libgnat/s-imad64.ads: Likewise. * libgnat/s-imagea.ads: Likewise. * libgnat/s-imagea.adb: Likewise. * gcc-interface/Make-lang.in (GNAT_ADA_OBJS) [$(STAGE1)=False]: Add ada/libgnat/s-imad32.o and ada/libgnat/s-imad64.o.
2024-05-29Fix link failure of GNAT tools on 32-bit SPARC/LinuxEric Botcazou1-3/+10
There is an incorrect binding to the 64-bit compare-and-exchange builtin. gcc/ada/ PR ada/115270 * Makefile.rtl (PowerPC/Linux): Use libgnat/s-atopri__32.ads for the 32-bit library. (SPARC/Linux): Likewise.
2024-05-17ada: Replace spinlocks with fully-fledged locks in finalization collectionsEric Botcazou1-0/+41
This replaces spinlocks with fully-fledged locks in finalization collections because the former are deemed problematic with tasks that can be preempted. Because of the requirement to avoid dragging the tasking runtime when it is not necessary, the implementation goes through the usual soft links, with an additional hurdle that space must be reserved for the lock in any case since it is part of the ABI. This entails the introduction of the System.OS_Locks unit in the non-tasking runtime and the modification of the tasking runtime to also use this unit. This in turn requires a small adjustment: because of the presence of pre- and post-conditions in Interfaces.C and of the limitations of the RTSfind mechanism, the System.Finalization_Primitives unit must be preloaded, as what is done for the Ada.Strings.Text_Buffers unit. This effectively reverts the implementation to using the global task lock on bare board platforms. gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-oslock$(objext). (LIBGNAT_TARGET_PAIRS): Use s-oslock__dummy.ads by default. Set specific s-oslock.ads source file for all the platforms. * exp_ch7.ads (Preload_Finalization_Collection): New procedure. * exp_ch7.adb (Allows_Finalization_Collection): Return False if System.Finalization_Primitives has not been preloaded. (Preload_Finalization_Collection): New procedure. * opt.ads (Interface_Seen): New boolean variable. * s-oscons-tmplt.c: Use "N" string for pragma Style_Checks. * scng.adb (Scan): Set Interface_Seen upon seeing "interface". * sem_ch10.adb: Add clause for Exp_Ch7. (Analyze_Compilation_Unit): Call Preload_Finalization_Collection after the context of the unit is analyzed. * libgnarl/a-rttiev.adb: Add with clause for System.OS_Locks and alphabetize others. (Event_Queue_Lock): Adjust qualified name of subtype. * libgnarl/s-osinte__aix.ads: Add with clause for System.OS_Locks and change pthread_mutex_t into a local subtype. * libgnarl/s-osinte__android.ads: Likewise. * libgnarl/s-osinte__darwin.ads: Likewise. * libgnarl/s-osinte__dragonfly.ads: Likewise. * libgnarl/s-osinte__freebsd.ads: Likewise. * libgnarl/s-osinte__gnu.ads: Likewise. * libgnarl/s-osinte__hpux-dce.ads: Likewise. * libgnarl/s-osinte__hpux.ads: Add Likewise. * libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise. * libgnarl/s-osinte__linux.ads: Likewise. * libgnarl/s-osinte__lynxos178e.ads: Likewise. * libgnarl/s-osinte__qnx.ads: Likewise. * libgnarl/s-osinte__rtems.ads: Likewise. * libgnarl/s-osinte__mingw.ads: Add with clause for System.OS_Locks and change CRITICAL_SECTION into a local subtype. Add declarations for imported procedures dealing with CRITICAL_SECTION. * libgnarl/s-osinte__solaris.ads: Add with clause for System.OS_Locks and change mutex_t into a local subtype. * libgnarl/s-osinte__vxworks.ads: Add missing blank line. * libgnarl/s-taprop.ads: Alphabetize clauses and package renamings. Use qualified name for RTS_Lock throughout. * libgnarl/s-taprop__dummy.adb: Add use clause for System.OS_Locks and alphabetize others. * libgnarl/s-taprop__hpux-dce.adb: Likewise. * libgnarl/s-taprop__linux.adb: Likewise. * libgnarl/s-taprop__posix.adb: Likewise. * libgnarl/s-taprop__qnx.adb: Likewise. * libgnarl/s-taprop__rtems.adb: Likewise. * libgnarl/s-taprop__solaris.adb: Likewise. * libgnarl/s-taprop__vxworks.adb: Likewise. * libgnarl/s-taprop__mingw.adb: Likewise. Remove declarations for imported procedures dealing with CRITICAL_SECTION. * libgnarl/s-tarest.adb: Add with clause for System.OS_Locks and alphabetize others. (Global_Task_Lock): Adjust qualified name of subtype. * libgnarl/s-tasini.adb: Add clause for System.OS_Locks. (Initialize_RTS_Lock): New procedure. (Finalize_RTS_Lock): Likewise. (Acquire_RTS_Lock): Likewise. (Release_RTS_Lock): Likewise. (Init_RTS): Add compile-time assertions for RTS_Lock types. Set the soft links for the RTS lock manipulation routines. * libgnarl/s-taspri__dummy.ads: Add with clause for System.OS_Locks. (RTS_Lock): Delete and adjust throughout accordingly. * libgnarl/s-taspri__hpux-dce.ads: Likewise. * libgnarl/s-taspri__lynxos.ads: Likewise. * libgnarl/s-taspri__mingw.ads: Likewise. * libgnarl/s-taspri__posix-noaltstack.ads: Likewise. * libgnarl/s-taspri__posix.ads: Likewise. * libgnarl/s-taspri__solaris.ads: Likewise. * libgnarl/s-taspri__vxworks.ads: Likewise. * libgnat/s-finpri.ads: Add clause for System.OS_Locks. (Finalization_Collection): Change type of Lock. * libgnat/s-finpri.adb (Initialize): Call Initialize_RTS_Lock. (Lock_Collection): Call Acquire_RTS_Lock. (Unlock_Collection): Call Release_RTS_Lock. * libgnat/s-oslock__dummy.ads: New file. * libgnat/s-oslock__hpux-dce.ads: Likewise. * libgnat/s-oslock__mingw.ads: Likewise. * libgnat/s-oslock__posix.ads: Likewise. * libgnat/s-oslock__solaris.ads: Likewise. * libgnat/s-oslock__vxworks.ads: Likewise. * libgnat/s-soflin.ads (Null_Set_Address): New null procedure. (Initialize_RTS_Lock): New soft link. (Finalize_RTS_Lock): Likewise. (Acquire_RTS_Lock): Likewise. (Release_RTS_Lock): Likewise. * exp_ch4.adb (Expand_N_Allocator): In the subtype indication case, call Apply_Predicate_Check on the resulting access value if need be.
2024-05-13ada: Replace finalization masters with finalization collectionsEric Botcazou1-1/+0
This change replaces finalization masters with finalization collections in most cases, that is to say, when they implement a list of objects created by allocators of a given access type; indeed the moniker is overloaded in the front-end, e.g. Sem_Util.Is_Master determines if a node "constitutes a finalization master" but is not affected by the change. This is mostly a renaming at this stage, toward something more in keeping with the terminology used in the RM 7.6.1 clause and no functional changes: although it gets rid of the rest of the System.Finalization_Masters unit, the functionalities are reimplemented in the System.Finalization_Primitives unit in terms of collections with only minor adjustments. gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Remove s-finmas$(objext). * einfo.ads (Anonymous_Masters): Rename into Anonymous_Collections. (Finalization_Master): Rename into Finalization_Collection. * gen_il-fields.ads (Opt_Field_Enum): Replace Anonymous_Masters with Anonymous_Collections; and Finalization_Master with Finalization_Collection. * gen_il-gen-gen_entities.adb (Access_Kind): Likewise. (E_Function): Likewise. (E_Procedure): Likewise. (E_Package): Likewise. (E_Subprogram_Body): Likewise. * exp_ch3.adb (Build_Heap_Or_Pool_Allocator): Adjust to renamings. (Freeze_Type): Likewise. (Stream_Operation_OK): Remove obsolete test. * exp_ch4.adb (Expand_Allocator_Expression): Adjust to renamings. (Expand_N_Allocator): Likewise. * exp_ch6.ads (BIP_Formal_Kind): Replace BIP_Finalization_Master with BIP_Collection. (Needs_BIP_Finalization_Master): Rename into... (Needs_BIP_Collection): ...this. * exp_ch6.adb (BIP_Finalization_Master_Suffix): Delete. (BIP_Collection_Suffix): New constant string. (Add_Finalization_Master_Actual_To_Build_In_Place_Call): Rename to (Add_Collection_Actual_To_Build_In_Place_Call): ...this and adjust. (BIP_Formal_Suffix): Replace BIP_Finalization_Master alternative with BIP_Collection alternative. (BIP_Suffix_Kind): Replace test on BIP_Finalization_Master_Suffix with test on BIP_Collection_Suffix. (Is_Build_In_Place_Entity): Likewise. (Make_Build_In_Place_Call_In_Allocator): Call Needs_BIP_Collection and Add_Collection_Actual_To_Build_In_Place_Call. (Make_Build_In_Place_Call_In_Anonymous_Context): Likewise. (Make_Build_In_Place_Call_In_Assignment): Likewise. (Make_Build_In_Place_Call_In_Object_Declaration): Likewise. (Needs_BIP_Finalization_Master): Rename into... (Needs_BIP_Collection): ...this. (Needs_BIP_Alloc_Form): Call Needs_BIP_Collection. * exp_ch7.ads (Build_Anonymous_Master): Rename into... (Build_Anonymous_Collection): ...this. (Build_Finalization_Master): Rename into... (Build_Finalization_Collection): ...this. * exp_ch7.adb (Allows_Finalization_Master): Rename into... (Allows_Finalization_Collection): ...this. (Build_BIP_Cleanup_Stmts): Adjust to renamings. (Build_Anonymous_Master): Rename into... (Build_Anonymous_Collection): ...this. Adjust to renamings. (Build_Finalization_Master): Rename into... (Build_Finalization_Collection): ...this. Adjust to renamings. (Build_Finalizer): Adjust comment to renamings. * exp_ch13.adb (Expand_N_Free_Statement): Adjust to renamings. * exp_util.adb (Build_Allocate_Deallocate_Proc): Likewise. (Requires_Cleanup_Actions): Adjust comment to renamings. * freeze.adb (Freeze_All): Likewise. * rtsfind.ads (RTU_Id): Remove System_Finalization_Masters. (RE_Id): Remove RE_Finalization_Master & RE_Finalization_Master_Ptr add RE_Finalization_Collection & RE_Finalization_Collection_Ptr. Adjust RE_Add_Offset_To_Address and RE_Finalization_Scope_Master. (RE_Unit_Table): Remove entries for RE_Finalization_Master & RE_Finalization_Master_Ptr, add ones for RE_Finalization_Collection & RE_Finalization_Collection_Ptr. Also adjust those of RE_Add_Offset_To_Address and RE_Finalization_Scope_Master. * sem_ch3.adb (Access_Type_Declaration): Adjust to renamings. * sem_ch6.adb (Create_Extra_Formals): Likewise. * sem_util.adb (Designated_Subtype_Mark): Likewise. * libgnat/s-finpri.ads: Add clauses for Ada.Finalization and System.Storage_Elements. (Finalization_Collection): New limited controlled type. (Finalization_Collection_Ptr): Likewise. (Initialize): New overriding procedure. (Finalize): Likewise. (Finalization_Started): Likewise. (Collection_Node): New type. (Collection_Node_Ptr): Likewise. (Attach_Node_To_Collection): New procedure. (Detach_Node_From_Collection): Likewise. (Header_Size): New function. (Add_Offset_To_Address): Likewise. * libgnat/s-finpri.adb (Add_Offset_To_Address): New function. (Attach_Node_To_Collection): New procedure. (Detach_Node_From_Collection): Likewise. (Finalization_Started): Likewise. (Finalize): New overriding procedure. (Header_Size): New function. (Initialize): New overriding procedure. * libgnat/s-spsufi.ads (Finalize_And_Deallocate): Adjust comment. * libgnat/s-spsufi.adb: Remove clause for Finalization_Masters and add clause for Finalization_Primitives. (Finalize_And_Deallocate): Finalize the Collection component. * libgnat/s-stposu.ads: Remove clause for Finalization_Masters and add clause for Finalization_Primitives. (Root_Subpool): Replace Master component with Collection. (Allocate_Any_Controlled): Replace Context_Master parameter with Context_Collection parameter. * libgnat/s-stposu.adb: Remove clauses for Finalization_Masters and add clauses for Finalization_Primitives. (Address_To_FM_Node_Ptr): Delete. (To_Collection_Node_Ptr): New instance of Ada.Unchecked_Conversion. (Adjust_Controlled_Dereference): Adjust comment to renamings. (Allocate_Any_Controlled): Replace Context_Master parameter with Context_Collection parameter. Adjust to renamings. (Deallocate_Any_Controlled): Adjust to renamings. (Print_Subpool): Likewise. * libgnat/s-finmas.ads: Delete. * libgnat/s-finmas.adb: Likewise.
2024-05-13ada: Remove deprecated VxWorks interrupt connection APIAshley Gay1-4/+4
The VxWorks 7 API to use hardware interrupts is the VxBus subsystem. GNAT API still provides bindings for the deprecated (VxWorks 6) routines. A direct consequence of this change is that Attach_Handler cannot be used anymore (the VxBus subsystem should be used instead). This patch removes all the functions that are not supported by VxWorks 7 anymore. To warn for the usage of Attach_Handler, it adds the 'Obsolescent' pragma to to this routine so the comiler will advise the user if this function is called directly or through a pragma. gcc/ada/ * Makefile.rtl: remove i-vxinco.* from the build * doc/gnat_rm/the_gnat_library.rst: Remove i-vxinco.ads from the units documentation. * impunit.adb: Remove i-vxinco from the list of available units in GNATstudio. * libgnarl/i-vxinco.adb: Remove. * libgnarl/i-vxinco.ads: Ditto. * libgnarl/s-interr__vxworks.adb: enrich comment * libgnarl/s-vxwext__kernel.ads: fix comment * libgnat/i-vxwork.ads: Remove deprecated interrupt connections API, as well as an example. * libgnat/i-vxwork__x86.ads: Ditto and add the paragma Obscolescent to Attach_Handler * gnat_rm.texi: Regenerate.
2024-05-06ada: Partial implementation of redesign of support for object finalizationEric Botcazou1-0/+1
This set of changes is a partial reimplemention of the support for Ada finalization in the GNAT compiler and run-time library, based on the redesign done by Hristian Kirtchev in February 2022. It only affects the scope-based finalization of objects and does not touch the support for finalization of dynamically allocated objects. It also does not modify the internal architecture of this support in the front-end but only changes its output, i.e. the expanded code. In other words, the code-based dispatching scheme in finalizers and the hook-based approach for transient objects are replaced by finalization scope masters and master nodes, which maintain a list of objects needing finalization, but the expansion of the code that builds these masters is still performed mainly during a dedicated post-processing phase. gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-finpri$(objext). * contracts.adb (Add_Call_Helper): Append freeze actions to the class-wide type rather than the specific tagged type. * einfo.ads (Finalization_Master_Node_Or_Node): Document. (Status_Flag_Or_Transient_Decl): Remove. * exp_attr.adb (Expand_N_Attribute_Reference) <Address>: Do not adjust a return object of a class-wide interface type. * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add test that Finalize_Address is not already present as a condition for calling Make_Finalize_Address_Body. (Expand_Freeze_Record_Type): Call Make_Finalize_Address_Body for class-wide types of both regular tagged types and interface types. * exp_ch4.adb (Process_Transients_In_Expression): Replace the use of hooks with the use of master nodes. * exp_ch6.adb (Build_Flag_For_Function): Delete. (Expand_N_Extended_Return_Statement): Create a master node for the return object if it does not exist. At the end of the statement, generate a call to Suppress_Object_Finalize. (Expand_Non_Function_Return): Likewise just before the return. * exp_ch7.ads (Make_Master_Node_Declaration): Declare. (Make_Suppress_Object_Finalize_Call): Likewise. * exp_ch7.adb (Build_Finalization_Master): Defer generating the call to Set_Finalize_Address until freezing if the Finalize_Address procedure has not been analyzed yet. (Build_Finalizer): Reimplement the expansion using a finalization scope master per finalizer. (Insert_Actions_In_Scope_Around): Replace finalization hooks by master nodes and calls to the Finalize_Object. (Make_Master_Node_Declaration): New procedure. (Make_Suppress_Object_Finalize_Call): Likewise. * exp_util.ads (Build_Transient_Object_Statements): Delete. * exp_util.adb (Build_Transient_Object_Statements): Likewise. (Requires_Cleanup_Actions): Remove obsolete code and return true for master nodes. * gen_il-fields.ads (Opt_Field_Enum): Add Finalization_Master_Node_Or_Object and remove Status_Flag_Or_Transient_Decl. * gen_il-gen-gen_entities.adb (Allocatable_Kind): Likewise. * rtsfind.ads (RTU_Id): Add System_Finalization_Primitives. (RE_Id): Add entities of System_Finalization_Primitives. (RE_Unit_Table): Add entries for them. * sem_ch3.adb (Analyze_Object_Declaration): For an array whose type has an unconstrained first subtype and a controlled component, set the Is_Constr_Array_Subt_With_Bounds flag. * libgnat/s-finpri.ads: New file. * libgnat/s-finpri.adb: Likewise.
2024-01-22Update copyright years.Marc Poulhiès1-1/+1
2023-09-05ada: Add missing units to Makefile.rtlRonan Desplanques1-0/+2
A previous change accidently removed a-cohama and a-cohase from `Makefile.rtl`. This patch adds these units back gcc/ada/ * Makefile.rtl: Add missing units.
2023-09-05LoongArch: initial ada support on linuxYang Yujie1-0/+49
gcc/ada/ChangeLog: * Makefile.rtl: Add LoongArch support. * libgnarl/s-linux__loongarch.ads: New file. * libgnat/system-linux-loongarch.ads: New file. gcc/ChangeLog: * config/loongarch/loongarch.h (CC1_SPEC): Mark normalized options passed from driver to gnat1 as explicit for multilib.
2023-07-06ada: Refactor the proof of the Value and Image runtime unitsClaire Dross1-0/+7
The aim of this refactoring is to avoid unnecessary dependencies between Image and Value units even though they share the same specification functions. These functions are grouped inside ghost packages which are then withed by Image and Value units. gcc/ada/ * libgnat/s-vs_int.ads: Instance of Value_I_Spec for Integer. * libgnat/s-vs_lli.ads: Instance of Value_I_Spec for Long_Long_Integer. * libgnat/s-vsllli.ads: Instance of Value_I_Spec for Long_Long_Long_Integer. * libgnat/s-vs_uns.ads: Instance of Value_U_Spec for Unsigned. * libgnat/s-vs_llu.ads: Instance of Value_U_Spec for Long_Long_Unsigned. * libgnat/s-vslllu.ads: Instance of Value_U_Spec for Long_Long_Long_Unsigned. * libgnat/s-imagei.ads: Take instances of Value_*_Spec as parameters. * libgnat/s-imagei.adb: Idem. * libgnat/s-imageu.ads: Idem. * libgnat/s-imageu.adb: Idem. * libgnat/s-valuei.ads: Idem. * libgnat/s-valuei.adb: Idem. * libgnat/s-valueu.ads: Idem. * libgnat/s-valueu.adb: Idem. * libgnat/s-imgint.ads: Adapt instance to new ghost parameters. * libgnat/s-imglli.ads: Adapt instance to new ghost parameters. * libgnat/s-imgllli.ads: Adapt instance to new ghost parameters. * libgnat/s-imglllu.ads: Adapt instance to new ghost parameters. * libgnat/s-imgllu.ads: Adapt instance to new ghost parameters. * libgnat/s-imguns.ads: Adapt instance to new ghost parameters. * libgnat/s-valint.ads: Adapt instance to new ghost parameters. * libgnat/s-vallli.ads: Adapt instance to new ghost parameters. * libgnat/s-valllli.ads: Adapt instance to new ghost parameters. * libgnat/s-vallllu.ads: Adapt instance to new ghost parameters. * libgnat/s-valllu.ads: Adapt instance to new ghost parameters. * libgnat/s-valuns.ads: Adapt instance to new ghost parameters. * libgnat/s-vaispe.ads: Take instance of Value_U_Spec as parameter and remove unused declaration. * libgnat/s-vaispe.adb: Idem. * libgnat/s-vauspe.ads: Remove unused declaration. * libgnat/s-valspe.ads: Factor out the specification part of Val_Util. * libgnat/s-valspe.adb: Idem. * libgnat/s-valuti.ads: Move specification to Val_Spec. * libgnat/s-valuti.adb: Idem. * libgnat/s-valboo.ads: Use Val_Spec. * libgnat/s-valboo.adb: Idem. * libgnat/s-imgboo.adb: Idem. * libgnat/s-imagef.adb: Adapt instances to new ghost parameters. * Makefile.rtl: List new files.
2023-05-30ada: Add System.Traceback.Symbolic.Module_Name support on AArch64 LinuxJoel Brobecker1-0/+2
This commit changes the runtime on aarch64-linux to use the Linux version of s-tsmona.adb, so as to add support for this functionality on aarch64-linux. gcc/ada/ * Makefile.rtl: Use libgnat/s-tsmona__linux.adb on aarch64-linux. Link libgnat with -ldl, as the use of s-tsmona__linux.adb requires it.
2023-05-29ada: Set g-spogwa as a GNATRTL_SOCKETS_OBJSCedric Landet1-2/+1
g-spogwa.adb is the body of the procedure GNAT.Sockets.Poll.G_Wait. This is a socket specific procedure. It should only be built for systems that support sockets. gcc/ada/ * Makefile.rtl: Move g-spogwa$(objext) from GNATRTL_NONTASKING_OBJS to GNATRTL_SOCKETS_OBJS
2023-05-29ada: Add QNX specific version of System.ParametersJohannes Kliemann1-0/+1
The QNX runtimes used the default implementation of System.Parameters that defines a default stack size of 2 MB. The QNX specific version uses the QNX default stack size of 256 KB instead. gcc/ada/ * Makefile.rtl (QNX): Use s-parame__qnx.adb for s-parame.adb. * libgnat/s-parame__qnx.adb: Add QNX specific version of System.Parameters.
2023-05-16ada: Enable Support_Atomic_Primitives on PPC LinuxJohannes Kliemann1-0/+1
gcc/ada/ * libgnat/system-linux-ppc.ads: Add Support_Atomic_Primitives. * libgnat/s-atopri__32.ads: Add 32 bit version of s-atopri.ads. * Makefile.rtl: Use s-atopro__32.ads for ppc-linux.
2022-09-12[Ada] Replace SPARK containers implementation by Compile_Time_ErrorJoffrey Huguet1-15/+0
The SPARK containers are now maintained under the spark2014 repository. This change replaces the implementation of SPARK containers by a pragma Compile_Time_Error, pointing the users WITHing the libraries to their new location. gcc/ada/ * Makefile.rtl: Remove SPARK containers filenames. * impunit.adb: Remove SPARK containers packages names. * libgnat/a-cfdlli.adb, libgnat/a-cfdlli.ads: Remove content and add pragma Compile_Time_Error with suitable message. * libgnat/a-cfhama.adb, libgnat/a-cfhama.ads: Likewise. * libgnat/a-cfhase.adb, libgnat/a-cfhase.ads: Likewise. * libgnat/a-cfidll.adb, libgnat/a-cfidll.ads: Likewise. * libgnat/a-cfinse.adb, libgnat/a-cfinse.ads: Likewise. * libgnat/a-cfinve.adb, libgnat/a-cfinve.ads: Likewise. * libgnat/a-cforma.adb, libgnat/a-cforma.ads: Likewise. * libgnat/a-cforse.adb, libgnat/a-cforse.ads: Likewise. * libgnat/a-cofove.adb, libgnat/a-cofove.ads: Likewise. * libgnat/a-cofuma.adb, libgnat/a-cofuma.ads: Likewise. * libgnat/a-cofuse.adb, libgnat/a-cofuse.ads: Likewise. * libgnat/a-cofuve.adb, libgnat/a-cofuve.ads: Likewise. * libgnat/a-cofuba.adb, libgnat/a-cofuba.ads: Remove package. gcc/testsuite/ * gnat.dg/aspect2.adb: Removed. * gnat.dg/aspect2.ads: Removed. * gnat.dg/config_pragma1.adb: Removed. * gnat.dg/config_pragma1_pkg.ads: Removed. * gnat.dg/equal8.adb: Removed. * gnat.dg/equal8.ads: Removed. * gnat.dg/equal8_pkg.ads: Removed. * gnat.dg/formal_containers.adb: Removed. * gnat.dg/iter1.adb: Removed. * gnat.dg/iter1.ads: Removed.
2022-09-06[Ada] Add formal verification dependencies to libgnatPiotr Trojanek1-0/+2
Spec units for verification of the GNAT standard library with GNATprove must be listed as part of the libgnat package, as otherwise libadalang will complain about missing dependencies. gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Include System.Value_U_Spec and System.Value_I_Spec units.
2022-07-12[Ada] Add new unbounded and indefinite formal doubly linked listJulien Bortolussi1-0/+1
Before this patch, the only formal doubly linked lists were bounded and definite. This means that it is necessary to provide their maximum length or capacity at instantiation and that they can only be used with definite element types. The formal lists added by this patch are unbounded and indefinite. Their length grows dynamically until Count_Type'Last. This makes them easier to use but requires the use of dynamic allocation and controlled types. gcc/ada/ * libgnat/a-cfidll.adb, libgnat/a-cfidll.ads: Implementation files of the formal unbounded indefinite list. * Makefile.rtl, impunit.adb: Take into account the add of the new files.
2022-07-06[Ada] Vxworks7* - Makefile.rtl rtp vs rtp-smp cleanupDoug Rupp1-49/+25
Only smp runtimes are built for vxworks7*, even though the -smp suffix is removed during install. Therefore, in general, the build macros for the non-smp runtimes are superfluous except on the legacy ppc-vxworks6 target where both the smp and non-smp runtime are built. Lastly, an error message is added if a runtime build is commanded that doesn't exist, rather then letting the build mysteriously fail. gcc/ada/ * Makefile.rtl [arm,aarch64 vxworks7]: Remove rtp and kernel build macros and set an error variable if needed. [x86,x86_vxworks7]: Likewise. [ppc,ppc64]: Set an error variable if needed. (rts-err): New phony Makefile target. (setup-rts): Depend on rts-err.
2022-07-05[Ada] Remove old vxworks6 from Makefile.rtlDoug Rupp1-103/+37
Pre vxworks7 code excepting legacy vxworks6 code is removed from Makefile.rtl and unused files are deleted. gcc/ada/ * Makefile.rtl (*vxworks*): Remove most pre-vxworks7 code. * vxworks-arm-link.spec: Remove. * vxworks-e500-link.spec: Likewise. * vxworks-smp-arm-link.spec: Likewise. * vxworks-smp-e500-link.spec: Likewise. * vxworks-smp-x86-link.spec: Likewise. * libgnat/system-vxworks-arm-rtp-smp.ads: Likewise. * libgnat/system-vxworks-arm-rtp.ads: Likewise. * libgnat/system-vxworks-arm.ads: Likewise. * libgnat/system-vxworks-e500-kernel.ads: Likewise. * libgnat/system-vxworks-e500-rtp-smp.ads: Likewise. * libgnat/system-vxworks-e500-rtp.ads: Likewise. * libgnat/system-vxworks-x86-kernel.ads: Likewise. * libgnat/system-vxworks-x86-rtp-smp.ads: Likewise. * libgnat/system-vxworks-x86-rtp.ads: Likewise.
2022-07-04[Ada] vx7r2: do not include s-qnx.ads in the kernel and rtp runtimesDoug Rupp1-0/+1
Target specific runtime files must be added to a the exclude list so the files don't automatically get copied to other runtimes. gcc/ada/ * Makefile.rtl (ADA_EXCLUDE_SRCS): Add s-qnx.ads.
2022-07-04[Ada] Makefile.rtl: remove references t oVxworks RTP Cert .spec filesDoug Rupp1-7/+0
gcc/ada/ * Makefile.rtl (GCC_SPEC_FILES): Remove vxworks cert files.
2022-07-04[Ada] Create new unbounded functional sequenceJulien Bortolussi1-0/+1
Add a new unbounded functional sequence. This sequence is indexed by Big_Positive and so is unbounded from the user and spark points view. Hower the actually implemented sequence are bounded by Count_Type'Last. gcc/ada/ * libgnat/a-cfinse.adb, libgnat/a-cfinse.ads: Implementation files of the sequence. * Makefile.rtl, impunit.adb: Take into account the add of the new files
2022-06-01[Ada] QNX shared libraries - arm-qnx build gnatlib .so'sDoug Rupp1-2/+1
Shared libraries now fully supported on arm-qnx. gcc/ada/ * Makefile.rtl (GNATLIB_SHARED): Revert disablement for arm-qnx.
2022-05-30[Ada] Update proofs of double arithmetic unit after prover changesYannick Moy1-0/+2
Changes in GNATprove (translation to Why3 and provers) result in proofs being much less automatic, and requiring ghost code to detail intermediate steps. In some cases, it is better to use the new By mechanism to prove assertions in steps, as this avoids polluting the proof context for other proofs. For that reason, add units s-spark.ads and s-spcuop.ads/b to the runtime sources. gcc/ada/ * Makefile.rtl: Add new units. * libgnat/s-aridou.adb (Scaled_Divide): Add ghost code for provers. * libgnat/s-spcuop.adb: New unit for ghost cut operations. * libgnat/s-spcuop.ads: New unit for ghost cut operations. * libgnat/s-spark.ads: New unit.
2022-05-19[Ada] Get rid of secondary stack for controlled componentsEric Botcazou1-0/+1
This eliminates the use of the secondary stack to return composite types with controlled components from functions, by exposing the return slot of these functions through the support interface of memory pools, much like for the secondary stack itself. This is piggybacked on the support of a specific intrinsic function by the code generator, and can be disabled if this support is not available, as well with the -gnatd_r debug switch. The change also streamlines a bit the implementation by consistently using the Needs_Finalization predicate, or its derivatives, in various places. gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add s-retsta. * debug.adb (d_r): Document usage. * exp_ch4.adb (Expand_N_Allocato): Deal with the return stack pool. * exp_ch6.adb (Expand_Simple_Function_Return): Replace calls to Requires_Transient_Scope with Returns_On_Secondary_Stack. Deal with types that need finalization returned on the primary stack, use CW_Or_Needs_Finalization for those returned on the secondary. * exp_util.adb (Build_Allocate_Deallocate_Proc): Return early for the return stack pool. (Remove_Side_Effects): Call CW_Or_Needs_Finalization. * fe.h (Requires_Transient_Scope): Delete. (Returns_On_Secondary_Stack): Declare. * gnat1drv.adb (Adjust_Global_Switches): Set Back_End_Return_Slot to False when generating C code or if -gnatd_r is specified. * opt.ads (Back_End_Return_Slot): New boolean variable. * rtsfind.ads (RTU_Id): Add System_Return_Stack. (RE_Id): Add RE_RS_Allocate and RE_RS_Pool. (RE_Unit_Table): Add entries for RE_RS_Allocate and RE_RS_Pool. * sem_util.ads (CW_Or_Has_Controlled_Part): Delete. (CW_Or_Needs_Finalization): Declare. (Requires_Transient_Scope): Adjust description. (Returns_On_Secondary_Stack): Declare. * sem_util.adb (Compute_Returns_By_Ref): Set Returns_By_Ref on types which need finalization if they are returned on the secondary stack. (CW_Or_Has_Controlled_Part): Rename to... (CW_Or_Needs_Finalization): ...this. (Requires_Transient_Scope): Move bulk of implementation to... (Returns_On_Secondary_Stack): ...here. Return true for types which need finalization only if the back-end return slot is not supported. * libgnat/s-retsta.ads: New file. * gcc-interface/ada-builtin-types.def (BT_FN_PTR_SSIZE): Define. * gcc-interface/ada-builtins.def (return_slot): Likewise. * gcc-interface/ada-tree.h (BUILT_IN_RETURN_SLOT): Likewise. * gcc-interface/decl.cc (gnat_to_gnu_subprog_type): Replace call to Requires_Transient_Scope with Returns_On_Secondary_Stack. * gcc-interface/trans.cc (gnat_to_gnu) <N_Simple_Return_Statement>: In the return by invisible reference, skip the copy if the source is the same as the destination. * gcc-interface/utils2.cc (build_call_alloc_dealloc_proc): Deal with the return stack pool.
2022-05-18[Ada] arm-qnx-7.1: undefined reference to fma* symbolsDoug Rupp1-1/+4
Configure the arm-qnx runtime packages to avoid generating these symbols. gcc/ada/ * Makefile.rtl (arm-qnx): Use default (non-fma) target pair.
2022-05-18[Ada] Fast implementation of floating-point mathematical functionsEric Botcazou1-4/+18
This adds a package renaming unit to the GNAT hierarchy so as to expose the underlying implementation of floating-point mathematical functions, thus also making it possible to use their vector implementation, if any. The change also contains a small improvement to the Hide_Public_Entities mechanism in Sem_Ch7 that makes it possible to clear the Is_Public flag within instances of generic packages that do not have a body. gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-gfmafu$(objext). (SIMD_PATH_TARGET_PAIRS): New variable. (TRASYM_DWARF_COMMON_OBJS): Minor tweak. (x86-64/Linux): Use SIMD_PATH_TARGET_PAIRS. (x32/Linux): Likewise. * doc/gnat_rm/the_gnat_library.rst (Generic_Fast_Math_Functions): New entry. * gnat_rm.texi: Regenerate. * impunit.adb (Non_Imp_File_Names_95): Add g-gfmafu. * sem_ch7.adb (Has_Referencer): Do not set In_Nested_Instance for instances of generic packages that do not have a body. * libgnat/a-nalofl__simd.ads: New SIMD-enabled version. * libgnat/a-nuaufl__simd.ads: Likewise. * libgnat/g-gfmafu.ads: New package renaming unit.
2022-05-18[Ada] New port arm-qnxDoug Rupp1-8/+15
The QNX system specs for ARM and AARCH64 are identical. It makes more sense to have it named for the base architecture. gcc/ada/ * Makefile.rtl: Rename system-qnx-aarch64.ads to system-qnx-arm.ads. (AARCH64 QNX section): Modify to handle both arm and arch64. * tracebak.c (__QNX__): Add new __ARMEL__ section. * sigtramp-arm-qnx.c: New file. * libgnat/system-qnx-aarch64.ads: Renamed to ... * libgnat/system-qnx-arm.ads: this.
2022-05-17[Ada] Generic binary search implementationDmitriy Anisimkov1-0/+1
Allows binary search in sorted anonymous array (or array-like container). gcc/ada/ * libgnat/g-binsea.ads, libgnat/g-binsea.adb (GNAT.Binary_Search): New package. * Makefile.rtl (GNATRTL_NONTASKING_OBJS): New item in list. * doc/gnat_rm/the_gnat_library.rst (GNAT.Binary_Search): New package record. * gnat_rm.texi: Regenerate.
2022-05-16[Ada] Map gnatlib-shared to gnatlib-shared-dual for aarch64-vx7r2Olivier Hainque1-1/+1
This is an incremental change towards supporting shared libraries for VxWorks on aarch64. The aarch64-vx7r2 compiler supports compilation with -fpic/PIC. This change adds aarch64 to the list of CPUs for which GNATLIB_SHARED maps to gnatlib-shared-dual for vxworks7r2, so "make gnatlib-shared" actually builds a shared lib. While other adjustments will be needed to get the runtime tests to pass, this one is a necessary step and doesn't impair the rest. gcc/ada/ * Makefile.rtl: Add aarch64 to the list of CPUs for which GNATLIB_SHARED maps to gnatlib-shared-dual for vxworks7r2.
2022-05-13[Ada] Remove dependency on tampering checks and controlled types for formalYannick Moy1-0/+2
Formal hashed sets and maps are now using a different type of hash table that does not require controlled types. This is possible because formal containers do not rely on tampering checks, as cursors do not hold a pointer to a single matching container, but are logical indexes that can be used with multiple containers. For simplicity of the package organisation, and symmetry with other versions of containers, add a formal version of hashed types in the shared Ada.Containers.Hash_Tables unit. This unit should be specialized to only include the formal version of hash tables for runtimes that do not support controlled types (so that the dependency on Ada.Containers.Helpers can be removed). The new versions of units for generic keys and operations are modified versions of the units for bounded containers, with all tampering checks removed (they were no-op in formal containers). A declaration of constant Checks is added at the start of the body, as these units cannot use the version in Ada.Containers.Helpers. gcc/ada/ * Makefile.rtl: Add new files. * libgnat/a-cfhama.adb: Use formal version of hash tables. * libgnat/a-cfhama.ads: Same. * libgnat/a-cfhase.adb: Same. * libgnat/a-cfhase.ads: Same. * libgnat/a-chtgfk.adb: New unit for formal containers, modified version of Generic_Bounded_Keys. * libgnat/a-chtgfk.ads: Same. * libgnat/a-chtgfo.adb: New unit for formal containers, modified version of Generic_Bounded_Operations. * libgnat/a-chtgfo.ads: Same. * libgnat/a-cohata.ads (Generic_Formal_Hash_Table_Types): Third version of the type for hash tables, equivalent to the bounded version without tampering checks.
2022-02-13[Ada] PR ada/98724: Alpha/Linux/libada: Use wraplf for Aux_Long_Long_FloatMaciej W. Rozycki1-0/+1
Use the Long Long Float wrapper in terms of Long Float for Alpha/Linux targets as well, fixing gnatlib compilation errors: a-nallfl.ads:48:13: warning: intrinsic binding type mismatch on result [enabledby default] a-nallfl.ads:48:13: warning: intrinsic binding type mismatch on parameter 1 [enabled by default] a-nallfl.ads:48:13: warning: profile of "Sin" doesn't match the builtin it binds [enabled by default] etc. with the `alpha-linux-gnu' target. gcc/ada/ PR ada/98724 PR ada/97504 * Makefile.rtl (LIBGNAT_TARGET_PAIRS) <alpha*-*-linux*>: Use wraplf version of Aux_Long_Long_Float.
2022-01-19[Ada] Compile s-mmap and 128bit on x86_64-linux-gnux32H.J. Lu1-0/+5
PR ada/103538 * Makefile.rtl (LIBGNAT_TARGET_PAIRS): Add $(TRASYM_DWARF_UNIX_PAIRS), s-tsmona.adb<libgnat/s-tsmona__linux.adb, $(GNATRTL_128BIT_PAIRS). (EXTRA_GNATRTL_NONTASKING_OBJS): Add $(TRASYM_DWARF_UNIX_OBJS) and $(GNATRTL_128BIT_OBJS).
2022-01-18Revert Ada .cc renaming renaming.Martin Liska1-4/+4
gcc/ada/ChangeLog: * Make-generated.in: Revert renaming changes. * Makefile.rtl: Likewise. * adadecode.cc: Moved to... * adadecode.c: ...here. * affinity.cc: Moved to... * affinity.c: ...here. * argv-lynxos178-raven-cert.cc: Moved to... * argv-lynxos178-raven-cert.c: ...here. * argv.cc: Moved to... * argv.c: ...here. * aux-io.cc: Moved to... * aux-io.c: ...here. * cio.cc: Moved to... * cio.c: ...here. * cstreams.cc: Moved to... * cstreams.c: ...here. * env.cc: Moved to... * env.c: ...here. * exit.cc: Moved to... * exit.c: ...here. * expect.cc: Moved to... * expect.c: ...here. * final.cc: Moved to... * final.c: ...here. * gcc-interface/Makefile.in: * init.cc: Moved to... * init.c: ...here. * initialize.cc: Moved to... * initialize.c: ...here. * libgnarl/thread.cc: Moved to... * libgnarl/thread.c: ...here. * link.cc: Moved to... * link.c: ...here. * locales.cc: Moved to... * locales.c: ...here. * mkdir.cc: Moved to... * mkdir.c: ...here. * raise.cc: Moved to... * raise.c: ...here. * rtfinal.cc: Moved to... * rtfinal.c: ...here. * rtinit.cc: Moved to... * rtinit.c: ...here. * s-oscons-tmplt.c (CND): Revert renaming changes. * seh_init.cc: Moved to... * seh_init.c: ...here. * sigtramp-armdroid.cc: Moved to... * sigtramp-armdroid.c: ...here. * sigtramp-ios.cc: Moved to... * sigtramp-ios.c: ...here. * sigtramp-qnx.cc: Moved to... * sigtramp-qnx.c: ...here. * sigtramp-vxworks.cc: Moved to... * sigtramp-vxworks.c: ...here. * socket.cc: Moved to... * socket.c: ...here. * tracebak.cc: Moved to... * tracebak.c: ...here. * version.cc: Moved to... * version.c: ...here. * vx_stack_info.cc: Moved to... * vx_stack_info.c: ...here.
2022-01-17Manual changes for .cc renaming.Martin Liska1-4/+4
gcc/ChangeLog: * Makefile.in: Rename .c names to .cc. * config.gcc: Likewise. * configure: Regenerate. Likewise. * configure.ac: Likewise. * gengtype.cc (set_gc_used): Likewise. (source_dot_c_frul): Likewise. (source_dot_cc_frul): Likewise. (struct file_rule_st): Likewise. (close_output_files): Likewise. * config/avr/t-avr: Use CXXFLAGS_* and CXX_FOR_BUILD. gcc/ada/ChangeLog: * Makefile.rtl: Rename .c names to .cc. * gcc-interface/Make-lang.in: Likewise. * gcc-interface/Makefile.in: Likewise. libgcc/ChangeLog: * libgcov-driver.c: Rename .c names to .cc. libcpp/ChangeLog: * Makefile.in: Rename .c names to .cc.
2022-01-11[Ada] Use atomic builtins for atomic counters on x86 (32bit)Piotr Trojanek1-1/+1
gcc/ada/ * Makefile.rtl (X86_TARGET_PAIRS): Use __builtin variant of System.Atomic_Counters. * libgnat/s-atocou__x86.adb: Remove.
2022-01-05[Ada] Remove obsolete s-sopco* and s-strops unitsMarc Poulhiès1-2/+1
gcc/ada/ * libgnat/s-sopco3.ads, libgnat/s-sopco3.adb: Remove. * libgnat/s-sopco4.ads, libgnat/s-sopco4.adb: Remove. * libgnat/s-sopco5.ads, libgnat/s-sopco5.adb: Remove. * libgnat/s-strops.ads, libgnat/s-strops.adb: Remove. * Makefile.rtl (ADA_EXCLUDE_SRCS): Remove occurences of removed units. * gcc-interface/Make-lang.in (ada/sdefault.o): Remove dependencies on removed units. (GNATBIND_OBJS): Remove occurences of removed units.
2021-12-02[Ada] vx7r2cert/light-tasking-rtp: undefined refs on ppc/ppc64Doug Rupp1-1/+1
gcc/ada/ * vxworks7-cert-rtp-link__ppcXX.spec: New file. * Makefile.rtl: Use it.
2021-12-01[Ada] Sort list of Ada runtime units in Makefile.rtlPiotr Trojanek1-24/+24
gcc/ada/ * Makefile.rtl (GNATRTL_TASKING_OBJS): Sort. (GNATRTL_NONTASKING_OBJS): Sort.
2021-12-01[Ada] Whitespace cleanup in Makefile.rtl dependency rulesPiotr Trojanek1-9/+9
gcc/ada/ * Makefile.rtl: Remove extra whitespace in special compilation rules.
2021-11-10[Ada] Create explicit ghost mirror unit for big integersYannick Moy1-0/+1
gcc/ada/ * Makefile.rtl: Add unit. * libgnat/a-nbnbin__ghost.adb: Move... * libgnat/a-nbnbig.adb: ... here. Mark ghost as ignored. * libgnat/a-nbnbin__ghost.ads: Move... * libgnat/a-nbnbig.ads: ... here. Add comment for purpose of this unit. Mark ghost as ignored. * libgnat/s-widthu.adb: Use new unit. * sem_aux.adb (First_Subtype): Adapt to the case of a ghost type whose freeze node is rewritten to a null statement.
2021-11-09[Ada] RTEMS: use atomic primitive packages on aarch64Patrick Bernardi1-0/+7
gcc/ada/ * Makefile.rtl: Add ATOMICS_TARGET_PAIRS and ATOMICS_BUILTINS_TARGET_PAIRS to LIBGNAT_TARGET_PAIRS for aarch64-rtems.
2021-11-09[Ada] Use atomics in runtime on ARM and Aarch64 VxWorksPiotr Trojanek1-1/+3
gcc/ada/ * Makefile.rtl (ARM and Aarch64 VxWorks): Use atomic variants of runtime units. * libgnat/a-strunb__shared.ads: Mention AARCH64 and ARM as supported. * libgnat/s-atocou.ads: Likewise.
2021-10-20[Ada] Get rid of Frontend_Exceptions refsDoug Rupp1-6/+0
gcc/ada/ * Makefile.rtl: Remove references to system-vxworks-ppc.ads and system-vxworks-x86.ads. * libgnat/system-vxworks-ppc.ads: Remove. * libgnat/system-vxworks-ppc-ravenscar.ads: Likewise. * libgnat/system-vxworks-x86.ads: Likewise.
2021-10-11[Ada] RTEMS: use hardware interrupts instead of signals for interrupt handlingPatrick Bernardi1-6/+7
gcc/ada/ * Makefile.rtl (VxWorks): Rename s-inmaop__vxworks.adb to s-inmaop__hwint.adb. (RTEMS): Use s-inmaop__hwint.adb, s-intman__rtems.adb/s, s-taprop__rtems.adb. * libgnarl/a-intnam__rtems.ads: Remove signals definitions and replace with Hardware_Interrupts. * libgnarl/s-inmaop__vxworks.adb: Rename as... * libgnarl/s-inmaop__hwint.adb: ... this. * libgnarl/s-interr__hwint.adb: Remove unnecessary comments. * libgnarl/s-intman__rtems.ads, libgnarl/s-intman__rtems.adb: New files. * libgnarl/s-osinte__rtems.adb: Add RTEMS API bindings. (Binary_Semaphore_Create, Binary_Semaphore_Delete, Binary_Semaphore_Obtain, Binary_Semaphore_Release, Binary_Semaphore_Flush, Interrupt_Connect, Interrupt_Number_To_Vector): New functions. * libgnarl/s-osinte__rtems.ads (Num_HW_Interrupts, Signal): Removed. (NSIG, Interrupt_Range): New. (Binary_Semaphore_Create, Binary_Semaphore_Delete, Binary_Semaphore_Obtain, Binary_Semaphore_Release, Binary_Semaphore_Flush, Interrupt_Connect, Interrupt_Number_To_Vector): Remove Import pragma. * libgnarl/s-taprop__rtems.adb: New file.