diff options
author | Carlos O'Donell <carlos@codesourcery.com> | 2006-12-14 20:31:09 +0000 |
---|---|---|
committer | Carlos O'Donell <carlos@codesourcery.com> | 2006-12-14 20:31:09 +0000 |
commit | 046131376113d0755313b63bed7eeb45451fead4 (patch) | |
tree | 17139168a345b7d46a3e87b5843bb2ca7f234d45 /libiberty/config | |
parent | 0dcf6cf16c80da5f12f8dad96d71f585f08ee777 (diff) |
The following backport from mainline fixes PCH on i686-mingw32. It csl/sourcerygxx/3.4.4-32csl-gxxpro-3_4-branch
implements PCH on i686-mingw32 using CreateFileMapping and
MapViewOfFileEX.
There were 3 patches in this timeframe, one from Ian Taylor, one from
Richard Henderson, and one from Danny Smith. I am backporting the two
simpler changes. Richard's patch rewrites much of the PCH handling and
it is too risky. Instead I have cherry-picked the important pieces of
Richards patch which allow Danny's patch to work correctly.
The hook HOST_HOOKS_GT_PCH_USE_ADDRESS now returns 1, 0, or -1 on
successfully mapped file, did nothing, and failed.
On mailine a return of 0 means "I mapped memory but didn't load the
file". No target uses this return to mean that. So I used 0 to
mean "use the default behaviour." The documentation is changed to
indicate this.
The default host hook for gt_pch_get_address returns zero, and maintains
the same semantics as before e.g. it attempts an MMAP at a fixed address.
Relocation of a PCH is not permitted, so we use fatal_error if we detect
relocation is needed. We also remove all the old code which tries to
relocate and issues a sorry().
In review, the old behaviour is kept for all targets *except*
i686-mingw32 and darwin. These targets have been augmented based on the
new behaviour of HOST_HOOKS_GT_PCH_USE_ADDRESS.
2006-12-13 Carlos O'Donell <carlos@codesourcery.com>
gcc/
* hooks.c (hook_int_voidp_size_t_voidp_size_t_int_0): New function.
(hook_voidp_size_t_int_null): Likewise.
* hooks.h: Add new declarations.
* ggc.h: Likewise.
* hosthooks-def.h (HOST_HOOKS_GT_PCH_USE_ADDRESS): Default to
hook_int_voidp_size_t_voidp_size_t_int_0.
(HOST_HOOKS_GT_PCH_GET_ADDRESS): Default to
hook_voidp_size_t_int_null.
* gcc/doc/hostconfig.texi (HOST_HOOKS_GT_PCH_USE_ADDRESS): Adjust
documentation with respect to returning zero.
Backport from mainline:
gcc/
2004-06-05 Danny Smith <dannysmith@users.sourceforge.net>
* toplev.c (init_asm_output): Add explicit 'b' to mode when
opening asm_out_file.
* c-pch.c (c_common_write_pch): Remove unnecessary fflush before
reading asm_out_file. Replace fflush after reading asm_out_file
with fseek.
* hosthooks-def.h (HOST_HOOKS_GT_PCH_ALLOC_GRANULARITY): Define
default and add to HOST_HOOKS_INITIALIZER.
* hosthooks.h (gt_pch_alloc_granularity): Declare hook function.
* ggc-common.c (default_gt_pch_alloc_granularity): New function.
(gt_pch_save): Use host_hooks.gt_pch_alloc_granularity
to set mmi.offset padding.
* config.gcc (i[34567]86-*-mingw32*): Set target_gtfiles to
$(srcdir)/config/i386/winnt.c.
(i[34567]86-*-pe | i[34567]86-*-cygwin*): Likewise.
(i[34567]86-*-uwin*): Likewise.
*i[34567]86-*-interix3*): Likewise.
* config.host (i[34567]86-*-mingw32*): Set out_host_hook_obj.
* config/i386/host-mingw32.c: New file.
* config/i386/x-mingw32: Add rule for host-mingw32.o.
* config/i386/winnt.c: (struct extern_list) Tag as GTY.
(extern_head): Likewise.
(struct export_list) Likewise.
(export_head): Likewise.
(i386_pe_record_external_function): Use ggc_alloc.
(i386_pe_record_exported_symbol): Likewise.
Include "gt-winnt.h" at end.
* doc/hostconfig.texi: Document
HOST_HOOKS_GT_PCH_ALLOC_GRANULARITY.
2004-03-10 Richard Henderson <rth@redhat.com>
* c-pch.c (c_common_no_more_pch): Update for gt_pch_use_address
extra arguments.
* hosthooks.h (struct host_hooks): Update gt_pch_get_address
and gt_pch_use_address.
* doc/hostconfig.texi: Update docs.
* config/rs6000/host-darwin.c (darwin_rs6000_gt_pch_get_address):
Update for changed definition.
(darwin_rs6000_gt_pch_use_address): Likewise.
2004-03-04 Ian Lance Taylor <ian@wasabisystems.com>
* ggc-common.c (gt_pch_restore): Don't unmap addr unless we are
going to call mmap again. Read the file into the right place.
Give a fatal error if we have to relocate.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl-gxxpro-3_4-branch@119868 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/config')
0 files changed, 0 insertions, 0 deletions