aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/argv.c
diff options
context:
space:
mode:
authorPatrick Bernardi <bernardi@adacore.com>2023-11-17 19:39:47 -0500
committerMarc Poulhiès <poulhies@adacore.com>2023-12-19 15:27:49 +0100
commit15626fb1168c1a9bbf8be730005b291cfb971673 (patch)
treeb3ad28d653992d91d97ce42555cc17210ad653f4 /gcc/ada/argv.c
parent346e4645eb13cab2be1c148ca4f01d048b26c397 (diff)
downloadgcc-15626fb1168c1a9bbf8be730005b291cfb971673.zip
gcc-15626fb1168c1a9bbf8be730005b291cfb971673.tar.gz
gcc-15626fb1168c1a9bbf8be730005b291cfb971673.tar.bz2
ada: Adapt Ada.Command_Line to work on configurable runtimes
The behaviour of the binder when handling command line arguments and exit codes is simplified so that references to the corresponding runtime symbols are always generated when the runtime is configured with command line argument and exit code support. This allows Ada.Command_Line to work with all runtimes, which was not the case previously. As a result of this change, configurable runtimes that do not include Ada.Command_Line and it support files, but are configured with Command_Line_Args and/or Exit_Status_Supported set to True will need to provide the symbols required by the binder, as these symbols will no longer be defined in the binder generated file. argv.c includes a small change to exclude adaint.h when compiling for a light runtime, since this header is not required. gcc/ada/ * argv.c: Do not include adaint.h if LIGHT_RUNTIME is defined. * bindgen.adb (Gen_Main): Simplify command line argument and exit handling by requiring the runtime to always provide the required symbols if command line argument and exit code is enabled. * targparm.ads: Update comments to reflect changes to gnatbind.
Diffstat (limited to 'gcc/ada/argv.c')
-rw-r--r--gcc/ada/argv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/argv.c b/gcc/ada/argv.c
index a773bef..17369a9 100644
--- a/gcc/ada/argv.c
+++ b/gcc/ada/argv.c
@@ -51,7 +51,9 @@
#include "system.h"
#endif
+#ifndef LIGHT_RUNTIME
#include "adaint.h"
+#endif
#ifdef __cplusplus
extern "C" {