summaryrefslogtreecommitdiff
path: root/gcc/ada/prj-nmsc.adb
diff options
context:
space:
mode:
authorbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-05 20:34:43 +0000
committerbosch <bosch@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-05 20:34:43 +0000
commit1999d6acc1fc13855a6018ddf65981237aa2e143 (patch)
treeac1e7c7b7f91b148230d4b11605690aa4a8dcce5 /gcc/ada/prj-nmsc.adb
parent72e0749873d1ff447d351bc995ce7504a316b83c (diff)
downloadgcc-1999d6acc1fc13855a6018ddf65981237aa2e143.tar.gz
* sem_ch12.adb (Instantiate_Package_Body): if instance is a compilation
unit, always replace instance node with new body, for ASIS use. * prj-nmsc.adb (Language_Independent_Check): Issue a warning if libraries are not supported and both attributes Library_Name and Library_Dir are specified. * prj-proc.adb (Expression): Set location of Result to location of first term. * Makefile.in: Add mlib.o, mlib-fil.o, mlib-tgt and mlib-utl to GNATLS. (prj-nmsc is now importing MLib.Tgt) * prj-proc.adb: Put the change indicated above that was forgotten. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47690 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/prj-nmsc.adb')
-rw-r--r--gcc/ada/prj-nmsc.adb84
1 files changed, 46 insertions, 38 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index 004541f6796..a1f7b03fa1a 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -34,6 +34,7 @@ with Errout; use Errout;
with GNAT.Case_Util; use GNAT.Case_Util;
with GNAT.Directory_Operations; use GNAT.Directory_Operations;
with GNAT.OS_Lib; use GNAT.OS_Lib;
+with MLib.Tgt;
with Namet; use Namet;
with Osint; use Osint;
with Output; use Output;
@@ -1948,61 +1949,68 @@ package body Prj.Nmsc is
Data.Library_Name /= No_Name;
if Data.Library then
- if Current_Verbosity = High then
- Write_Line ("This is a library project file");
- end if;
- pragma Assert (Lib_Version.Kind = Single);
+ if not MLib.Tgt.Libraries_Are_Supported then
+ Error_Msg ("?libraries are not supported on this platform",
+ Lib_Name.Location);
- if Lib_Version.Value = Empty_String then
+ else
if Current_Verbosity = High then
- Write_Line ("No library version specified");
+ Write_Line ("This is a library project file");
end if;
- else
- Stringt.String_To_Name_Buffer (Lib_Version.Value);
- Data.Lib_Internal_Name := Name_Find;
- end if;
+ pragma Assert (Lib_Version.Kind = Single);
- pragma Assert (The_Lib_Kind.Kind = Single);
+ if Lib_Version.Value = Empty_String then
+ if Current_Verbosity = High then
+ Write_Line ("No library version specified");
+ end if;
- if The_Lib_Kind.Value = Empty_String then
- if Current_Verbosity = High then
- Write_Line ("No library kind specified");
+ else
+ Stringt.String_To_Name_Buffer (Lib_Version.Value);
+ Data.Lib_Internal_Name := Name_Find;
end if;
- else
- Stringt.String_To_Name_Buffer (The_Lib_Kind.Value);
+ pragma Assert (The_Lib_Kind.Kind = Single);
- declare
- Kind_Name : constant String :=
- To_Lower (Name_Buffer (1 .. Name_Len));
+ if The_Lib_Kind.Value = Empty_String then
+ if Current_Verbosity = High then
+ Write_Line ("No library kind specified");
+ end if;
- OK : Boolean := True;
+ else
+ Stringt.String_To_Name_Buffer (The_Lib_Kind.Value);
- begin
+ declare
+ Kind_Name : constant String :=
+ To_Lower (Name_Buffer (1 .. Name_Len));
- if Kind_Name = "static" then
- Data.Library_Kind := Static;
+ OK : Boolean := True;
- elsif Kind_Name = "dynamic" then
- Data.Library_Kind := Dynamic;
+ begin
- elsif Kind_Name = "relocatable" then
- Data.Library_Kind := Relocatable;
+ if Kind_Name = "static" then
+ Data.Library_Kind := Static;
- else
- Error_Msg
- ("illegal value for Library_Kind",
- The_Lib_Kind.Location);
- OK := False;
- end if;
+ elsif Kind_Name = "dynamic" then
+ Data.Library_Kind := Dynamic;
- if Current_Verbosity = High and then OK then
- Write_Str ("Library kind = ");
- Write_Line (Kind_Name);
- end if;
- end;
+ elsif Kind_Name = "relocatable" then
+ Data.Library_Kind := Relocatable;
+
+ else
+ Error_Msg
+ ("illegal value for Library_Kind",
+ The_Lib_Kind.Location);
+ OK := False;
+ end if;
+
+ if Current_Verbosity = High and then OK then
+ Write_Str ("Library kind = ");
+ Write_Line (Kind_Name);
+ end if;
+ end;
+ end if;
end if;
end if;
end;