This is the mail archive of the 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]

Re: [PATCH/RFA] spec functions

On Sat, Nov 02, 2002 at 12:32:36AM +0000, Joseph S. Myers wrote:

 > On Fri, 1 Nov 2002, Jason R Thorpe wrote:
 > > In reference to:
 > > 
 > > [1]
 > > [2]
 > > [3]
 > > 
 > > This patch adds support for spec functions.  Spec functions have the
 > The documentation of specs in invoke.texi needs updating.  (invoke.texi is
 > a bad place for this documentation - it ought to be in the internals
 > manual - but it's where the documentation presently is.)

Here is the patch with the docs update.

	* gcc.c (The Specs Language): Document spec functions.
	(INIT_STATIC_SPEC_FUNCTION, static_spec_functions)
	(spec_functions, init_spec_functions, register_spec_function)
	(eval_spec_function, handle_spec_function)
	(if_exists_spec_function, alloc_args): New.
	(execute): Abort if processing_spec_function is true.
	(do_spec_1): Hand off spec to handle_spec_function if %:
	is encountered.  If processing_spec_function is true,
	end any pending argument when the end of the string is reached.
	(main): Call init_spec_functions.  Use alloc_args to allocate
	the initial argument vector.
	* gcc.h (register_spec_function): New prototype.

	* doc/invoke.texi: Document spec functions.

	* config/netbsd-elf.h (STARTFILE_SPEC): Add if-exists(crti%O%s).
	(ENDFILE_SPEC): Add if-exists(crtn%O%s).
	* config/alpha/netbsd.h (ENDFILE_SPEC): Likewise.

        -- Jason R. Thorpe <>

Attachment: specs-patch
Description: Text document

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