public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] GNAT driver and externally built library project files
@ 2014-02-19 10:59 Arnaud Charlet
  0 siblings, 0 replies; only message in thread
From: Arnaud Charlet @ 2014-02-19 10:59 UTC (permalink / raw)
  To: gcc-patches; +Cc: Vincent Celier

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]

When the GNAT driver is invoked to bind a main of a project file, and
there are externally built library projects in the closure of the main
project file, the invocation of gnatbind may fail if the object directory
does not contain any ALI files.

Tested on x86_64-pc-linux-gnu, committed on trunk

2014-02-19  Vincent Celier  <celier@adacore.com>

	* gnatcmd.adb (GNATCmd): Always replace the object dirs of
	imported library projects with the library ALI dirs, when setting
	the object paths.
	* prj-env.ads (Ada_Objects_Path): Correct comments about
	argument Including_Libraries.


[-- Attachment #2: difs --]
[-- Type: text/plain, Size: 1951 bytes --]

Index: gnatcmd.adb
===================================================================
--- gnatcmd.adb	(revision 207879)
+++ gnatcmd.adb	(working copy)
@@ -1040,6 +1040,7 @@
                 "accept project file switches -vPx, -Pprj and -Xnam=val");
       New_Line;
    end Non_VMS_Usage;
+
    ------------------
    -- Process_Link --
    ------------------
@@ -2106,7 +2107,7 @@
          --  Set up the env vars for project path files
 
          Prj.Env.Set_Ada_Paths
-           (Project, Project_Tree, Including_Libraries => False);
+           (Project, Project_Tree, Including_Libraries => True);
 
          --  For gnatcheck, gnatstub, gnatmetric, gnatpp and gnatelim, create
          --  a configuration pragmas file, if necessary.
Index: prj-env.adb
===================================================================
--- prj-env.adb	(revision 207879)
+++ prj-env.adb	(working copy)
@@ -1681,8 +1681,6 @@
          Path : Path_Name_Type;
 
       begin
-         --  ??? This is almost the equivalent of For_All_Source_Dirs
-
          if Process_Source_Dirs then
 
             --  Add to path all source directories of this project if there are
Index: prj-env.ads
===================================================================
--- prj-env.ads	(revision 207879)
+++ prj-env.ads	(working copy)
@@ -92,7 +92,7 @@
       Including_Libraries : Boolean := True) return String_Access;
    --  Get the ADA_OBJECTS_PATH of a Project file. For the first call with the
    --  exact same parameters, compute it and cache it. When Including_Libraries
-   --  is False, the object directory of a library project is replaced with the
+   --  is True, the object directory of a library project is replaced with the
    --  library ALI directory of this project (usually the library directory of
    --  the project, except when attribute Library_ALI_Dir is declared) except
    --  when the library ALI directory does not contain any ALI file.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-19 10:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-19 10:59 [Ada] GNAT driver and externally built library project files Arnaud Charlet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).