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/RFC] Support for spec predicate expressions


On Wed, Oct 30, 2002 at 12:14:14PM -0800, Jason R Thorpe wrote:

 > Feel free to ignore the fact that if-exists() is currently hard-wired for
 > library search rules -- that's just so I could run my testcase until such
 > time as the args are spec'ified.

Ok, the function arguments are now spec'ified.  This also has the effect
of pre-splitting the arguments, so no helper to do that is needed.  The
code that implements the function now takes an argc/argv pair.

I'll work on the documentation shortly.  Comments on the code would be
appreciated.  One thing I'm wondering about is if the current suffix_subst
should be kept when processing the function args spec.

 	* 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.
 
 	* config/netbsd-elf.h (STARTFILE_SPEC): Add if-exists(crti%O%s).
 	(ENDFILE_SPEC): Add if-exists(crtn%O%s).
 
-- 
        -- 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]