summaryrefslogtreecommitdiff
path: root/gcc/ada/make.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-13 11:51:34 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-13 11:51:34 +0000
commit0914a918f13c3934753e8a1721e660fd2e0cb551 (patch)
tree6815f7bd6ae4c52b808b0e67e421256c4df38f67 /gcc/ada/make.adb
parent708f6f12397a72cf087f064ed2f59f6fa1f4ffe9 (diff)
downloadgcc-0914a918f13c3934753e8a1721e660fd2e0cb551.tar.gz
2004-01-13 Ed Schonberg <schonberg@gnat.com>
* exp_ch3.adb (Build_Assignment): Fix bug in handling of controlled components that are initialized with aggregates. 2004-01-13 Vincent Celier <celier@gnat.com> * gnatlink.adb (Process_Binder_File): To find directory of shared libgcc, if "gcc-lib" is not a subdirectory, look for the last subdirectory "lib" in the path of the shared libgnat or libgnarl. * make.adb (Gnatmake): If GCC version is at least 3, link with -shared-libgcc, when there is at least one shared library project. * opt.ads (GCC_Version): New integer constant. * adaint.c (get_gcc_version): New function. 2004-01-13 Robert Dewar <dewar@gnat.com> * sem_dist.adb, sem_res.adb, sem_util.adb, sprint.adb, 3zsocthi.adb, einfo.adb, cstand.adb, exp_ch4.adb, exp_ch9.adb, exp_dist.adb: Minor reformatting 2004-01-13 Thomas Quinot <quinot@act-europe.fr> * s-interr.adb, s-stache.adb, s-taenca.adb, g-regpat.adb, g-spitbo.adb, 5itaprop.adb: Add missing 'constant' keywords in object declarations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75802 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/make.adb')
-rw-r--r--gcc/ada/make.adb19
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/ada/make.adb b/gcc/ada/make.adb
index ed7c188bc53..f716fe74b90 100644
--- a/gcc/ada/make.adb
+++ b/gcc/ada/make.adb
@@ -393,6 +393,14 @@ package body Make is
Bind_Shared_Known : Boolean := False;
-- Set to True after the first time Bind_Shared is computed
+ Shared_Libgcc : aliased String := "-shared-libgcc";
+
+ No_Shared_Libgcc_Switch : aliased Argument_List := (1 .. 0 => null);
+ Shared_Libgcc_Switch : aliased Argument_List :=
+ (1 => Shared_Libgcc'Access);
+ Link_With_Shared_Libgcc : Argument_List_Access :=
+ No_Shared_Libgcc_Switch'Access;
+
procedure Make_Failed (S1 : String; S2 : String := ""; S3 : String := "");
-- Delete all temp files created by Gnatmake and call Osint.Fail,
-- with the parameter S1, S2 and S3 (see osint.ads).
@@ -3383,6 +3391,7 @@ package body Make is
Make.Initialize;
Bind_Shared := No_Shared_Switch'Access;
+ Link_With_Shared_Libgcc := No_Shared_Libgcc_Switch'Access;
Bind_Shared_Known := False;
Failed_Links.Set_Last (0);
@@ -4769,6 +4778,12 @@ package body Make is
Projects.Table (Proj).Library_Kind /= Static
then
Bind_Shared := Shared_Switch'Access;
+
+ if GCC_Version >= 3 then
+ Link_With_Shared_Libgcc :=
+ Shared_Libgcc_Switch'Access;
+ end if;
+
exit;
end if;
end loop;
@@ -5276,7 +5291,9 @@ package body Make is
-- And invoke the linker
begin
- Link (Main_ALI_File, Args (Args'First .. Last_Arg));
+ Link (Main_ALI_File,
+ Link_With_Shared_Libgcc.all &
+ Args (Args'First .. Last_Arg));
Successful_Links.Increment_Last;
Successful_Links.Table (Successful_Links.Last) :=
Main_ALI_File;