comparison gcc/doc/plugins.texi @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 @c Copyright (C) 2009-2018 Free Software Foundation, Inc. 1 @c Copyright (C) 2009-2020 Free Software Foundation, Inc.
2 @c Free Software Foundation, Inc. 2 @c Free Software Foundation, Inc.
3 @c This is part of the GCC manual. 3 @c This is part of the GCC manual.
4 @c For copying conditions, see the file gcc.texi. 4 @c For copying conditions, see the file gcc.texi.
5 5
6 @node Plugins 6 @node Plugins
329 the object is about to be collected. The @code{ggc_marked_p} function can be 329 the object is about to be collected. The @code{ggc_marked_p} function can be
330 used to tell if an object is marked, or is about to be collected. The 330 used to tell if an object is marked, or is about to be collected. The
331 @code{gt_clear_cache} overloads which some types define may also be of use in 331 @code{gt_clear_cache} overloads which some types define may also be of use in
332 managing weak references. 332 managing weak references.
333 333
334 Some plugins may need to add extra GGC root tables, e.g. to handle their own 334 Some plugins may need to add extra GGC root tables, e.g.@: to handle their own
335 @code{GTY}-ed data. This can be done with the @code{PLUGIN_REGISTER_GGC_ROOTS} 335 @code{GTY}-ed data. This can be done with the @code{PLUGIN_REGISTER_GGC_ROOTS}
336 pseudo-event with a null callback and the extra root table (of type @code{struct 336 pseudo-event with a null callback and the extra root table (of type @code{struct
337 ggc_root_tab*}) as @code{user_data}. Running the 337 ggc_root_tab*}) as @code{user_data}. Running the
338 @code{gengtype -p @var{source-dir} @var{file-list} @var{plugin*.c} ...} 338 @code{gengtype -p @var{source-dir} @var{file-list} @var{plugin*.c} ...}
339 utility generates these extra root tables. 339 utility generates these extra root tables.
469 469
470 @node Plugins building 470 @node Plugins building
471 @section Building GCC plugins 471 @section Building GCC plugins
472 472
473 If plugins are enabled, GCC installs the headers needed to build a 473 If plugins are enabled, GCC installs the headers needed to build a
474 plugin (somewhere in the installation tree, e.g. under 474 plugin (somewhere in the installation tree, e.g.@: under
475 @file{/usr/local}). In particular a @file{plugin/include} directory 475 @file{/usr/local}). In particular a @file{plugin/include} directory
476 is installed, containing all the header files needed to build plugins. 476 is installed, containing all the header files needed to build plugins.
477 477
478 On most systems, you can query this @code{plugin} directory by 478 On most systems, you can query this @code{plugin} directory by
479 invoking @command{gcc -print-file-name=plugin} (replace if needed 479 invoking @command{gcc -print-file-name=plugin} (replace if needed