an exception because ``Self(Obj)`` produces an anonymous object which does
not share the memory location of ``Obj``.
+.. index:: -gnateb (gcc)
+
+:switch:`-gnateb`
+ Store configuration files by their basename in ALI files. This switch is
+ used for instance by gprbuild for distributed builds in order to prevent
+ issues where machine-specific absolute paths could end up being stored in
+ ALI files.
.. index:: -gnatec (gcc)
depend on a file that no longer exists. Such tools include
``gprbuild``, ``gnatmake``, and ``gnatcheck``.
+By default, configuration pragma files are stored by their absolute paths in
+ALI files. You can use the :switch:`-gnateb` switch in order to store them by
+their basename instead.
+
If you are using project file, a separate mechanism is provided using
project attributes.
depend on a file that no longer exists. Such tools include
@code{gprbuild}, @code{gnatmake}, and @code{gnatcheck}.
+By default, configuration pragma files are stored by their absolute paths in
+ALI files. You can use the @code{-gnateb} switch in order to store them by
+their basename instead.
+
If you are using project file, a separate mechanism is provided using
project attributes.
not share the memory location of @code{Obj}.
@end table
+@geindex -gnateb (gcc)
+
+
+@table @asis
+
+@item @code{-gnateb}
+
+Store configuration files by their basename in ALI files. This switch is
+used for instance by gprbuild for distributed builds in order to prevent
+issues where machine-specific absolute paths could end up being stored in
+ALI files.
+@end table
+
@geindex -gnatec (gcc)
-- Normal case of a unit entry with a source index
if Sind > No_Source_File then
- -- We never want directory information in ALI files
- -- ???But back out this change temporarily until
- -- gprbuild is fixed.
- if False then
+ if Config_Files_Store_Basename then
Fname := Strip_Directory (File_Name (Sind));
else
Fname := File_Name (Sind);
-- GNAT
-- Names of configuration pragmas files (given by switches -gnatec)
+ Config_Files_Store_Basename : Boolean := False;
+ -- GNAT
+ -- Set True for -gnateb. Tells GNAT that config files should be referred to
+ -- by their basename and their checksums computed in ALI files.
+
Configurable_Run_Time_Mode : Boolean := False;
-- GNAT, GNATBIND
-- Set True if the compiler is operating in configurable run-time mode.
end loop;
end;
+ if Config_Files_Store_Basename then
+ Complete_Source_File_Entry;
+ end if;
+
-- Normal case of compilation unit
else
Ptr := Ptr + 1;
Check_Aliasing_Of_Parameters := True;
+ -- -gnateb (config file basenames and checksums in ALI)
+
+ when 'b' =>
+ Ptr := Ptr + 1;
+ Config_Files_Store_Basename := True;
+
-- -gnatec (configuration pragmas)
when 'c' =>