aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gnatbind.adb
diff options
context:
space:
mode:
authorPatrick Bernardi <bernardi@adacore.com>2019-07-11 08:03:04 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-07-11 08:03:04 +0000
commitbe04e8eda375765f5336316085f0c4bd4ef468d5 (patch)
tree87e4c592f29537b2b43154e1c074b8e4cac0c289 /gcc/ada/gnatbind.adb
parent49d7a324591251967dd2ad759e903e393795310e (diff)
downloadgcc-be04e8eda375765f5336316085f0c4bd4ef468d5.zip
gcc-be04e8eda375765f5336316085f0c4bd4ef468d5.tar.gz
gcc-be04e8eda375765f5336316085f0c4bd4ef468d5.tar.bz2
[Ada] Minimal binder
The new minimal binder option ("-minimal") suppresses the generation of binder objects that are not strictly required for program operation. This option is suitable for space constrained applications and comes with the restriction that programs can no longer be debugged using GDB. 2019-07-11 Patrick Bernardi <bernardi@adacore.com> gcc/ada/ * bindgen.adb (Gen_Main): Do not generate a reference to Ada_Main_Program_Name when the Minimal_Binder flag is set. (Gen_Output_File_Ada): Do not output GNAT_Version and Ada_Main_Program_Name info if Minimal_Binder flag is set. * bindusg.adb: Add documentation for new -minimal switch. * gnatbind.adb (Scan_Bind_Arg): Scan -minimal switch. * opt.ads: Add new global flag Minimal_Binder to indicate if the binder should not produce global variables. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Update documentation with new binder -minimal switch. * gnat_ugn.texi: Regenerate. From-SVN: r273401
Diffstat (limited to 'gcc/ada/gnatbind.adb')
-rw-r--r--gcc/ada/gnatbind.adb11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ada/gnatbind.adb b/gcc/ada/gnatbind.adb
index 40c85b9..a3b6a7e 100644
--- a/gcc/ada/gnatbind.adb
+++ b/gcc/ada/gnatbind.adb
@@ -474,6 +474,17 @@ procedure Gnatbind is
Mapping_File := new String'(Argv (4 .. Argv'Last));
+ -- -minimal
+
+ elsif Argv (2 .. Argv'Last) = "minimal" then
+ if not Is_Cross_Compiler then
+ Write_Line
+ ("gnatbind: -minimal not expected to be used on native " &
+ "platforms");
+ end if;
+
+ Opt.Minimal_Binder := True;
+
-- -Mname
elsif Argv'Length >= 3 and then Argv (2) = 'M' then