aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVincent Celier <celier@adacore.com>2010-06-22 13:43:47 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2010-06-22 15:43:47 +0200
commiteeb41f0134d2d2f9f979fac0e0f176e9c3e8a490 (patch)
tree35d73cf3d603d8b38d9f1779803f717db585af8e /gcc
parenta8ecfc9f2c532fdf26326b1f65fef3323fc2ad47 (diff)
downloadgcc-eeb41f0134d2d2f9f979fac0e0f176e9c3e8a490.zip
gcc-eeb41f0134d2d2f9f979fac0e0f176e9c3e8a490.tar.gz
gcc-eeb41f0134d2d2f9f979fac0e0f176e9c3e8a490.tar.bz2
clean.adb (Parse_Cmd_Line): Recognize switch --unchecked-shared-lib-imports.
2010-06-22 Vincent Celier <celier@adacore.com> * clean.adb (Parse_Cmd_Line): Recognize switch --unchecked-shared-lib-imports. (Usage): Add line for switch --unchecked-shared-lib-imports * makeusg.adb: Add line for switch --unchecked-shared-lib-imports * makeutl.ads: (Unchecked_Shared_Lib_Imports): New constant string moved from GPR_Util. * switch-m.adb (Scan_Make_Switches): Recognize switch --unchecked-shared-lib-imports. * vms_data.ads: Add VMS qualifiers /UNCHECKED_SHARED_LIB_IMPORTS. * gnat_ugn.texi: Add documentation for new switch --unchecked-shared-lib-imports. Add also documentation for --subdirs. From-SVN: r161186
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog14
-rw-r--r--gcc/ada/clean.adb7
-rw-r--r--gcc/ada/gnat_ugn.texi18
-rw-r--r--gcc/ada/makeusg.adb11
-rw-r--r--gcc/ada/makeutl.ads7
-rw-r--r--gcc/ada/switch-m.adb5
-rw-r--r--gcc/ada/vms_data.ads20
7 files changed, 77 insertions, 5 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 6adafcc..4a3d5ef 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,17 @@
+2010-06-22 Vincent Celier <celier@adacore.com>
+
+ * clean.adb (Parse_Cmd_Line): Recognize switch
+ --unchecked-shared-lib-imports.
+ (Usage): Add line for switch --unchecked-shared-lib-imports
+ * makeusg.adb: Add line for switch --unchecked-shared-lib-imports
+ * makeutl.ads: (Unchecked_Shared_Lib_Imports): New constant string
+ moved from GPR_Util.
+ * switch-m.adb (Scan_Make_Switches): Recognize switch
+ --unchecked-shared-lib-imports.
+ * vms_data.ads: Add VMS qualifiers /UNCHECKED_SHARED_LIB_IMPORTS.
+ * gnat_ugn.texi: Add documentation for new switch
+ --unchecked-shared-lib-imports. Add also documentation for --subdirs.
+
2010-06-22 Javier Miranda <miranda@adacore.com>
* sem_prag.adb, sem_util.adb, sem_util.ads, sem_attr.adb, exp_ch6.adb,
diff --git a/gcc/ada/clean.adb b/gcc/ada/clean.adb
index 978a5e7..5449727 100644
--- a/gcc/ada/clean.adb
+++ b/gcc/ada/clean.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2003-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2003-2010, Free Software Foundation, Inc. --
-- --
-- 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- --
@@ -1677,6 +1677,9 @@ package body Clean is
new String'
(Arg (Subdirs_Option'Length + 1 .. Arg'Last));
+ elsif Arg = Makeutl.Unchecked_Shared_Lib_Imports then
+ Opt.Unchecked_Shared_Lib_Imports := True;
+
else
Bad_Argument;
end if;
@@ -1957,6 +1960,8 @@ package body Clean is
New_Line;
Put_Line (" --subdirs=dir real obj/lib/exec dirs are subdirs");
+ Put_Line (" " & Makeutl.Unchecked_Shared_Lib_Imports);
+ Put_Line (" Allow shared libraries to import static libraries");
New_Line;
Put_Line (" -c Only delete compiler generated files");
diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi
index b725b50..e93e287 100644
--- a/gcc/ada/gnat_ugn.texi
+++ b/gcc/ada/gnat_ugn.texi
@@ -9193,6 +9193,15 @@ itself must not include any embedded spaces.
@end ifclear
+@item ^--subdirs^/SUBDIRS^=subdir
+Actual object directory of each project file is the subdirectory subdir of the
+object directory specified or defauted in the project file.
+
+@item ^--unchecked-shared-lib-imports^/UNCHECKED_SHARED_LIB_IMPORTS^
+By default, shared library projects are not allowed to import static library
+projects. When this switch is used on the command line, this restriction is
+relaxed.
+
@item ^-a^/ALL_FILES^
@cindex @option{^-a^/ALL_FILES^} (@command{gnatmake})
Consider all files in the make process, even the GNAT internal system
@@ -15329,6 +15338,15 @@ Display Copyright and version, then exit disregarding all other options.
If @option{--version} was not used, display usage, then exit disregarding
all other options.
+@item ^--subdirs^/SUBDIRS^=subdir
+Actual object directory of each project file is the subdirectory subdir of the
+object directory specified or defauted in the project file.
+
+@item ^--unchecked-shared-lib-imports^/UNCHECKED_SHARED_LIB_IMPORTS^
+By default, shared library projects are not allowed to import static library
+projects. When this switch is used on the command line, this restriction is
+relaxed.
+
@item ^-c^/COMPILER_FILES_ONLY^
@cindex @option{^-c^/COMPILER_FILES_ONLY^} (@code{gnatclean})
Only attempt to delete the files produced by the compiler, not those produced
diff --git a/gcc/ada/makeusg.adb b/gcc/ada/makeusg.adb
index ca22dce..acacba9 100644
--- a/gcc/ada/makeusg.adb
+++ b/gcc/ada/makeusg.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
-- --
-- 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- --
@@ -23,6 +23,7 @@
-- --
------------------------------------------------------------------------------
+with Makeutl;
with Osint; use Osint;
with Output; use Output;
with Usage;
@@ -311,6 +312,14 @@ begin
Write_Str (" --subdirs=dir real obj/lib/exec dirs are subdirs");
Write_Eol;
+
+ -- Line for --unchecked-shared-lib-imports
+
+ Write_Str (" ");
+ Write_Str (Makeutl.Unchecked_Shared_Lib_Imports);
+ Write_Eol;
+ Write_Str (" Allow shared libraries to import static libraries");
+ Write_Eol;
Write_Eol;
-- General Compiler, Binder, Linker switches
diff --git a/gcc/ada/makeutl.ads b/gcc/ada/makeutl.ads
index a7614f3..fd286a8 100644
--- a/gcc/ada/makeutl.ads
+++ b/gcc/ada/makeutl.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 2004-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2004-2010, Free Software Foundation, Inc. --
-- --
-- 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- --
@@ -47,6 +47,11 @@ package Makeutl is
-- Switch used to indicate that the real directories (object, exec,
-- library, ...) are subdirectories of those in the project file.
+ Unchecked_Shared_Lib_Imports : constant String :=
+ "--unchecked-shared-lib-imports";
+ -- Command line switch to allow shared library projects to import projects
+ -- that are not shared library projects.
+
procedure Add
(Option : String_Access;
To : in out String_List_Access;
diff --git a/gcc/ada/switch-m.adb b/gcc/ada/switch-m.adb
index 49c624a..b8beebf 100644
--- a/gcc/ada/switch-m.adb
+++ b/gcc/ada/switch-m.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 2001-2009, Free Software Foundation, Inc. --
+-- Copyright (C) 2001-2010, Free Software Foundation, Inc. --
-- --
-- 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- --
@@ -584,6 +584,9 @@ package body Switch.M is
(Switch_Chars'First + Subdirs_Option'Length ..
Switch_Chars'Last));
+ elsif Switch_Chars = Makeutl.Unchecked_Shared_Lib_Imports then
+ Opt.Unchecked_Shared_Lib_Imports := True;
+
elsif Switch_Chars (Ptr) = '-' then
Bad_Switch (Switch_Chars);
diff --git a/gcc/ada/vms_data.ads b/gcc/ada/vms_data.ads
index ed2f8ad..fdfe19d 100644
--- a/gcc/ada/vms_data.ads
+++ b/gcc/ada/vms_data.ads
@@ -1154,6 +1154,14 @@ package VMS_Data is
-- of the directory specified in the project file. If the subdirectory
-- does not exist, it is created automatically.
+ S_Clean_Unc_Shared_Libs : aliased constant S :=
+ "/UNCHECKED_SHARED_LIB_IMPORTS " &
+ "--unchecked-shared-lib-imports";
+ -- /NOUNCHECKED_SHARED_LIB_IMPORTS (D)
+ -- /UNCHECKED_SHARED_LIB_IMPORTS
+ --
+ -- Allow shared library projects to import static library projects
+
S_Clean_Verbose : aliased constant S := "/VERBOSE " &
"-v";
-- /NOVERBOSE (D)
@@ -1179,7 +1187,8 @@ package VMS_Data is
S_Clean_Recurs 'Access,
S_Clean_Search 'Access,
S_Clean_Subdirs'Access,
- S_Clean_Verbose'Access);
+ S_Clean_Verbose'Access,
+ S_Clean_Unc_Shared_Libs'Access);
-------------------------------
-- Switches for GNAT COMPILE --
@@ -4860,6 +4869,14 @@ package VMS_Data is
-- For example, -O -O2 is different than -O2 -O, but -g -O is equivalent
-- to -O -g.
+ S_Make_Unc_Shared_Libs : aliased constant S :=
+ "/UNCHECKED_SHARED_LIB_IMPORTS " &
+ "--unchecked-shared-lib-imports";
+ -- /NOUNCHECKED_SHARED_LIB_IMPORTS (D)
+ -- /UNCHECKED_SHARED_LIB_IMPORTS
+ --
+ -- Allow shared library projects to import static library projects
+
S_Make_Unique : aliased constant S := "/UNIQUE " &
"-u";
-- /NOUNIQUE (D)
@@ -4937,6 +4954,7 @@ package VMS_Data is
S_Make_Stand 'Access,
S_Make_Subdirs 'Access,
S_Make_Switch 'Access,
+ S_Make_Unc_Shared_Libs'Access,
S_Make_Unique 'Access,
S_Make_Use_Map 'Access,
S_Make_Verbose 'Access);