The current build machinery in FSF gcc doesn't appear to provide a mechanism to install target specific .def files when install-plugin installs the header files. In particular, after applying... http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00610.html ...and building gcc trunk or gcc-4_5-branch on x86_64-apple-darwin10 with --enable-plugin, the file gcc/config/darwin-sections.def isn't installed in with the plugin headers. The other definition files installed are explicitly listed in PLUGIN_HEADERS of gcc/Makefile.in. I have tried adding darwin-sections.def to tm_include in config.gcc for darwin but this doesn't allow the file to be installed.
This breaks the installation of gcc-4.5 via macports. When trying to build anything which uses the plugin API, it can't find darwin-sections.def so you have to manually extract it from the tarball and sudo cp it to the installed macports directory to get the build working.
(In reply to Andrew Paprocki from comment #1) > This breaks the installation of gcc-4.5 via macports. When trying to build > anything which uses the plugin API, it can't find darwin-sections.def so you > have to manually extract it from the tarball and sudo cp it to the installed > macports directory to get the build working. Taking this as confirmation.
since this is at least somewhat Darwin-related, cc-ing Iain...
This seems to have been fixed by: commit 8b0210047962c7342d23a333703203690b76ba3d Author: Mike Stump <mikestump@comcast.net> Date: 2011-02-19 04:54:55 +0000 t-darwin (TM_H): Add dependency on on darwin-sections.def. * config/t-darwin (TM_H): Add dependency on on darwin-sections.def. I can confirm that darwin-sections.def is installed in the plugin include dir for and ---enable-plugin build on x86_64-darwin19, of gcc-9.4.1 which is the oldest open branch. closing as fixed.