From: charlet Date: Tue, 22 Jun 2010 13:43:47 +0000 (+0000) Subject: 2010-06-22 Vincent Celier X-Git-Tag: upstream/4.9.2~28480 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7be3ddddb3a4b83439bf643e06377ef59565f6ee;p=platform%2Fupstream%2Flinaro-gcc.git 2010-06-22 Vincent Celier * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161186 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 + + * 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 * 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);