[Patch/RFC] Enable PCH for mingw32

Zack Weinberg zack@codesourcery.com
Mon May 31 21:39:00 GMT 2004


Geoff Keating <geoffk@geoffk.org> writes:
> Danny Smith <dannysmith@users.sourceforge.net> writes:
>> The list of undefined external functions are output by
>> winnt.c:i386_pe_file_end. I do not know how these directives are used by
>> GNU as, but they do not seem to be needed. In fact, if I undefine
>> ASM_OUTPUT_EXTERNAL (where the external symbols are saved into a list)
>> in cygming.h, I can still build working executables and dlls (and the
>> pch testsuite failures are resolved). Am I missing something or are
>> these end-of-file directives just for compatability with other
>> assemblers/linkers as suggested by this comment in winnt.c. 
...
> You probably want to fix this by adding appropriate GTY markers in
> winnt.c.  I expect that they are needed by some code, otherwise why
> would someone have gone to the effort of writing all that code?  Plus,
> it's worth it just so that the testsuite passes.

I had to fix similar bugs in the ia64 back end.  It looks like this
bug would be fixed by adding GTY(()) markers to struct extern_list,
struct export_list, extern_head, and export_head, and using ggc_alloc
instead of xmalloc in i386_pe_record_(external_function|exported_symbol).
You'll also have to do the "when you add GTY(()) markers to a file
that didn't previously have them" dance - see
http://gcc.gnu.org/onlinedocs/gccint/Files.html for instructions.

zw



More information about the Gcc-patches mailing list