https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120905
Bug ID: 120905 Summary: Unable to compile GCC 6.5.0 with GCC 5.5.0 on Solaris 10 SPARC (linker error?) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: tch at protonmail dot com Target Milestone: --- Created attachment 61774 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61774&action=edit Logfiles, version output and patch Hello there. I am trying to compile GCC 6.5.0 with GCC 5.5.0 for Solaris 10 ('uname -a': "SunOS Blade 5.10 Generic_141444-09 sun4u sparc SUNW,Sun-Blade-100") on a SPARC machine (a Blade 100) and it fails by the linker error message of: "ld: fatal: file elf64_sparc: open failed: No such file or directory". The only place on the net i found this error message is another GCC bugticket - namely #30819 - but the solution there did not work for me. GCC 5.5.0 and Binutils 2.26 are installed from the OpenCSW repository. (Version info has been attached.) Before running './configure', i had set '$CONFIG_SHELL' by 'export CONFIG_SHELL=$SHELL' just as told in the other bugticket. The shell is 'bash' 5.2.26 from the OpenCSW repository. It is set as the default shell in '/etc/passwd' and it is in the envvar '$SHELL'. The following './configure' command was issued from the directory '/gcc6': '../gcc-6.5.0/configure --prefix=/opt/gcc6 --build=sparc-sun-solaris2.10 --with-gnu-as --with-gnu-ld --enable-shared --disable-nls --enable-languages=c,c++,objc' GCC6 source had to be modified a bit to be able to compile it, because the macros 'NAN' and 'INFINITY' are resolved to functions on Solaris. (Long story, please check [https://github.com/python/cpython/issues/136006] for details, if seems relevant to the matter at hand.) Patch is attached. (Although due to the simplicity of the modification, patching is not really necessary: just open 'libiberty/floatformat.c' and change 'NAN' to 'NAN("0x7fc00000")' and 'INFINITY' to 'INFINITY()'.) Also attached the outputs of './configure' and 'make' and attached the logfile 'config.log'. I am not sure if this is my fault or a bug and if it is, then which component's bug it is; Binutils, GCC itself, shell, etc... Please tell me if anything else is needed to be provided.