File: compilation_options.diff

package info (click to toggle)
libgnatcoll-bindings 18-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 980 kB
  • sloc: ada: 6,581; ansic: 722; python: 687; makefile: 48; sh: 46
file content (217 lines) | stat: -rw-r--r-- 8,253 bytes parent folder | download
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
Description: handle ADAFLAGS CFLAGS CPPFLAGS LDFLAGS
Forwarded: no
Author: Nicolas Boulenguez <nicolas@debian.org>

--- a/gmp/gnatcoll_gmp.gpr
+++ b/gmp/gnatcoll_gmp.gpr
@@ -34,6 +34,11 @@
    type Library_Type_Type is ("relocatable", "static", "static-pic");
    Library_Type : Library_Type_Type := External ("LIBRARY_TYPE");
 
+   Adaflags := External_As_List ("ADAFLAGS", " ");
+   Cflags   := External_As_List ("CFLAGS", " ");
+   Cppflags := External_As_List ("CPPFLAGS", " ");
+   Ldflags  := External_As_List ("LDFLAGS", " ");
+
    for Source_Dirs     use (".");
    for Library_Kind    use Library_Type;
    for Object_Dir
@@ -48,6 +53,7 @@
       when "relocatable" =>
          for Library_Version use "lib" & Name & Gnatcoll.So_Ext & "." & Version;
          for Library_Options use ("-lgmp");
+         for Leading_Library_Options use Ldflags;
       when others =>
          null;
    end case;
@@ -57,13 +63,17 @@
          when "DEBUG" =>
             for Switches ("Ada") use
               ("-g", "-O0", "-gnata", "-gnatVa", "-gnatQ", "-gnaty", "-gnateE",
-               "-gnatwaCJe", "-fstack-check");
-            for Switches ("C") use ("-g", "-Wunreachable-code");
+               "-gnatwaCJe", "-fstack-check")
+              & Adaflags;
+            for Switches ("C") use ("-g", "-Wunreachable-code")
+              & Cflags & Cppflags;
 
          when "PROD" =>
             --  Do not use -gnatwe for production mode
-            for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ");
-            for Switches ("C") use ("-O2", "-Wunreachable-code");
+            for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ")
+              & Adaflags;
+            for Switches ("C") use ("-O2", "-Wunreachable-code")
+              & Cflags & Cppflags;
       end case;
 
    end Compiler;
--- a/iconv/gnatcoll_iconv.gpr
+++ b/iconv/gnatcoll_iconv.gpr
@@ -34,6 +34,11 @@
    type Library_Type_Type is ("relocatable", "static", "static-pic");
    Library_Type : Library_Type_Type := External ("LIBRARY_TYPE");
 
+   Adaflags := External_As_List ("ADAFLAGS", " ");
+   Cflags   := External_As_List ("CFLAGS", " ");
+   Cppflags := External_As_List ("CPPFLAGS", " ");
+   Ldflags  := External_As_List ("LDFLAGS", " ");
+
    for Source_Dirs     use (".");
    for Library_Kind    use Library_Type;
    for Object_Dir
@@ -50,6 +55,7 @@
       when "relocatable" =>
          for Library_Version use "lib" & Name & Gnatcoll.So_Ext & "." & Version;
          for Library_Options use (Iconv_Opt);
+         for Leading_Library_Options use Ldflags;
       when others =>
          null;
    end case;
@@ -59,13 +65,17 @@
          when "DEBUG" =>
             for Switches ("Ada") use
               ("-g", "-O0", "-gnata", "-gnatVa", "-gnatQ", "-gnaty", "-gnateE",
-               "-gnatwaCJe", "-fstack-check");
-            for Switches ("C") use ("-g", "-Wunreachable-code");
+               "-gnatwaCJe", "-fstack-check")
+              & Adaflags;
+            for Switches ("C") use ("-g", "-Wunreachable-code")
+              & Cflags & Cppflags;
 
          when "PROD" =>
             --  Do not use -gnatwe for production mode
-            for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ");
-            for Switches ("C") use ("-O2", "-Wunreachable-code");
+            for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ")
+              & Adaflags;
+            for Switches ("C") use ("-O2", "-Wunreachable-code")
+              & Cflags & Cppflags;
       end case;
 
    end Compiler;
--- a/python/gnatcoll_python.gpr
+++ b/python/gnatcoll_python.gpr
@@ -38,6 +38,11 @@
    Python_Libs := External_As_List ("GNATCOLL_PYTHON_LIBS", " ");
    Libpython_Kind := External("GNATCOLL_LIBPYTHON_KIND", "shared");
 
+   Adaflags := External_As_List ("ADAFLAGS", " ");
+   Cflags   := External_As_List ("CFLAGS", " ");
+   Cppflags := External_As_List ("CPPFLAGS", " ");
+   Ldflags  := External_As_List ("LDFLAGS", " ");
+
    for Source_Dirs     use (".");
    for Library_Kind    use Library_Type;
    for Object_Dir
@@ -51,6 +56,7 @@
    case Library_Type is
       when "relocatable" =>
          for Library_Version use "lib" & Name & Gnatcoll.So_Ext & "." & Version;
+         for Leading_Library_Options use Ldflags;
          case Libpython_Kind is
             when "shared" =>
                for Library_Options use Python_Libs;
@@ -66,15 +72,17 @@
          when "DEBUG" =>
             for Switches ("Ada") use
               ("-g", "-O0", "-gnata", "-gnatVa", "-gnatQ", "-gnaty", "-gnateE",
-               "-gnatwaCJe", "-fstack-check");
+               "-gnatwaCJe", "-fstack-check")
+              & Adaflags;
             for Switches ("C") use ("-g", "-Wunreachable-code")
-              & Python_CFLAGS;
+              & Python_CFLAGS & Cflags & Cppflags;
 
          when "PROD" =>
             --  Do not use -gnatwe for production mode
-            for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ");
+            for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ")
+              & Adaflags;
             for Switches ("C") use ("-O2", "-Wunreachable-code")
-              & Python_CFLAGS;
+              & Python_CFLAGS & Cflags & Cppflags;
       end case;
    end Compiler;
 
--- a/readline/gnatcoll_readline.gpr
+++ b/readline/gnatcoll_readline.gpr
@@ -34,6 +34,9 @@
    type Library_Type_Type is ("relocatable", "static", "static-pic");
    Library_Type : Library_Type_Type := External ("LIBRARY_TYPE");
 
+   Adaflags := External_As_List ("ADAFLAGS", " ");
+   Ldflags  := External_As_List ("LDFLAGS", " ");
+
    for Source_Dirs     use (".");
    for Library_Kind    use Library_Type;
    for Object_Dir
@@ -46,6 +49,7 @@
       when "relocatable" =>
          for Library_Version use "lib" & Name & Gnatcoll.So_Ext & "." & Version;
          for Library_Options use ("-lreadline");
+         for Leading_Library_Options use Ldflags;
       when others =>
          null;
    end case;
@@ -57,11 +61,13 @@
          when "DEBUG" =>
             for Switches ("Ada") use
               ("-g", "-O0", "-gnata", "-gnatVa", "-gnatQ", "-gnaty", "-gnateE",
-               "-gnatwaCJe", "-fstack-check");
+               "-gnatwaCJe", "-fstack-check")
+              & Adaflags;
 
          when "PROD" =>
             --  Do not use -gnatwe for production mode
-            for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ");
+            for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ")
+              & Adaflags;
       end case;
 
    end Compiler;
--- a/syslog/gnatcoll_syslog.gpr
+++ b/syslog/gnatcoll_syslog.gpr
@@ -34,6 +34,12 @@
    type Library_Type_Type is ("relocatable", "static", "static-pic");
    Library_Type : Library_Type_Type := External ("LIBRARY_TYPE");
 
+   Adaflags := External_As_List ("ADAFLAGS", " ");
+   Cflags   := External_As_List ("CFLAGS", " ");
+   Cppflags := External_As_List ("CPPFLAGS", " ");
+   Ldflags  := External_As_List ("LDFLAGS", " ");
+
+
    for Source_Dirs     use (".");
    for Library_Kind    use Library_Type;
    for Object_Dir
@@ -43,6 +49,7 @@
    for Library_Name    use Name;
    case Library_Type is
       when "relocatable" =>
+         for Leading_Library_Options use Ldflags;
          for Library_Version use "lib" & Name & Gnatcoll.So_Ext & "." & Version;
       when others =>
          null;
@@ -54,13 +61,17 @@
          when "DEBUG" =>
             for Switches ("Ada") use
               ("-g", "-O0", "-gnata", "-gnatVa", "-gnatQ", "-gnaty", "-gnateE",
-               "-gnatwaCJe", "-fstack-check");
-            for Switches ("C") use ("-g", "-Wunreachable-code");
+               "-gnatwaCJe", "-fstack-check")
+              & Adaflags;
+            for Switches ("C") use ("-g", "-Wunreachable-code")
+              & Cflags & Cppflags;
 
          when "PROD" =>
             --  Do not use -gnatwe for production mode
-            for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ");
-            for Switches ("C") use ("-O2", "-Wunreachable-code");
+            for Switches ("Ada") use ("-O2", "-gnatn", "-gnatwaCJ")
+              & Adaflags;
+            for Switches ("C") use ("-O2", "-Wunreachable-code")
+              & Cflags & Cppflags;
       end case;
 
    end Compiler;