From: charlet Date: Fri, 24 Apr 2009 10:25:20 +0000 (+0000) Subject: 2009-04-24 Vincent Celier X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f812e64faa18b2f8b48477ac340da4d4a27a3e66;p=thirdparty%2Fgcc.git 2009-04-24 Vincent Celier * opt.ads (Unchecked_Shared_Lib_Imports): New Boolean flag. * prj-nmsc.adb (Check_Library): No error for imports by shared library projects, when --unchecked-shared-lib-imports is used. 2009-04-24 Robert Dewar * sem_ch7.adb: Minor reformatting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146693 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ce28114bb5d6..ec8255b6e718 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,14 @@ +2009-04-24 Vincent Celier + + * opt.ads (Unchecked_Shared_Lib_Imports): New Boolean flag. + + * prj-nmsc.adb (Check_Library): No error for imports by shared library + projects, when --unchecked-shared-lib-imports is used. + +2009-04-24 Robert Dewar + + * sem_ch7.adb: Minor reformatting + 2009-04-24 Tristan Gingold * s-osinte-darwin.adb, s-osinte-darwin.ads: lwp_self now returns the diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 9b8cf0b43095..229babfff00f 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -1166,6 +1166,12 @@ package Opt is -- the other hand, most such blowups will be caught cleanly and simply -- say compilation abandoned. This flag is set to True by -gnatq or -gnatQ. + Unchecked_Shared_Lib_Imports : Boolean := False; + -- GPRBUILD + -- Set to True when shared library projects are allowed to import projects + -- that are not shared library projects. Set by switch + -- --unchecked-shared-lib-imports. + Undefined_Symbols_Are_False : Boolean := False; -- GNAT, GNATPREP -- Set to True by switch -u of gnatprep or -u in the preprocessing data diff --git a/gcc/ada/prj-nmsc.adb b/gcc/ada/prj-nmsc.adb index 5098883dee9c..451c6783383f 100644 --- a/gcc/ada/prj-nmsc.adb +++ b/gcc/ada/prj-nmsc.adb @@ -3461,7 +3461,9 @@ package body Prj.Nmsc is Continuation := Continuation_String'Access; end if; - elsif Data.Library_Kind /= Static then + elsif (not Unchecked_Shared_Lib_Imports) + and then Data.Library_Kind /= Static + then Error_Msg (Project, In_Tree, Continuation.all & @@ -3485,17 +3487,18 @@ package body Prj.Nmsc is "shared library project %% cannot extend static " & "library project %%", Data.Location); + Continuation := Continuation_String'Access; - else + elsif not Unchecked_Shared_Lib_Imports then Error_Msg (Project, In_Tree, Continuation.all & "shared library project %% cannot import static " & "library project %%", Data.Location); + Continuation := Continuation_String'Access; end if; - Continuation := Continuation_String'Access; end if; end if; end Check_Library; diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb index 54d4a2990654..5cff94493994 100644 --- a/gcc/ada/sem_ch7.adb +++ b/gcc/ada/sem_ch7.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2008, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2009, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -2146,8 +2146,8 @@ package body Sem_Ch7 is then if not Has_Private_Declaration (Etype (Id)) then - -- We assume that the user did not intend a deferred - -- constant declaration, and the expression is just missing. + -- We assume that the user did not intend a deferred constant + -- declaration, and the expression is just missing. Error_Msg_N ("constant declaration requires initialization expression",