summaryrefslogtreecommitdiff
path: root/gcc/ada/make.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-24 09:08:00 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-24 09:08:00 +0000
commit09001c4f0b2d79bba0028262f4691bbcb3ac5403 (patch)
treed011bc4eeb28e350200fd1ba02a9af8507ecb5f0 /gcc/ada/make.adb
parentf3a8f217b72a70ee85544e924686d0b7bf8c5a53 (diff)
downloadgcc-09001c4f0b2d79bba0028262f4691bbcb3ac5403.tar.gz
2009-06-24 Eric Botcazou <ebotcazou@adacore.com>
* ttypes.ads: Minor editing. 2009-06-24 Robert Dewar <dewar@adacore.com> * exp_ch6.adb (Expand_Actuals): Use Is_Volatile, not Treat_As_Volatile in deciding to do call-by-copy code. 2009-06-24 Vincent Celier <celier@adacore.com> * make.adb (Gnatmake): To decide if an executable should be rebuilt, check if an externally built library file is more current than the executable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148897 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/make.adb')
-rw-r--r--gcc/ada/make.adb30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index 955e6185cad..27489cdf99f 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -5881,6 +5881,36 @@ package body Make is
Executable_Obsolete := Youngest_Obj_File /= No_File;
end if;
+ -- Check if any library file is more recent than the
+ -- executable: there may be an externally built library
+ -- file that has been modified.
+
+ if (not Executable_Obsolete)
+ and then Main_Project /= No_Project
+ then
+ declare
+ Proj1 : Project_List;
+ begin
+ Proj1 := Project_Tree.Projects;
+ while Proj1 /= null loop
+ if Proj1.Project.Library and then
+ Proj1.Project.Library_TS > Executable_Stamp
+ then
+ Executable_Obsolete := True;
+ Youngest_Obj_Stamp := Proj1.Project.Library_TS;
+ Name_Len := 0;
+ Add_Str_To_Name_Buffer ("library ");
+ Add_Str_To_Name_Buffer
+ (Get_Name_String (Proj1.Project.Library_Name));
+ Youngest_Obj_File := Name_Find;
+ exit;
+ end if;
+
+ Proj1 := Proj1.Next;
+ end loop;
+ end;
+ end if;
+
-- Return if the executable is up to date and otherwise
-- motivate the relink/rebind.