[Ada] By default, library projects are not supported

Arnaud Charlet charlet@adacore.com
Fri Oct 19 10:10:00 GMT 2007


Tested on i686-linux, committed on trunk.

When there is no platform specific body for MLib.Tgt.Specific, it means
that library projects are not supported. But, the default in MLib.Tgt
is that static and shared libraries are supported. This patch ensures
that the default is correct.
The test for this is to build a library project on a platform with no
specific body for MLib.Tgt.Specific. This should result in a message
indicating that libraries are not supported on the platform.

2007-10-15  Vincent Celier  <celier@adacore.com>

	* mlib-tgt-specific.adb (Support_For_Libraries): New function,
	returning None, used when there is no platform specific body for
	MLib.Tgt.Specific.

-------------- next part --------------
Index: mlib-tgt-specific.adb
===================================================================
--- mlib-tgt-specific.adb	(revision 129312)
+++ mlib-tgt-specific.adb	(working copy)
@@ -24,7 +24,24 @@
 --                                                                          --
 ------------------------------------------------------------------------------
 
---  Default empty version
+--  Default version
 
 package body MLib.Tgt.Specific is
+
+   --  By default, libraries are not supported at all
+
+   function Support_For_Libraries return Library_Support;
+   --  Function indicating if libraries are supported
+
+   ---------------------------
+   -- Support_For_Libraries --
+   ---------------------------
+
+   function Support_For_Libraries return Library_Support is
+   begin
+      return None;
+   end Support_For_Libraries;
+
+begin
+   Support_For_Libraries_Ptr := Support_For_Libraries'Access;
 end MLib.Tgt.Specific;


More information about the Gcc-patches mailing list