Commit 23d6baa3 by Matt Kraai Committed by Matt Kraai

bindgen.adb (Gen_Main_Ada, Gen_Main_C): Do not test Bind_Main_Program.

	* bindgen.adb (Gen_Main_Ada, Gen_Main_C): Do not test
	Bind_Main_Program.

From-SVN: r68061
parent cc0651d2
2003-06-16 Matt Kraai <kraai@alumni.cmu.edu>
* bindgen.adb (Gen_Main_Ada, Gen_Main_C): Do not test
Bind_Main_Program.
2003-06-15 Neil Booth <neil@daikokuya.co.uk> 2003-06-15 Neil Booth <neil@daikokuya.co.uk>
* lang.opt: Declare Ada. * lang.opt: Declare Ada.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
-- -- -- --
-- B o d y -- -- B o d y --
-- -- -- --
-- Copyright (C) 1992-2002 Free Software Foundation, Inc. -- -- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
-- -- -- --
-- GNAT is free software; you can redistribute it and/or modify it under -- -- 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- -- -- terms of the GNU General Public License as published by the Free Soft- --
...@@ -1245,12 +1245,10 @@ package body Bindgen is ...@@ -1245,12 +1245,10 @@ package body Bindgen is
-- The reference stops Ada_Main_Program_Name from being optimized -- The reference stops Ada_Main_Program_Name from being optimized
-- away by smart linkers, such as the AiX linker. -- away by smart linkers, such as the AiX linker.
if Bind_Main_Program then
WBI WBI
(" Ensure_Reference : System.Address := " & (" Ensure_Reference : System.Address := " &
"Ada_Main_Program_Name'Address;"); "Ada_Main_Program_Name'Address;");
WBI (""); WBI ("");
end if;
WBI (" begin"); WBI (" begin");
...@@ -1366,12 +1364,10 @@ package body Bindgen is ...@@ -1366,12 +1364,10 @@ package body Bindgen is
-- place). The reference stops Ada_Main_Program_Name from being -- place). The reference stops Ada_Main_Program_Name from being
-- optimized away by smart linkers, such as the AiX linker. -- optimized away by smart linkers, such as the AiX linker.
if Bind_Main_Program then
WBI WBI
(" char *ensure_reference __attribute__ ((__unused__)) = " & (" char *ensure_reference __attribute__ ((__unused__)) = " &
"__gnat_ada_main_program_name;"); "__gnat_ada_main_program_name;");
WBI (""); WBI ("");
end if;
if ALIs.Table (ALIs.First).Main_Program = Func then if ALIs.Table (ALIs.First).Main_Program = Func then
WBI (" int result;"); WBI (" int result;");
......
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