[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#881938: marked as done (gnatmake should call gcc/g++ with system_type prefix)



Your message dated Sun, 10 May 2020 23:20:43 +0200
with message-id <20200510212043.GA29357@nicolasthinkpad>
and subject line close 881938
has caused the Debian Bug report #881938,
regarding gnatmake should call gcc/g++ with system_type prefix
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
881938: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881938
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: src:gcc-7
Version: 7.2.0-16

gnatlink/gnatmake etc programs may call gcc/g++ internally,
while they just call them by the name:
     gcc-VERSION
     g++-VERSION

which will cause problem for cross toolchains.

-- 
YunQiang Su
diff --git a/debian/patches/ada-gcc-name.diff b/debian/patches/ada-gcc-name.diff
index ef6c223..970d3bc 100644
--- a/debian/patches/ada-gcc-name.diff
+++ b/debian/patches/ada-gcc-name.diff
@@ -10,29 +10,39 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
 
 --- a/src/gcc/ada/gnatlink.adb
 +++ b/src/gcc/ada/gnatlink.adb
-@@ -136,7 +136,8 @@
+@@ -33,6 +33,7 @@ with Namet;    use Namet;
+ with Opt;
+ with Osint;    use Osint;
+ with Output;   use Output;
++with Sdefault;
+ with Snames;
+ with Switch;   use Switch;
+ with System;   use System;
+@@ -136,7 +137,9 @@ procedure Gnatlink is
     --  This table collects the arguments to be passed to compile the binder
     --  generated file.
  
 -   Gcc : String_Access := Program_Name ("gcc", "gnatlink");
 +   Gcc : String_Access
-+     := Program_Name ("gcc-" & Gnatvsn.Library_Version, "gnatlink");
++     := Program_Name (Sdefault.Target_Name.all & "-gcc-" &
++                        Gnatvsn.Library_Version, "gnatlink");
  
     Read_Mode : constant String := "r" & ASCII.NUL;
  
-@@ -1414,7 +1415,8 @@
+@@ -1414,7 +1417,9 @@ procedure Gnatlink is
        end if;
  
        Write_Line ("  --GCC=comp Use comp as the compiler");
 -      Write_Line ("  --LINK=nam Use 'nam' for the linking rather than 'gcc'");
-+      Write_Line ("  --LINK=nam Use 'nam' for the linking rather than 'gcc-"
++      Write_Line ("  --LINK=nam Use 'nam' for the linking rather than '"
++        & Sdefault.Target_Name.all & "-gcc-"
 +        & Gnatvsn.Library_Version & "'");
        Write_Eol;
        Write_Line ("  [non-Ada-objects]  list of non Ada object files");
        Write_Line ("  [linker-options]   other options for the linker");
 --- a/src/gcc/ada/make.adb
 +++ b/src/gcc/ada/make.adb
-@@ -670,9 +670,12 @@
+@@ -670,9 +670,15 @@ package body Make is
     -- Compiler, Binder & Linker Data and Subprograms --
     ----------------------------------------------------
  
@@ -40,34 +50,38 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
 -   Gnatbind : String_Access := Program_Name ("gnatbind", "gnatmake");
 -   Gnatlink : String_Access := Program_Name ("gnatlink", "gnatmake");
 +   Gcc      : String_Access := Program_Name
-+     ("gcc-" & Gnatvsn.Library_Version, "gnatmake");
++     (Sdefault.Target_Name.all & "-gcc-" &
++        Gnatvsn.Library_Version, "gnatmake");
 +   Gnatbind : String_Access := Program_Name
-+     ("gnatbind-" & Gnatvsn.Library_Version, "gnatmake");
++     (Sdefault.Target_Name.all & "-gnatbind-" &
++        Gnatvsn.Library_Version, "gnatmake");
 +   Gnatlink : String_Access := Program_Name
-+     ("gnatlink-" & Gnatvsn.Library_Version, "gnatmake");
++     (Sdefault.Target_Name.all & "-gnatlink-" &
++        Gnatvsn.Library_Version, "gnatmake");
     --  Default compiler, binder, linker programs
  
     Saved_Gcc      : String_Access := null;
 --- a/src/gcc/ada/mdll-utl.adb
 +++ b/src/gcc/ada/mdll-utl.adb
-@@ -29,6 +29,7 @@
+@@ -29,6 +29,8 @@ with Ada.Text_IO;
  with Ada.Exceptions;
  
  with GNAT.Directory_Operations;
 +with Gnatvsn;
++with Sdefault;
  with Osint;
  
  package body MDLL.Utl is
-@@ -39,7 +40,7 @@
+@@ -39,7 +41,7 @@ package body MDLL.Utl is
     Dlltool_Name  : constant String := "dlltool";
     Dlltool_Exec  : OS_Lib.String_Access;
  
 -   Gcc_Name      : constant String := "gcc";
-+   Gcc_Name      : constant String := "gcc-" & Gnatvsn.Library_Version;
++   Gcc_Name      : constant String := Sdefault.Target_Name.all & "-gcc-" & Gnatvsn.Library_Version;
     Gcc_Exec      : OS_Lib.String_Access;
  
     Gnatbind_Name : constant String := "gnatbind";
-@@ -212,7 +213,7 @@
+@@ -212,7 +214,7 @@ package body MDLL.Utl is
           end;
        end if;
  
@@ -78,21 +92,23 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
  
 --- a/src/gcc/ada/mlib-utl.adb
 +++ b/src/gcc/ada/mlib-utl.adb
-@@ -23,6 +23,7 @@
+@@ -23,6 +23,8 @@
  --                                                                          --
  ------------------------------------------------------------------------------
  
 +with Gnatvsn;
++with Sdefault;
  with MLib.Fil; use MLib.Fil;
  with MLib.Tgt; use MLib.Tgt;
  with Opt;
-@@ -446,7 +447,8 @@
+@@ -446,7 +448,9 @@ package body MLib.Utl is
        if Driver_Name = No_Name then
           if Gcc_Exec = null then
              if Gcc_Name = null then
 -               Gcc_Name := Osint.Program_Name ("gcc", "gnatmake");
 +               Gcc_Name := Osint.Program_Name
-+                 ("gcc-" & Gnatvsn.Library_Version, "gnatmake");
++                 (Sdefault.Target_Name.all & "-gcc-" &
++                    Gnatvsn.Library_Version, "gnatmake");
              end if;
  
              Gcc_Exec := Locate_Exec_On_Path (Gcc_Name.all);
@@ -106,12 +122,13 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
  with Makeutl;  use Makeutl;
  with Opt;
  with Output;
-@@ -115,7 +116,7 @@
+@@ -115,7 +116,8 @@ package body Prj.Makr is
  
     procedure Dup2 (Old_Fd, New_Fd : File_Descriptor);
  
 -   Gcc      : constant String := "gcc";
-+   Gcc      : constant String := "gcc-" & Gnatvsn.Library_Version;
++   Gcc      : constant String := Sdefault.Target_Name.all
++             & "-gcc-" & Gnatvsn.Library_Version;
     Gcc_Path : String_Access := null;
  
     Non_Empty_Node : constant Project_Node_Id := 1;

--- End Message ---
--- Begin Message ---
Hello.
As far as I know, this issue has been fixed for a while, and last
message got no answer.
Feel free to reopen if I am missing something.

--- End Message ---

Reply to: