[Ada] Fix PR ada/85007

Message ID 3637371.UXlWWhiiEy@polaris
State New
Headers show
Series
  • [Ada] Fix PR ada/85007
Related show

Commit Message

Eric Botcazou March 23, 2018, 11:21 p.m.
The switch has been broken for a long time so its removal is long overdue.

Tested on x86-64/Linux, applied on the mainline.


2018-03-23  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/85007
	* gnatlink.adb (Gnatlink): Remove handling of -b switch.
	* doc/gnat_ugn/building_executable_programs_with_gnat.rst (gnatlink):
	Remove documentation of -b switch.

-- 
Eric Botcazou

Patch

Index: doc/gnat_ugn/building_executable_programs_with_gnat.rst
===================================================================
--- doc/gnat_ugn/building_executable_programs_with_gnat.rst	(revision 258629)
+++ doc/gnat_ugn/building_executable_programs_with_gnat.rst	(working copy)
@@ -7270,14 +7270,6 @@  The following switches are available wit
   an executable called :file:`try`.
 
 
-.. index:: -b  (gnatlink)
-
-:switch:`-b {target}`
-  Compile your program to run on ``target``, which is the name of a
-  system configuration. You must have a GNAT cross-compiler built if
-  ``target`` is not the same as your host system.
-
-
 .. index:: -B  (gnatlink)
 
 :switch:`-B{dir}`
Index: gnatlink.adb
===================================================================
--- gnatlink.adb	(revision 258827)
+++ gnatlink.adb	(working copy)
@@ -425,36 +425,6 @@  procedure Gnatlink is
 
                elsif Arg'Length = 2 then
                   case Arg (2) is
-                     when 'b' =>
-                        Linker_Options.Increment_Last;
-                        Linker_Options.Table (Linker_Options.Last) :=
-                          new String'(Arg);
-
-                        Binder_Options.Increment_Last;
-                        Binder_Options.Table (Binder_Options.Last) :=
-                          Linker_Options.Table (Linker_Options.Last);
-
-                        Next_Arg := Next_Arg + 1;
-
-                        if Next_Arg > Argument_Count then
-                           Exit_With_Error ("Missing argument for -b");
-                        end if;
-
-                        Get_Machine_Name : declare
-                           Name_Arg : constant String_Access :=
-                                        new String'(Argument (Next_Arg));
-
-                        begin
-                           Linker_Options.Increment_Last;
-                           Linker_Options.Table (Linker_Options.Last) :=
-                             Name_Arg;
-
-                           Binder_Options.Increment_Last;
-                           Binder_Options.Table (Binder_Options.Last) :=
-                             Name_Arg;
-
-                        end Get_Machine_Name;
-
                      when 'f' =>
                         if Object_List_File_Supported then
                            Object_List_File_Required := True;
@@ -1430,7 +1400,6 @@  procedure Gnatlink is
       Write_Line ("  -v -v Very verbose mode");
       Write_Eol;
       Write_Line ("  -o nam     Use 'nam' as the name of the executable");
-      Write_Line ("  -b target  Compile the binder source to run on target");
       Write_Line ("  -Bdir      Load compiler executables from dir");
 
       if Is_Supported (Map_File) then