Commit 6528a7ed by Arnaud Charlet

[multiple changes]

2009-10-30  Emmanuel Briot  <briot@adacore.com>

	* make.adb (Start_Compile_If_Possible): Compute location of resulting
	ALI file in this procedure instead of after the compilation itself,
	since the current directory might have changed in between when using
	-j<n>.

	* osint.ads: Addded missing alignment clause.

	* adaint.c, adaint.h, osint.adb (__gnat_reset_attributes,
	__gnat_size_of_file_attributes): Rename reset_attributes and
	size_of_file_attributes.

2009-10-30  Javier Miranda  <miranda@adacore.com>

	* sem_scil.adb (Adjust_SCIL_Node): Add missing management of sequences
	of statements when searching for SCIL nodes.

2009-10-30  Tristan Gingold  <gingold@adacore.com>

	* gnatlink.adb, link.c: By default use shared libgcc on darwin.

From-SVN: r153749
parent cafdbd2e
2009-10-30 Emmanuel Briot <briot@adacore.com> 2009-10-30 Emmanuel Briot <briot@adacore.com>
* make.adb (Start_Compile_If_Possible): Compute location of resulting
ALI file in this procedure instead of after the compilation itself,
since the current directory might have changed in between when using
-j<n>.
* osint.ads: Addded missing alignment clause.
* adaint.c, adaint.h, osint.adb (__gnat_reset_attributes,
__gnat_size_of_file_attributes): Rename reset_attributes and
size_of_file_attributes.
2009-10-30 Javier Miranda <miranda@adacore.com>
* sem_scil.adb (Adjust_SCIL_Node): Add missing management of sequences
of statements when searching for SCIL nodes.
2009-10-30 Tristan Gingold <gingold@adacore.com>
* gnatlink.adb, link.c: By default use shared libgcc on darwin.
2009-10-30 Emmanuel Briot <briot@adacore.com>
* make.adb, osint.adb (Add_Lib_Search_Dir): Do not add if dir is * make.adb, osint.adb (Add_Lib_Search_Dir): Do not add if dir is
already in the list. already in the list.
This saves system calls when looking for ALI files This saves system calls when looking for ALI files
......
...@@ -325,7 +325,7 @@ const int __gnat_vmsp = 0; ...@@ -325,7 +325,7 @@ const int __gnat_vmsp = 0;
#endif #endif
/* Used for Ada bindings */ /* Used for Ada bindings */
const int size_of_file_attributes = sizeof (struct file_attributes); const int __gnat_size_of_file_attributes = sizeof (struct file_attributes);
/* Reset the file attributes as if no system call had been performed */ /* Reset the file attributes as if no system call had been performed */
void __gnat_stat_to_attr (int fd, char* name, struct file_attributes* attr); void __gnat_stat_to_attr (int fd, char* name, struct file_attributes* attr);
...@@ -378,7 +378,7 @@ to_ptr32 (char **ptr64) ...@@ -378,7 +378,7 @@ to_ptr32 (char **ptr64)
#endif #endif
void void
reset_attributes __gnat_reset_attributes
(struct file_attributes* attr) (struct file_attributes* attr)
{ {
attr->exists = -1; attr->exists = -1;
...@@ -1133,7 +1133,7 @@ long ...@@ -1133,7 +1133,7 @@ long
__gnat_file_length (int fd) __gnat_file_length (int fd)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_file_length_attr (fd, NULL, &attr); return __gnat_file_length_attr (fd, NULL, &attr);
} }
...@@ -1141,7 +1141,7 @@ long ...@@ -1141,7 +1141,7 @@ long
__gnat_named_file_length (char *name) __gnat_named_file_length (char *name)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_file_length_attr (-1, name, &attr); return __gnat_file_length_attr (-1, name, &attr);
} }
...@@ -1371,7 +1371,7 @@ OS_Time ...@@ -1371,7 +1371,7 @@ OS_Time
__gnat_file_time_name (char *name) __gnat_file_time_name (char *name)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_file_time_name_attr (name, &attr); return __gnat_file_time_name_attr (name, &attr);
} }
...@@ -1465,7 +1465,7 @@ OS_Time ...@@ -1465,7 +1465,7 @@ OS_Time
__gnat_file_time_fd (int fd) __gnat_file_time_fd (int fd)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_file_time_fd_attr (fd, &attr); return __gnat_file_time_fd_attr (fd, &attr);
} }
...@@ -1819,7 +1819,7 @@ int ...@@ -1819,7 +1819,7 @@ int
__gnat_file_exists (char *name) __gnat_file_exists (char *name)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_file_exists_attr (name, &attr); return __gnat_file_exists_attr (name, &attr);
} }
...@@ -1876,7 +1876,7 @@ int ...@@ -1876,7 +1876,7 @@ int
__gnat_is_regular_file (char *name) __gnat_is_regular_file (char *name)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_is_regular_file_attr (name, &attr); return __gnat_is_regular_file_attr (name, &attr);
} }
...@@ -1894,7 +1894,7 @@ int ...@@ -1894,7 +1894,7 @@ int
__gnat_is_directory (char *name) __gnat_is_directory (char *name)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_is_directory_attr (name, &attr); return __gnat_is_directory_attr (name, &attr);
} }
...@@ -2118,7 +2118,7 @@ int ...@@ -2118,7 +2118,7 @@ int
__gnat_is_readable_file (char *name) __gnat_is_readable_file (char *name)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_is_readable_file_attr (name, &attr); return __gnat_is_readable_file_attr (name, &attr);
} }
...@@ -2156,7 +2156,7 @@ int ...@@ -2156,7 +2156,7 @@ int
__gnat_is_writable_file (char *name) __gnat_is_writable_file (char *name)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_is_writable_file_attr (name, &attr); return __gnat_is_writable_file_attr (name, &attr);
} }
...@@ -2192,7 +2192,7 @@ int ...@@ -2192,7 +2192,7 @@ int
__gnat_is_executable_file (char *name) __gnat_is_executable_file (char *name)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_is_executable_file_attr (name, &attr); return __gnat_is_executable_file_attr (name, &attr);
} }
...@@ -2334,7 +2334,7 @@ int ...@@ -2334,7 +2334,7 @@ int
__gnat_is_symbolic_link (char *name ATTRIBUTE_UNUSED) __gnat_is_symbolic_link (char *name ATTRIBUTE_UNUSED)
{ {
struct file_attributes attr; struct file_attributes attr;
reset_attributes (&attr); __gnat_reset_attributes (&attr);
return __gnat_is_symbolic_link_attr (name, &attr); return __gnat_is_symbolic_link_attr (name, &attr);
} }
......
...@@ -155,7 +155,7 @@ extern int __gnat_is_writable_file (char *); ...@@ -155,7 +155,7 @@ extern int __gnat_is_writable_file (char *);
extern int __gnat_is_readable_file (char *name); extern int __gnat_is_readable_file (char *name);
extern int __gnat_is_executable_file (char *name); extern int __gnat_is_executable_file (char *name);
extern void reset_attributes (struct file_attributes* attr); extern void __gnat_reset_attributes (struct file_attributes* attr);
extern long __gnat_file_length_attr (int, char *, struct file_attributes *); extern long __gnat_file_length_attr (int, char *, struct file_attributes *);
extern OS_Time __gnat_file_time_name_attr (char *, struct file_attributes *); extern OS_Time __gnat_file_time_name_attr (char *, struct file_attributes *);
extern OS_Time __gnat_file_time_fd_attr (int, struct file_attributes *); extern OS_Time __gnat_file_time_fd_attr (int, struct file_attributes *);
......
...@@ -189,6 +189,13 @@ procedure Gnatlink is ...@@ -189,6 +189,13 @@ procedure Gnatlink is
Object_List_File_Required : Boolean := False; Object_List_File_Required : Boolean := False;
-- Set to True to force generation of a response file -- Set to True to force generation of a response file
Shared_Libgcc_Default : Character;
for Shared_Libgcc_Default'Size use Character'Size;
pragma Import
(C, Shared_Libgcc_Default, "__gnat_shared_libgcc_default");
-- Indicates wether libgcc should be statically linked (use 'T') or
-- dynamically linked (use 'H') by default.
function Base_Name (File_Name : String) return String; function Base_Name (File_Name : String) return String;
-- Return just the file name part without the extension (if present) -- Return just the file name part without the extension (if present)
...@@ -2141,11 +2148,15 @@ begin ...@@ -2141,11 +2148,15 @@ begin
if Linker_Path = Gcc_Path and then VM_Target = No_VM then if Linker_Path = Gcc_Path and then VM_Target = No_VM then
-- If gcc is not called with -shared-libgcc, call it with -- For systems where the default is to link statically
-- -static-libgcc, as there are some platforms where one of -- with libgcc, if gcc is not called with
-- these two switches is compulsory to link. -- -shared-libgcc, call it with -static-libgcc, as
-- there are some platforms where one of these two
-- switches is compulsory to link.
if not Shared_Libgcc_Seen then if Shared_Libgcc_Default = 'T'
and then not Shared_Libgcc_Seen
then
Linker_Options.Increment_Last; Linker_Options.Increment_Last;
Linker_Options.Table (Linker_Options.Last) := Static_Libgcc; Linker_Options.Table (Linker_Options.Last) := Static_Libgcc;
Num_Args := Num_Args + 1; Num_Args := Num_Args + 1;
......
...@@ -62,6 +62,9 @@ ...@@ -62,6 +62,9 @@
/* shared_libgnat_default gives the system dependent link method that */ /* shared_libgnat_default gives the system dependent link method that */
/* be used by default for linking libgnat (shared or static) */ /* be used by default for linking libgnat (shared or static) */
/* shared_libgcc_default gives the system dependent link method that */
/* be used by default for linking libgcc (shared or statis) */
/* using_gnu_linker is set to 1 when the GNU linker is used under this */ /* using_gnu_linker is set to 1 when the GNU linker is used under this */
/* target. */ /* target. */
...@@ -89,6 +92,7 @@ const char *__gnat_run_path_option = "-Wl,-rpath,"; ...@@ -89,6 +92,7 @@ const char *__gnat_run_path_option = "-Wl,-rpath,";
int __gnat_link_max = 10000; int __gnat_link_max = 10000;
unsigned char __gnat_objlist_file_supported = 1; unsigned char __gnat_objlist_file_supported = 1;
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
unsigned char __gnat_using_gnu_linker = 0; unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".a"; const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0; unsigned char __gnat_separate_run_path_options = 0;
...@@ -99,6 +103,7 @@ const char *__gnat_run_path_option = "-Wl,-rpath,"; ...@@ -99,6 +103,7 @@ const char *__gnat_run_path_option = "-Wl,-rpath,";
int __gnat_link_max = 5000; int __gnat_link_max = 5000;
unsigned char __gnat_objlist_file_supported = 1; unsigned char __gnat_objlist_file_supported = 1;
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
unsigned char __gnat_using_gnu_linker = 0; unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".a"; const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0; unsigned char __gnat_separate_run_path_options = 0;
...@@ -109,6 +114,7 @@ const char *__gnat_run_path_option = ""; ...@@ -109,6 +114,7 @@ const char *__gnat_run_path_option = "";
int __gnat_link_max = 30000; int __gnat_link_max = 30000;
unsigned char __gnat_objlist_file_supported = 1; unsigned char __gnat_objlist_file_supported = 1;
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
unsigned char __gnat_using_gnu_linker = 1; unsigned char __gnat_using_gnu_linker = 1;
const char *__gnat_object_library_extension = ".a"; const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0; unsigned char __gnat_separate_run_path_options = 0;
...@@ -119,6 +125,7 @@ const char *__gnat_run_path_option = "-Wl,+b,"; ...@@ -119,6 +125,7 @@ const char *__gnat_run_path_option = "-Wl,+b,";
int __gnat_link_max = 5000; int __gnat_link_max = 5000;
unsigned char __gnat_objlist_file_supported = 1; unsigned char __gnat_objlist_file_supported = 1;
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
unsigned char __gnat_using_gnu_linker = 0; unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".a"; const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0; unsigned char __gnat_separate_run_path_options = 0;
...@@ -129,6 +136,7 @@ const char *__gnat_run_path_option = ""; ...@@ -129,6 +136,7 @@ const char *__gnat_run_path_option = "";
int __gnat_link_max = 15000; int __gnat_link_max = 15000;
const unsigned char __gnat_objlist_file_supported = 1; const unsigned char __gnat_objlist_file_supported = 1;
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
unsigned char __gnat_using_gnu_linker = 0; unsigned char __gnat_using_gnu_linker = 0;
const char *__gnat_object_library_extension = ".a"; const char *__gnat_object_library_extension = ".a";
unsigned char __gnat_separate_run_path_options = 0; unsigned char __gnat_separate_run_path_options = 0;
...@@ -137,6 +145,7 @@ unsigned char __gnat_separate_run_path_options = 0; ...@@ -137,6 +145,7 @@ unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_object_file_option = ""; const char *__gnat_object_file_option = "";
const char *__gnat_run_path_option = ""; const char *__gnat_run_path_option = "";
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 2147483647; int __gnat_link_max = 2147483647;
unsigned char __gnat_objlist_file_supported = 0; unsigned char __gnat_objlist_file_supported = 0;
unsigned char __gnat_using_gnu_linker = 0; unsigned char __gnat_using_gnu_linker = 0;
...@@ -147,6 +156,7 @@ unsigned char __gnat_separate_run_path_options = 0; ...@@ -147,6 +156,7 @@ unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_object_file_option = ""; const char *__gnat_object_file_option = "";
const char *__gnat_run_path_option = "-Wl,-R"; const char *__gnat_run_path_option = "-Wl,-R";
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 2147483647; int __gnat_link_max = 2147483647;
unsigned char __gnat_objlist_file_supported = 0; unsigned char __gnat_objlist_file_supported = 0;
unsigned char __gnat_using_gnu_linker = 0; unsigned char __gnat_using_gnu_linker = 0;
...@@ -157,6 +167,7 @@ unsigned char __gnat_separate_run_path_options = 0; ...@@ -157,6 +167,7 @@ unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_object_file_option = ""; const char *__gnat_object_file_option = "";
const char *__gnat_run_path_option = "-Wl,-rpath,"; const char *__gnat_run_path_option = "-Wl,-rpath,";
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 8192; int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1; unsigned char __gnat_objlist_file_supported = 1;
unsigned char __gnat_using_gnu_linker = 1; unsigned char __gnat_using_gnu_linker = 1;
...@@ -167,6 +178,7 @@ unsigned char __gnat_separate_run_path_options = 0; ...@@ -167,6 +178,7 @@ unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_object_file_option = "-Wl,-filelist,"; const char *__gnat_object_file_option = "-Wl,-filelist,";
const char *__gnat_run_path_option = "-Wl,-rpath,"; const char *__gnat_run_path_option = "-Wl,-rpath,";
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = SHARED;
int __gnat_link_max = 262144; int __gnat_link_max = 262144;
unsigned char __gnat_objlist_file_supported = 1; unsigned char __gnat_objlist_file_supported = 1;
unsigned char __gnat_using_gnu_linker = 0; unsigned char __gnat_using_gnu_linker = 0;
...@@ -177,6 +189,7 @@ unsigned char __gnat_separate_run_path_options = 1; ...@@ -177,6 +189,7 @@ unsigned char __gnat_separate_run_path_options = 1;
const char *__gnat_object_file_option = ""; const char *__gnat_object_file_option = "";
const char *__gnat_run_path_option = "-Wl,-rpath,"; const char *__gnat_run_path_option = "-Wl,-rpath,";
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 8192; int __gnat_link_max = 8192;
unsigned char __gnat_objlist_file_supported = 1; unsigned char __gnat_objlist_file_supported = 1;
unsigned char __gnat_using_gnu_linker = 1; unsigned char __gnat_using_gnu_linker = 1;
...@@ -187,6 +200,7 @@ unsigned char __gnat_separate_run_path_options = 0; ...@@ -187,6 +200,7 @@ unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_object_file_option = ""; const char *__gnat_object_file_option = "";
const char *__gnat_run_path_option = ""; const char *__gnat_run_path_option = "";
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 2147483647; int __gnat_link_max = 2147483647;
unsigned char __gnat_objlist_file_supported = 0; unsigned char __gnat_objlist_file_supported = 0;
unsigned char __gnat_using_gnu_linker = 0; unsigned char __gnat_using_gnu_linker = 0;
...@@ -200,6 +214,7 @@ unsigned char __gnat_separate_run_path_options = 0; ...@@ -200,6 +214,7 @@ unsigned char __gnat_separate_run_path_options = 0;
const char *__gnat_run_path_option = ""; const char *__gnat_run_path_option = "";
const char *__gnat_object_file_option = ""; const char *__gnat_object_file_option = "";
char __gnat_shared_libgnat_default = STATIC; char __gnat_shared_libgnat_default = STATIC;
char __gnat_shared_libgcc_default = STATIC;
int __gnat_link_max = 2147483647; int __gnat_link_max = 2147483647;
unsigned char __gnat_objlist_file_supported = 0; unsigned char __gnat_objlist_file_supported = 0;
unsigned char __gnat_using_gnu_linker = 0; unsigned char __gnat_using_gnu_linker = 0;
......
...@@ -1866,7 +1866,8 @@ package body Make is ...@@ -1866,7 +1866,8 @@ package body Make is
Normalize_Pathname Normalize_Pathname
(Dir_Name (Dir_Name
(Get_Name_String (Full_Lib_File)), (Get_Name_String (Full_Lib_File)),
Resolve_Links => True, Resolve_Links =>
Opt.Follow_Links_For_Dirs,
Case_Sensitive => False); Case_Sensitive => False);
begin begin
...@@ -2609,8 +2610,8 @@ package body Make is ...@@ -2609,8 +2610,8 @@ package body Make is
Data := Running_Compile (J); Data := Running_Compile (J);
Project := Running_Compile (J).Project; Project := Running_Compile (J).Project;
-- If a mapping file was used by this compilation, -- If a mapping file was used by this compilation, get its
-- get its file name for reuse by a subsequent compilation -- file name for reuse by a subsequent compilation.
if Running_Compile (J).Mapping_File /= No_Mapping_File then if Running_Compile (J).Mapping_File /= No_Mapping_File then
Comp_Data := Project_Compilation_Htable.Get Comp_Data := Project_Compilation_Htable.Get
...@@ -3401,6 +3402,10 @@ package body Make is ...@@ -3401,6 +3402,10 @@ package body Make is
end if; end if;
end if; end if;
-- Compute where the ALI file must be generated in
-- In_Place_Mode (this does not require to know the
-- location of the object directory)
if In_Place_Mode then if In_Place_Mode then
if Full_Lib_File = No_File then if Full_Lib_File = No_File then
-- If the library file was not found, then save -- If the library file was not found, then save
...@@ -3416,20 +3421,11 @@ package body Make is ...@@ -3416,20 +3421,11 @@ package body Make is
Lib_File := Full_Lib_File; Lib_File := Full_Lib_File;
end if; end if;
Lib_File_Attr := Unknown_Attributes;
else
-- We will recompile, so we'll have to guess the
-- location of the object file based on the command
-- line switches and Object_Dir.
Full_Lib_File := No_File;
Lib_File_Attr := Unknown_Attributes;
end if; end if;
-- Start the compilation and record it. We can do this -- Start the compilation and record it. We can do
-- because there is at least one free process. -- this because there is at least one free process.
-- This might change the current directory
Collect_Arguments_And_Compile Collect_Arguments_And_Compile
(Full_Source_File => Full_Source_File, (Full_Source_File => Full_Source_File,
...@@ -3438,7 +3434,49 @@ package body Make is ...@@ -3438,7 +3434,49 @@ package body Make is
Pid => Pid, Pid => Pid,
Process_Created => Process_Created); Process_Created => Process_Created);
-- Make sure we could successfully start the compilation -- Compute where the ALI file will be generated (for
-- cases that might require to know the current
-- directory). The current directory might be changed
-- when compiling other files so we cannot rely on it
-- being the same to find the resulting ALI file.
if not In_Place_Mode then
-- Compute the expected location of the ALI file. This
-- can be from several places:
-- -i => in place mode. In such a case,
-- Full_Lib_File has already been set above
-- -D => if specified
-- or defaults in current dir
-- We could simply use a call similar to
-- Osint.Full_Lib_File_Name (Lib_File)
-- but that involves system calls and is thus slower
if Object_Directory_Path /= null then
Name_Len := 0;
Add_Str_To_Name_Buffer (Object_Directory_Path.all);
Add_Str_To_Name_Buffer (Get_Name_String (Lib_File));
Full_Lib_File := Name_Find;
else
if Project_Of_Current_Object_Directory /=
No_Project
then
Get_Name_String
(Project_Of_Current_Object_Directory
.Object_Directory.Name);
Add_Str_To_Name_Buffer
(Get_Name_String (Lib_File));
Full_Lib_File := Name_Find;
else
Full_Lib_File := Lib_File;
end if;
end if;
end if;
Lib_File_Attr := Unknown_Attributes;
-- Make sure we could successfully start
-- the Compilation.
if Process_Created then if Process_Created then
if Pid = Invalid_Pid then if Pid = Invalid_Pid then
...@@ -3501,34 +3539,6 @@ package body Make is ...@@ -3501,34 +3539,6 @@ package body Make is
and Compilation_OK and Compilation_OK
and (Output_Is_Object or Do_Bind_Step); and (Output_Is_Object or Do_Bind_Step);
if Data.Full_Lib_File = No_File then
-- Compute the expected location of the ALI file. This
-- can be from several places:
-- -i => in place mode. In such a case, Full_Lib_File
-- has already been set above
-- -D => if specified
-- or defaults in current dir.
--
-- We could simply use a call similar to
-- Osint.Full_Lib_File_Name (Lib_File)
-- but that involves system calls and is thus slower.
if Object_Directory_Path /= null then
Name_Len := 0;
Add_Str_To_Name_Buffer (Object_Directory_Path.all);
Add_Str_To_Name_Buffer
(Get_Name_String (Data.Lib_File));
Data.Full_Lib_File := Name_Find;
else
Data.Full_Lib_File := Data.Lib_File;
end if;
-- Invalidate the cache for the attributes, since the
-- file was just created.
Data.Lib_File_Attr := Unknown_Attributes;
end if;
Text := Read_Library_Info_From_Full Text := Read_Library_Info_From_Full
(Data.Full_Lib_File, Data.Lib_File_Attr'Access); (Data.Full_Lib_File, Data.Lib_File_Attr'Access);
......
...@@ -3197,7 +3197,7 @@ package body Osint is ...@@ -3197,7 +3197,7 @@ package body Osint is
---------------------------- ----------------------------
procedure Reset_File_Attributes (Attr : System.Address); procedure Reset_File_Attributes (Attr : System.Address);
pragma Import (C, Reset_File_Attributes, "reset_attributes"); pragma Import (C, Reset_File_Attributes, "__gnat_reset_attributes");
begin begin
Initialization : declare Initialization : declare
...@@ -3216,7 +3216,7 @@ begin ...@@ -3216,7 +3216,7 @@ begin
Sizeof_File_Attributes : Integer; Sizeof_File_Attributes : Integer;
pragma Import (C, Sizeof_File_Attributes, pragma Import (C, Sizeof_File_Attributes,
"size_of_file_attributes"); "__gnat_size_of_file_attributes");
begin begin
pragma Assert (Sizeof_File_Attributes <= File_Attributes_Size); pragma Assert (Sizeof_File_Attributes <= File_Attributes_Size);
......
...@@ -727,6 +727,7 @@ private ...@@ -727,6 +727,7 @@ private
type File_Attributes is type File_Attributes is
array (1 .. File_Attributes_Size) array (1 .. File_Attributes_Size)
of System.Storage_Elements.Storage_Element; of System.Storage_Elements.Storage_Element;
for File_Attributes'Alignment use Standard'Maximum_Alignment;
Unknown_Attributes : constant File_Attributes := (others => 0); Unknown_Attributes : constant File_Attributes := (others => 0);
-- Will be initialized properly at elaboration (for efficiency later on, -- Will be initialized properly at elaboration (for efficiency later on,
......
...@@ -285,6 +285,14 @@ package body Sem_SCIL is ...@@ -285,6 +285,14 @@ package body Sem_SCIL is
return Found_Node; return Found_Node;
end if; end if;
-- Actions in handled sequence of statements
when
N_Handled_Sequence_Of_Statements =>
if Find_SCIL_Node (Statements (P)) then
return Found_Node;
end if;
-- Conditions of while expression or elsif. -- Conditions of while expression or elsif.
when N_Iteration_Scheme | when N_Iteration_Scheme |
...@@ -505,7 +513,6 @@ package body Sem_SCIL is ...@@ -505,7 +513,6 @@ package body Sem_SCIL is
N_Function_Call | N_Function_Call |
N_Function_Specification | N_Function_Specification |
N_Generic_Association | N_Generic_Association |
N_Handled_Sequence_Of_Statements |
N_Identifier | N_Identifier |
N_In | N_In |
N_Index_Or_Discriminant_Constraint | N_Index_Or_Discriminant_Constraint |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment