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: generate dynamic library in the correct location


Hi,

The patchfile below fixes the bug 34358

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34358


-----------------------------------------------------------------
2007-12-06  Bechir Zalila  <bechir.zalila@gmail.com>

    gcc/ada/
	PR ada/34358
	* mlib-tgt-darwin.adb: give gcc the absolute path of the output file
	when creating a dynamic library. This ensures the library is created
	in the appropriate directory.

=============================================================================
Index: ada/mlib-tgt-darwin.adb
===================================================================
--- ada/mlib-tgt-darwin.adb	(revision 130643)
+++ ada/mlib-tgt-darwin.adb	(working copy)
@@ -106,14 +106,14 @@
    begin
       if Opt.Verbose_Mode then
          Write_Str ("building relocatable shared library ");
-         Write_Line (Lib_File);
+         Write_Line (Lib_Path);
       end if;

       --  If specified, add automatic elaboration/finalization

       if Lib_Version = "" then
          Utl.Gcc
-           (Output_File => Lib_File,
+           (Output_File => Lib_Path,
             Objects     => Ofiles,
             Options     => Options & Shared_Options,
             Driver_Name => Driver_Name,
@@ -131,7 +131,7 @@
                   Options     => Options & Shared_Options,
                   Driver_Name => Driver_Name,
                   Options_2   => No_Argument_List);
-               Symbolic_Link_Needed := Lib_Version /= Lib_File;
+               Symbolic_Link_Needed := Lib_Version /= Lib_Path;

             else
                Utl.Gcc
@@ -141,7 +141,7 @@
                   Driver_Name => Driver_Name,
                   Options_2   => No_Argument_List);
                Symbolic_Link_Needed :=
-                 Lib_Dir & Directory_Separator & Lib_Version /= Lib_File;
+                 Lib_Dir & Directory_Separator & Lib_Version /= Lib_Path;
             end if;

             if Symbolic_Link_Needed then


-- 
Bechir


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