This file is indexed.

/usr/src/gcc-4.8/debian/patches/ada-default-project-path.diff is in gcc-4.8-source 4.8.5-4ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# DP: - Change the default search path for project files to the one specified
# DP:   by the Debian Policy for Ada: /usr/share/ada/adainclude.

Index: b/src/gcc/ada/Make-generated.in
===================================================================
--- a/src/gcc/ada/Make-generated.in
+++ b/src/gcc/ada/Make-generated.in
@@ -105,7 +105,7 @@
 	$(ECHO) "   S1 : constant String := \"$(ADA_INCLUDE_DIR)/\";" >>tmp-sdefault.adb
 	$(ECHO) "   S2 : constant String := \"$(ADA_RTL_OBJ_DIR)/\";" >>tmp-sdefault.adb
 	$(ECHO) "   S3 : constant String := \"$(target_noncanonical)/\";" >>tmp-sdefault.adb
-	$(ECHO) "   S4 : constant String := \"$(libsubdir)/\";" >>tmp-sdefault.adb
+	$(ECHO) "   S4 : constant String := \"/usr/share/ada/adainclude/\";" >>tmp-sdefault.adb
 	$(ECHO) "   function Include_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
 	$(ECHO) "   begin" >>tmp-sdefault.adb
 	$(ECHO) "      return Relocate_Path (S0, S1);" >>tmp-sdefault.adb
Index: b/src/gcc/ada/prj-env.adb
===================================================================
--- a/src/gcc/ada/prj-env.adb
+++ b/src/gcc/ada/prj-env.adb
@@ -25,7 +25,6 @@
 
 with Fmap;
 with Hostparm;
-with Makeutl;  use Makeutl;
 with Opt;
 with Osint;    use Osint;
 with Output;   use Output;
@@ -1889,6 +1888,7 @@
      (Self        : in out Project_Search_Path;
       Target_Name : String)
    is
+      pragma Unreferenced (Target_Name);
       Add_Default_Dir : Boolean := True;
       First           : Positive;
       Last            : Positive;
@@ -2023,59 +2023,8 @@
 
       --  Set the initial value of Current_Project_Path
 
-      if Add_Default_Dir then
-         declare
-            Prefix : String_Ptr;
-
-         begin
-            if Sdefault.Search_Dir_Prefix = null then
-
-               --  gprbuild case
-
-               Prefix := new String'(Executable_Prefix_Path);
-
-            else
-               Prefix := new String'(Sdefault.Search_Dir_Prefix.all
-                                     & ".." & Dir_Separator
-                                     & ".." & Dir_Separator
-                                     & ".." & Dir_Separator
-                                     & ".." & Dir_Separator);
-            end if;
-
-            if Prefix.all /= "" then
-               if Target_Name /= "" then
-
-                  --  $prefix/$target/lib/gnat
-
-                  Add_Str_To_Name_Buffer
-                    (Path_Separator & Prefix.all & Target_Name);
-
-                  --  Note: Target_Name has a trailing / when it comes from
-                  --  Sdefault.
-
-                  if Name_Buffer (Name_Len) /= '/' then
-                     Add_Char_To_Name_Buffer (Directory_Separator);
-                  end if;
-
-                  Add_Str_To_Name_Buffer
-                    ("lib" & Directory_Separator & "gnat");
-               end if;
-
-               --  $prefix/share/gpr
-
-               Add_Str_To_Name_Buffer
-                 (Path_Separator & Prefix.all &
-                  "share" & Directory_Separator & "gpr");
-
-               --  $prefix/lib/gnat
-
-               Add_Str_To_Name_Buffer
-                 (Path_Separator & Prefix.all &
-                  "lib" & Directory_Separator & "gnat");
-            end if;
-
-            Free (Prefix);
-         end;
+      if Add_Default_Dir and Sdefault.Search_Dir_Prefix /= null then
+         Add_Str_To_Name_Buffer (Path_Separator & Sdefault.Search_Dir_Prefix.all);
       end if;
 
       Self.Path := new String'(Name_Buffer (1 .. Name_Len));