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
|
Description: handle ADAFLAGS CFLAGS CPPFLAGS
Author: Nicolas Boulenguez <nicolas@debian.org>
Forwarded: no
--- a/gnatcoll.gpr
+++ b/gnatcoll.gpr
@@ -95,6 +95,10 @@
case Library_Type is
when "relocatable" =>
for Library_Options use Extra_Libs;
+
+ -- Put user options in front, for options like --as-needed.
+ for Leading_Library_Options use External_As_List ("LDFLAGS", " ");
+
when others =>
null;
end case;
@@ -116,6 +120,13 @@
for Switches ("gnatcoll_support.c") use
Compiler'Switches ("C") & Extra_Switches;
+ -- Give user flags the last word.
+ for Switches ("Ada") use Compiler'Switches ("Ada")
+ & External_As_List ("ADAFLAGS", " ");
+ for Switches ("C") use Compiler'Switches ("C")
+ & External_As_List ("CFLAGS", " ")
+ & External_As_List ("CPPFLAGS", " ");
+
end Compiler;
package Binder is
|