This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] gnatlink improvements


Tested on i686-linux, committed on trunk

When gnatlink is called with --LINK=... to indicate an underlying linker
other than gcc, it is not appropriate to add -static-libgcc to the
switches, because the underlying linker may not support this switch or
fail. This patch ensures that -static-libgcc is not used when --LINK=
specify an underlying linker other than gcc.
The test for this is to build using "gnatmake <main> -largs --LINK=..."
with an underlying linker that will not accept -static-libgcc.

When gnatlink invokes the underlying linker and this invocation fails for
any reason, it was displaying "cannot call ...", even when the call was
possible but resulted in an error. This error message was confusing and
has been modified to "error when calling ...".

2007-06-06  Vincent Celier  <celier@adacore.com>

	* gnatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK=
	has been specified
	Correct error message when invocation of the linker fails
	Add explicit size clause for the C imported variables
	Object_List_File_Supported and Using_GNU_Linker to emphasize that
	we expect char size.
	Read target parameters earlier, since this is needed to set
	Target_VM properly. Also do not use -static/shared-libgcc for non GCC
	targets.

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]