~ubuntu-branches/debian/sid/gcc-4.8/sid

« back to all changes in this revision

Viewing changes to .svn/pristine/9d/9d2edfd7e121816849b6476b587dae90af371005.svn-base

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-12-19 19:48:34 UTC
  • Revision ID: package-import@ubuntu.com-20141219194834-4dz1q7rrn5pad823
Tags: 4.8.4-1
* GCC 4.8.4 release.
  - Fix PR target/61407 (darwin), PR middle-end/58624 (ice),
    PR sanitizer/64265 (wrong code).
* Require recent binutils to pass go test failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# DP: - Change the default search path for project files to the one specified
 
2
# DP:   by the Debian Policy for Ada: /usr/share/ada/adainclude.
 
3
 
 
4
--- a/src/gcc/ada/Make-generated.in
 
5
+++ b/src/gcc/ada/Make-generated.in
 
6
@@ -104,7 +104,7 @@
 
7
        $(ECHO) "   S1 : constant String := \"$(ADA_INCLUDE_DIR)/\";" >>tmp-sdefault.adb
 
8
        $(ECHO) "   S2 : constant String := \"$(ADA_RTL_OBJ_DIR)/\";" >>tmp-sdefault.adb
 
9
        $(ECHO) "   S3 : constant String := \"$(target)/\";" >>tmp-sdefault.adb
 
10
-       $(ECHO) "   S4 : constant String := \"$(libsubdir)/\";" >>tmp-sdefault.adb
 
11
+       $(ECHO) "   S4 : constant String := \"/usr/share/ada/adainclude/\";" >>tmp-sdefault.adb
 
12
        $(ECHO) "   function Include_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
 
13
        $(ECHO) "   begin" >>tmp-sdefault.adb
 
14
        $(ECHO) "      return Relocate_Path (S0, S1);" >>tmp-sdefault.adb
 
15
--- a/src/gcc/ada/prj-env.adb
 
16
+++ b/src/gcc/ada/prj-env.adb
 
17
@@ -1923,41 +1923,10 @@
 
18
 
 
19
       --  Set the initial value of Current_Project_Path
 
20
 
 
21
-      if Add_Default_Dir then
 
22
-         declare
 
23
-            Prefix : String_Ptr := Sdefault.Search_Dir_Prefix;
 
24
-
 
25
-         begin
 
26
-            if Prefix = null then
 
27
-               Prefix := new String'(Executable_Prefix_Path);
 
28
-
 
29
-               if Prefix.all /= "" then
 
30
-                  if Target_Name /= "" then
 
31
-                     Add_Str_To_Name_Buffer
 
32
-                       (Path_Separator & Prefix.all &
 
33
-                        "lib" & Directory_Separator & "gpr" &
 
34
-                        Directory_Separator & Target_Name);
 
35
-                  end if;
 
36
-
 
37
-                  Add_Str_To_Name_Buffer
 
38
-                    (Path_Separator & Prefix.all &
 
39
-                     "share" & Directory_Separator & "gpr");
 
40
-                  Add_Str_To_Name_Buffer
 
41
-                    (Path_Separator & Prefix.all &
 
42
-                     "lib" & Directory_Separator & "gnat");
 
43
-               end if;
 
44
-
 
45
-            else
 
46
-               Self.Path :=
 
47
-                 new String'(Name_Buffer (1 .. Name_Len) & Path_Separator &
 
48
-                             Prefix.all &
 
49
-                             ".." &  Directory_Separator &
 
50
-                             ".." & Directory_Separator &
 
51
-                             ".." & Directory_Separator & "gnat");
 
52
-            end if;
 
53
-
 
54
-            Free (Prefix);
 
55
-         end;
 
56
+      if Add_Default_Dir and Sdefault.Search_Dir_Prefix /= null then
 
57
+         Self.Path :=
 
58
+           new String'(Name_Buffer (1 .. Name_Len) & Path_Separator &
 
59
+                         Sdefault.Search_Dir_Prefix.all);
 
60
       end if;
 
61
 
 
62
       if Self.Path = null then
 
63
--- a/src/gcc/ada/gnatls.adb
 
64
+++ b/src/gcc/ada/gnatls.adb
 
65
@@ -1617,9 +1617,6 @@
 
66
       declare
 
67
          Project_Path : String_Access := Getenv (Gpr_Project_Path);
 
68
 
 
69
-         Lib : constant String :=
 
70
-                 Directory_Separator & "lib" & Directory_Separator;
 
71
-
 
72
          First : Natural;
 
73
          Last  : Natural;
 
74
 
 
75
@@ -1679,36 +1676,8 @@
 
76
          if Add_Default_Dir then
 
77
             Name_Len := 0;
 
78
             Add_Str_To_Name_Buffer (Sdefault.Search_Dir_Prefix.all);
 
79
-
 
80
-            --  On Windows, make sure that all directory separators are '\'
 
81
-
 
82
-            if Directory_Separator /= '/' then
 
83
-               for J in 1 .. Name_Len loop
 
84
-                  if Name_Buffer (J) = '/' then
 
85
-                     Name_Buffer (J) := Directory_Separator;
 
86
-                  end if;
 
87
-               end loop;
 
88
-            end if;
 
89
-
 
90
-            --  Find the sequence "/lib/"
 
91
-
 
92
-            while Name_Len >= Lib'Length
 
93
-              and then Name_Buffer (Name_Len - 4 .. Name_Len) /= Lib
 
94
-            loop
 
95
-               Name_Len := Name_Len - 1;
 
96
-            end loop;
 
97
-
 
98
-            --  If the sequence "/lib"/ was found, display the default
 
99
-            --  directory <prefix>/lib/gnat/.
 
100
-
 
101
-            if Name_Len >= 5 then
 
102
-               Name_Buffer (Name_Len + 1 .. Name_Len + 4) := "gnat";
 
103
-               Name_Buffer (Name_Len + 5) := Directory_Separator;
 
104
-               Name_Len := Name_Len + 5;
 
105
-               Write_Str ("   ");
 
106
-               Write_Line
 
107
-                 (To_Host_Dir_Spec (Name_Buffer (1 .. Name_Len), True).all);
 
108
-            end if;
 
109
+            Write_Str ("   ");
 
110
+            Write_Line (Name_Buffer (1 .. Name_Len));
 
111
          end if;
 
112
       end;
 
113