This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][Ada][4.1] Fix cross gnatmake building libraries in project mode


Tested on 4.1.1 prerelease using a Linux to mingw32 cross compiler.

I assume mdll-utl.adb needs a similar change, and it seems that the
problem is also present on mainline (by reading the source).

I'm not sure there isn't a better fix for all this, any idea about that
Arnaud?

Laurent

2006-05-27  Laurent GUERBY  <laurent@guerby.net>

        PR ada/27769
	mlib-utl.adb: Use Program_Name.

--- mlib-utl.adb.~1~	2005-11-15 15:06:45.000000000 +0100
+++ mlib-utl.adb	2006-05-27 18:57:22.000000000 +0200
@@ -38,7 +38,7 @@
 
    Initialized : Boolean := False;
 
-   Gcc_Name : constant String := "gcc";
+   Gcc_Name : constant String := Osint.Program_Name ("gcc").all;
    Gcc_Exec : OS_Lib.String_Access;
 
    Ar_Name    : OS_Lib.String_Access;
@@ -260,7 +260,7 @@
 
          --  ar
 
-         Ar_Name := new String'(Archive_Builder);
+         Ar_Name := Osint.Program_Name (Archive_Builder);
          Ar_Exec := OS_Lib.Locate_Exec_On_Path (Ar_Name.all);
 
          if Ar_Exec = null then
@@ -275,7 +275,7 @@
 
          --  ranlib
 
-         Ranlib_Name := new String'(Archive_Indexer);
+         Ranlib_Name := Osint.Program_Name (Archive_Indexer);
 
          if Ranlib_Name'Length > 0 then
             Ranlib_Exec := OS_Lib.Locate_Exec_On_Path (Ranlib_Name.all);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]