aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2008-05-27 11:09:47 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-05-27 11:09:47 +0200
commit32ffda3f89a89a9f22dc542948dbc2ce1effde1a (patch)
tree9bca88f06c0d447ce6af1ce14df64331d01b7582 /gcc
parent52268145efb918a22754b2729548ec5159b02e82 (diff)
downloadgcc-32ffda3f89a89a9f22dc542948dbc2ce1effde1a.zip
gcc-32ffda3f89a89a9f22dc542948dbc2ce1effde1a.tar.gz
gcc-32ffda3f89a89a9f22dc542948dbc2ce1effde1a.tar.bz2
2008-05-27 Vincent Celier <celier@adacore.com>
* prj-nmsc.adb: (Check_Library): Allow standard project to be extended as a static library project. (Get_Mains): Do not inherit attribute Main in an extending library project. From-SVN: r135986
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/prj-nmsc.adb18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb
index b04ce26..ed81d61 100644
--- a/gcc/ada/prj-nmsc.adb
+++ b/gcc/ada/prj-nmsc.adb
@@ -3851,13 +3851,15 @@ package body Prj.Nmsc is
Error_Msg_Name_2 := Proj_Data.Name;
if Extends then
- Error_Msg
- (Project, In_Tree,
- Continuation.all &
- "shared library project %% cannot extend " &
- "project %% that is not a library project",
- Data.Location);
- Continuation := Continuation_String'Access;
+ if Data.Library_Kind /= Static then
+ Error_Msg
+ (Project, In_Tree,
+ Continuation.all &
+ "shared library project %% cannot extend " &
+ "project %% that is not a library project",
+ Data.Location);
+ Continuation := Continuation_String'Access;
+ end if;
elsif Data.Library_Kind /= Static then
Error_Msg
@@ -6846,7 +6848,7 @@ package body Prj.Nmsc is
-- inherit the Mains from the project we are extending.
if Mains.Default then
- if Data.Extends /= No_Project then
+ if not Data.Library and then Data.Extends /= No_Project then
Data.Mains :=
In_Tree.Projects.Table (Data.Extends).Mains;
end if;