diff options
author | Geoffrey Keating <geoffk@apple.com> | 2003-10-24 21:28:13 +0000 |
---|---|---|
committer | Geoffrey Keating <geoffk@gcc.gnu.org> | 2003-10-24 21:28:13 +0000 |
commit | 7bb1ad9314f7e671cf8c4b69da55dc0afe7cba01 (patch) | |
tree | d43094488963890ba2a849eb20c57b70ebe80264 /gcc/target.h | |
parent | eebf21ef9940f507365b505fcd2fb290cc7c38b7 (diff) | |
download | gcc-7bb1ad9314f7e671cf8c4b69da55dc0afe7cba01.zip gcc-7bb1ad9314f7e671cf8c4b69da55dc0afe7cba01.tar.gz gcc-7bb1ad9314f7e671cf8c4b69da55dc0afe7cba01.tar.bz2 |
re PR pch/10757 (Adding -fpic/-fPIC causes crash with PCH created without -fpic/-fPIC)
PR 10757
* c-pch.c: Include target.h. Improve comments.
(struct c_pch_validity): Add target_data_length.
(pch_init): Add target's validity data.
(c_common_valid_pch): Check target's validity data.
* target-def.h (TARGET_GET_PCH_VALIDITY): New.
(TARGET_PCH_VALID_P): New.
(TARGET_INITIALIZER): Add new fields.
* target.h: Include tm.h.
(struct gcc_target): Add get_pch_validity, pch_valid_p.
* toplev.h (default_get_pch_validity): New prototype.
(default_pch_valid_p): New prototype.
* toplev.c (default_get_pch_validity): New routine.
(default_pch_valid_p): New routine.
* Makefile.in (TARGET_H): Add TM_H. Replace all users of
target.h with $(TARGET_H).
(c-pch.o): Add TARGET_H.
* doc/tm.texi (PCH Target): New node.
(TARGET_GET_PCH_VALIDITY): Document.
(TARGET_PCH_VALID_P): Document.
From-SVN: r72909
Diffstat (limited to 'gcc/target.h')
-rw-r--r-- | gcc/target.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/target.h b/gcc/target.h index 8d77dfd..0b19445 100644 --- a/gcc/target.h +++ b/gcc/target.h @@ -44,6 +44,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. to gradually reduce the amount of conditional compilation that is scattered throughout GCC. */ +#include "tm.h" + struct gcc_target { /* Functions that output assembler for the target. */ @@ -380,6 +382,15 @@ struct gcc_target delayed-branch scheduling. */ void (* machine_dependent_reorg) (void); + /* Validity-checking routines for PCH files, target-specific. + get_pch_validity returns a pointer to the data to be stored, + and stores the size in its argument. pch_valid_p gets the same + information back and returns NULL if the PCH is valid, + or an error message if not. + */ + void * (* get_pch_validity) (size_t *); + const char * (* pch_valid_p) (const void *, size_t); + /* Leave the boolean fields at the end. */ /* True if arbitrary sections are supported. */ |