diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-04 12:18:16 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-04 12:18:16 +0000 |
commit | 2e8eadb7d7c9ca459e102ce688e4bbf530ea11e7 (patch) | |
tree | ff41142304d473e9b7109fb745e031524cc73de5 /gcc/ada/gnatlink.adb | |
parent | 30ff3030a38f71250119a35ca85e15eda8808f47 (diff) | |
download | ppe42-gcc-2e8eadb7d7c9ca459e102ce688e4bbf530ea11e7.tar.gz ppe42-gcc-2e8eadb7d7c9ca459e102ce688e4bbf530ea11e7.zip |
2011-08-04 Arnaud Charlet <charlet@adacore.com>
* make.adb (Do_Codepeer_Globalize_Step): Removed. Use CodePeer_Mode
instead.
(CodePeer_Mode_String): New.
(Linking_Phase, Binding_Phase): Call gnatlink with -P switch in
CodePeer mode.
(Scan_Make_Arg): Do not disable binding/linking phase in CodePeer mode.
* bindgen.adb (Gen_Elab_Calls_Ada): Ignore subprograms in CodePeer
mode, since no useful elaboration subprogram is needed by CodePeer.
* gnatlink.adb (Gnatlink): Add support for -P switch (CodePeer mode).
In this mode, compile binder file with -gnatC and do stop after this
step.
2011-08-04 Vincent Celier <celier@adacore.com>
* exp_ch7.adb: Minor comment fix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177366 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gnatlink.adb')
-rw-r--r-- | gcc/ada/gnatlink.adb | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb index 0b5d681b376..6a0a34e78ff 100644 --- a/gcc/ada/gnatlink.adb +++ b/gcc/ada/gnatlink.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1996-2010, Free Software Foundation, Inc. -- +-- Copyright (C) 1996-2011, 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- -- @@ -479,6 +479,9 @@ procedure Gnatlink is (Argument (Next_Arg), Only_If_No_Suffix => True)); + when 'P' => + Opt.CodePeer_Mode := True; + when 'R' => Opt.Run_Path_Option := False; @@ -1441,12 +1444,13 @@ procedure Gnatlink is Write_Eol; Write_Line (" mainprog.ali the ALI file of the main program"); Write_Eol; - Write_Line (" -f force object file list to be generated"); + Write_Line (" -f Force object file list to be generated"); Write_Line (" -g Compile binder source file with debug information"); Write_Line (" -n Do not compile the binder source file"); + Write_Line (" -P Process files for use by CodePeer"); Write_Line (" -R Do not use a run_path_option"); - Write_Line (" -v verbose mode"); - Write_Line (" -v -v very verbose mode"); + Write_Line (" -v Verbose mode"); + Write_Line (" -v -v Very verbose mode"); Write_Eol; Write_Line (" -o nam Use 'nam' as the name of the executable"); Write_Line (" -b target Compile the binder source to run on target"); @@ -1675,6 +1679,8 @@ begin -- because bindgen uses brackets encoding for all upper -- half and wide characters in identifier names. + -- In addition, in CodePeer mode compile with -gnatC + if Ada_Bind_File then Binder_Options_From_ALI.Increment_Last; Binder_Options_From_ALI.Table (Binder_Options_From_ALI.Last) := @@ -1685,6 +1691,12 @@ begin Binder_Options_From_ALI.Increment_Last; Binder_Options_From_ALI.Table (Binder_Options_From_ALI.Last) := new String'("-gnatiw"); + + if Opt.CodePeer_Mode then + Binder_Options_From_ALI.Increment_Last; + Binder_Options_From_ALI.Table (Binder_Options_From_ALI.Last) := + new String'("-gnatC"); + end if; end if; -- Locate all the necessary programs and verify required files are present @@ -1888,6 +1900,13 @@ begin end Bind_Step; end if; + -- In CodePeer mode, there's nothing left to do after the binder file has + -- been compiled. + + if Opt.CodePeer_Mode then + return; + end if; + -- Now, actually link the program -- Skip this step for now on JVM since the Java interpreter will do |