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]

Re: [PATCH/RFA] spec functions


On Sat, Nov 02, 2002 at 09:40:34AM -0800, Zack Weinberg wrote:

 > Not necessary; give the backend a target macro to define to add to the
 > list, and give the frontend a table of its own (defined in the
 > lang_specific_driver file).

Here is an updated patch that folds in all the feedback I've gotten
on this so far, and fixes the arg splitting bug in nested spec functions.

	* gcc.c (The Specs Language): Document spec functions.
	(static_spec_functions, lookup_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): Use alloc_args to allocate the initial argument vector.
	* gcc.h (struct spec_function): New.
	(lang_specific_lookup_spec_function): New prototype

	* 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.

	* doc/invoke.texi: Document spec functions.
	* doc/tm.texi: Document EXTRA_SPEC_FUNCTIONS.

	* cppspec.c (lang_specific_lookup_spec_function): New.
	* gccspec.c (lang_specific_lookup_spec_function): New.

	* g++spec.c (lang_specific_lookup_spec_function): New.

	* g77spec.c (lang_specific_lookup_spec_function): New.

	* jvspec.c (lang_specific_lookup_spec_function): New.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

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]