http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18469
--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- On Mon, 16 Dec 2013, ktietz at gcc dot gnu.org wrote: > The macros required in crtstuff.c are: > - HAVE_GAS_HIDDEN > - HAVE_LD_EH_FRAME_HDR Various target macros used in target code as well as host code should, I suggest at <http://gcc.gnu.org/wiki/Top-Level_Libgcc_Migration>, be handled via the compiler predefining macros if -fbuilding-libgcc, with those predefines being used in target code instead of the macros from host tm.h. (The exact list of host-side tm.h macros used in target code there may be out of date, but I expect it's still pretty close to what needs fixing to stop target code needing that host-side header.) I suggest the same solution for configure-determined macros used by target code: predefine something if -fbuilding-libgcc, and use that predefine in target code. That avoids duplicating the configure detection. I definitely encourage cleaning things up in this area to improve the host/target separation in the build system. I don't think any of the cases of target (or configure) macros used in target code are hard to fix; it just requires careful work on working out the right conversion for each of the many macros affected, making sure in every case that no files needing updating are missed out.