summaryrefslogtreecommitdiffstats
path: root/gcc/ada/mlib-prj.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-08 06:53:22 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-08 06:53:22 +0000
commitf2f5f2a2441cc8a40fb64ee2c52dd922505de735 (patch)
tree1eef0098dcde418185cda77b2fa2c5d8e23cacbe /gcc/ada/mlib-prj.adb
parent909664b49ace783ba5d5ca04b766cb11d4dc32e8 (diff)
downloadppe42-gcc-f2f5f2a2441cc8a40fb64ee2c52dd922505de735.tar.gz
ppe42-gcc-f2f5f2a2441cc8a40fb64ee2c52dd922505de735.zip
2008-04-08 Vincent Celier <celier@adacore.com>
* mlib-prj.adb (Build_Library): Compare with ALI file name in canonical case to decide if ALI object file is included in library. (Build_Library): Never attempt to build a library if the project is externally built. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134041 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/mlib-prj.adb')
-rw-r--r--gcc/ada/mlib-prj.adb27
1 files changed, 17 insertions, 10 deletions
diff --git a/gcc/ada/mlib-prj.adb b/gcc/ada/mlib-prj.adb
index 88d33811b1d..193b54ca408 100644
--- a/gcc/ada/mlib-prj.adb
+++ b/gcc/ada/mlib-prj.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2007, AdaCore --
+-- Copyright (C) 2001-2008, AdaCore --
-- --
-- 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- --
@@ -829,6 +829,12 @@ package body MLib.Prj is
Com.Fail ("project """, Project_Name, """ has no library");
end if;
+ -- Do not attempt to build the library if it is externally built
+
+ if Data.Externally_Built then
+ return;
+ end if;
+
-- If this is the first time Build_Library is called, get the Name_Id
-- of "s-osinte.ads".
@@ -1399,17 +1405,18 @@ package body MLib.Prj is
declare
ALI_File : constant String :=
Ext_To
- (Filename (1 .. Last), "ali");
+ (C_Filename
+ (1 .. Last), "ali");
ALI_Path : constant String :=
- Ext_To (Object_Path, "ali");
+ Ext_To (C_Object_Path, "ali");
Add_It : Boolean :=
There_Are_Foreign_Sources
- or else
- (Last > 5
- and then
- C_Filename
- (1 .. B_Start'Length) =
- B_Start.all);
+ or else
+ (Last > 5
+ and then
+ C_Filename
+ (1 .. B_Start'Length) =
+ B_Start.all);
Fname : File_Name_Type;
Proj : Project_Id;
@@ -2348,7 +2355,7 @@ package body MLib.Prj is
Fd : FILEs;
-- Binder file's descriptor
- Read_Mode : constant String := "r" & ASCII.Nul;
+ Read_Mode : constant String := "r" & ASCII.NUL;
-- For fopen
Status : Interfaces.C_Streams.int;
OpenPOWER on IntegriCloud