diff options
author | Jason Thorpe <thorpej@wasabisystems.com> | 2002-11-19 04:37:50 +0000 |
---|---|---|
committer | Jason Thorpe <thorpej@gcc.gnu.org> | 2002-11-19 04:37:50 +0000 |
commit | f3226a90019efdcdd3f1be3ef4fe19ff7f8d7f23 (patch) | |
tree | a48e1f22c976c1cbedd74ba5fba89fa5a4479319 /gcc/gcc.h | |
parent | 3b312ef46fc9f3319b688174a105d5827dd122b1 (diff) | |
download | gcc-f3226a90019efdcdd3f1be3ef4fe19ff7f8d7f23.zip gcc-f3226a90019efdcdd3f1be3ef4fe19ff7f8d7f23.tar.gz gcc-f3226a90019efdcdd3f1be3ef4fe19ff7f8d7f23.tar.bz2 |
gcc.c (The Specs Language): Document 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_spec_functions): New extern.
* 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.
* cppspec.c (lang_specific_spec_functions): New.
* gccspec.c: Likewise.
* g++spec.c (lang_specific_spec_functions): New.
* g77spec.c (lang_specific_spec_functions): New.
* jvspec.c (lang_specific_spec_functions): New.
From-SVN: r59241
Diffstat (limited to 'gcc/gcc.h')
-rw-r--r-- | gcc/gcc.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -23,6 +23,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "version.h" +/* The mapping of a spec function name to the C function that + implements it. */ +struct spec_function +{ + const char *name; + const char *(*func) PARAMS ((int, const char **)); +}; + /* These are exported by gcc.c. */ extern int do_spec PARAMS ((const char *)); extern void record_temp_file PARAMS ((const char *, int, int)); @@ -48,6 +56,9 @@ extern int n_infiles; /* Number of extra output files that lang_specific_pre_link may generate. */ extern int lang_specific_extra_outfiles; +/* Table of language-specific spec functions. */ +extern const struct spec_function lang_specific_spec_functions[]; + /* A vector of corresponding output files is made up later. */ extern const char **outfiles; |