https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64919
John Buddery <jvb at cyberscience dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvb at cyberscience dot com --- Comment #6 from John Buddery <jvb at cyberscience dot com> --- I had this issue as well, and here is the solution I used in case anyone is still interested. I believe it is caused by an HP-UX linker bug, the same one described by this comment and workaround in config/ia64/hpux.h: /* The HP-UX linker has a bug that causes calls from functions in .text.unlikely to functions in .text to cause a segfault. Until it is fixed, prevent code from being put into .text.unlikely or .text.hot. */ #define TARGET_ASM_FUNCTION_SECTION ia64_hpux_function_section While this workaround is sufficient for C code, unfortunately g++ can use multiple text sections for various different reasons when compiling c++ code (lookup Vague Linkage for details). This means g++ is broken on HP ia64, and gcc 4.8.0 build using g++, which is why the bootstrap now fails. The workaround I applied was to add the line: #undef MAKE_DECL_ONE_ONLY to gcc/config/ia64/hpux.h, below the lines I referenced above. This seems to prevent gcc from using .linkonce.t sections, and keeps the HP-UX linker happy. I've no idea if this is the correct solution, but it does produce a working g++. Unfortunately just applying this edit you your 4.9.2 sources and building isn't good enough, because it's your existing broken g++ which does the stage1 build. As far as I can tell all g++ versions available for download are broken, so you have to first download and build 4.7.4 or earlier, applying the same gcc/config/ia64/hpux.h as above. This version builds with gcc, not g++, so the bootstrap isn't a problem. Once you have a fixed 4.7.4 g++, you can then use that to bootstrap 4.9.2 - after again apply the hpux.h edit to the 4.9.2 sources. In my case when building 4.9.2 I also had to disable libgomp, but I think that's a different issue. Of course a much better solution to all this would be to get a fixed HP linker; but I can't even tell if any of the HP patches help as they don't seem to make these fixes generally available.