~angelsl/ubuntu/wily/gcc-5/mips-cross

« back to all changes in this revision

Viewing changes to debian/patches/ada-library-project-files-soname.diff

  • Committer: angelsl
  • Date: 2015-10-30 03:30:35 UTC
  • Revision ID: angelsl-20151030033035-rmug41zm8hyjgisg
Original import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: - in project files, use the exact Library_Version provided, if any, as
 
2
# DP:   the soname of libraries; do not strip minor version numbers
 
3
# DP:   (PR ada/40025).
 
4
 
 
5
Index: b/src/gcc/ada/mlib-tgt-specific-linux.adb
 
6
===================================================================
 
7
--- a/src/gcc/ada/mlib-tgt-specific-linux.adb
 
8
+++ b/src/gcc/ada/mlib-tgt-specific-linux.adb
 
9
@@ -50,6 +50,8 @@ package body MLib.Tgt.Specific is
 
10
 
 
11
    function Is_Archive_Ext (Ext : String) return Boolean;
 
12
 
 
13
+   function Library_Major_Minor_Id_Supported return Boolean;
 
14
+
 
15
    ---------------------------
 
16
    -- Build_Dynamic_Library --
 
17
    ---------------------------
 
18
@@ -142,7 +144,18 @@ package body MLib.Tgt.Specific is
 
19
       return Ext = ".a" or else Ext = ".so";
 
20
    end Is_Archive_Ext;
 
21
 
 
22
+   --------------------------------------
 
23
+   -- Library_Major_Minor_Id_Supported --
 
24
+   --------------------------------------
 
25
+
 
26
+   function Library_Major_Minor_Id_Supported return Boolean is
 
27
+   begin
 
28
+      return False;
 
29
+   end Library_Major_Minor_Id_Supported;
 
30
+
 
31
 begin
 
32
    Build_Dynamic_Library_Ptr := Build_Dynamic_Library'Access;
 
33
    Is_Archive_Ext_Ptr := Is_Archive_Ext'Access;
 
34
+   Library_Major_Minor_Id_Supported_Ptr :=
 
35
+                                Library_Major_Minor_Id_Supported'Access;
 
36
 end MLib.Tgt.Specific;
 
37
Index: b/src/gcc/ada/mlib.adb
 
38
===================================================================
 
39
--- a/src/gcc/ada/mlib.adb
 
40
+++ b/src/gcc/ada/mlib.adb
 
41
@@ -30,6 +30,7 @@ with System;
 
42
 with Opt;
 
43
 with Output; use Output;
 
44
 
 
45
+with MLib.Tgt;
 
46
 with MLib.Utl; use MLib.Utl;
 
47
 
 
48
 with Prj.Com;
 
49
@@ -393,7 +394,11 @@ package body MLib is
 
50
    -- Major_Id_Name --
 
51
    -------------------
 
52
 
 
53
-   function Major_Id_Name
 
54
+   function Major_Id_Name_If_Supported
 
55
+     (Lib_Filename : String;
 
56
+      Lib_Version  : String)
 
57
+      return String;
 
58
+   function Major_Id_Name_If_Supported
 
59
      (Lib_Filename : String;
 
60
       Lib_Version  : String)
 
61
       return String
 
62
@@ -447,6 +452,19 @@ package body MLib is
 
63
       else
 
64
          return "";
 
65
       end if;
 
66
+   end Major_Id_Name_If_Supported;
 
67
+
 
68
+   function Major_Id_Name
 
69
+     (Lib_Filename : String;
 
70
+      Lib_Version  : String)
 
71
+      return String
 
72
+   is
 
73
+   begin
 
74
+      if MLib.Tgt.Library_Major_Minor_Id_Supported then
 
75
+         return Major_Id_Name_If_Supported (Lib_Filename, Lib_Version);
 
76
+      else
 
77
+         return "";
 
78
+      end if;
 
79
    end Major_Id_Name;
 
80
 
 
81
    -------------------------------