[Bug c/96362] New: bootstrapping gcc 9.3.0 on sparc-sun-solaris2.11 fails compiling libgcc2.c (.group in output)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96362 Bug ID: 96362 Summary: bootstrapping gcc 9.3.0 on sparc-sun-solaris2.11 fails compiling libgcc2.c (.group in output) Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: nicholas.h.briggs at gmail dot com Target Milestone: --- Created attachment 48947 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48947&action=edit Intermediate output from gcc-9.3.0 compiling libgcc2 during bootstrap Attempting to bootstrap gcc 9.3.0 (and same problem with gcc 10.2.0) on sparc-sun-solaris2.11 system fails at the point of compiling libgcc2.c for _ffssi2 as the compiler generates a .group directive which is not understood by the binutils-2.35 as. Configured with: '../gcc/configure' '--prefix=/opt/gcc-9.3' '--disable-werror' '--disable-checking' 'CC=gcc' 'CXX=g++' '--disable-multilib' '--build=sparc-sun-solaris2.11' 'buil d_alias=sparc-sun-solaris2.11' '--enable-languages=c,c++,lto' Where it attempts to execute: /export/home/briggs/gcc-9.3-objdir/./gcc/xgcc -B/export/home/briggs/gcc-9.3-objdir/./gcc/ -B/opt/gcc-9.3/sparc-sun-solaris2.11/bin/ -B/opt/gcc-9.3/sparc-sun-solaris2.11/lib/ -isystem /opt/gcc-9.3/sparc-sun-solaris2.11/include -isystem /opt/gcc-9.3/sparc-sun-solaris2.11/sys-include -fno-checking -g -O2 -O2 -g -O2 -DIN_GCC-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fPIC -I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/. -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include -DHAVE_CC_TLS -o _ffssi2.o -MT _ffssi2.o -MD -MP -MF _ffssi2.dep -DL_ffssi2 -c ../../../gcc/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS it fails with _ffssi2.s: Assembler messages: _ffssi2.s:1536: Error: unknown pseudo-op: `.group' The complete _ffssi2.i and _ffssi2.s are attached. The problematic section in the _ffssi2.s is: .LLASF11: .asciz "__seekable" .ident "GCC: (GNU) 9.3.0" .section ".text.__sparc_get_pc_thunk.l7%__sparc_get_pc_thunk.l7",#alloc,#execinstr,#progbits .group __sparc_get_pc_thunk.l7,".text.__sparc_get_pc_thunk.l7%__sparc_get_pc_thunk.l7",#comdat .align 4 .weak __sparc_get_pc_thunk.l7 .hidden __sparc_get_pc_thunk.l7 .type __sparc_get_pc_thunk.l7, #function .proc 020 __sparc_get_pc_thunk.l7: .cfi_startproc jmp %o7+8 add%o7, %l7, %l7 .cfi_endproc
[Bug c/96362] bootstrapping gcc 9.3.0 on sparc-sun-solaris2.11 fails compiling libgcc2.c (.group in output)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96362 --- Comment #1 from Nick Briggs --- Created attachment 48948 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48948&action=edit Intermediate output from gcc-9.3.0 compiling libgcc2 during bootstrap
[Bug c/96362] bootstrapping gcc 9.3.0 on sparc-sun-solaris2.11 fails compiling libgcc2.c (.group in output)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96362 --- Comment #2 from Nick Briggs --- binutils/as version is: /opt/binutils/bin/as --version GNU assembler (GNU Binutils) 2.35 Copyright (C) 2020 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or later. This program has absolutely no warranty. This assembler was configured for a target of `sparc-sun-solaris2.11'.
[Bug target/96362] bootstrapping gcc 9.3.0 on sparc-sun-solaris2.11 fails compiling libgcc2.c (.group in output)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96362 --- Comment #3 from Nick Briggs --- Could not configuring with "--with-gnu-as" have caused this? Also, since it seems to be related to COMDAT, would "--disable-comdat" (if such an option exists, since only --enable-comdat is documented) have avoided this?
[Bug target/96362] bootstrapping gcc 9.3.0 on sparc-sun-solaris2.11 fails compiling libgcc2.c (.group in output)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96362 --- Comment #6 from Nick Briggs --- Perhaps the info at https://gcc.gnu.org/install/specific.html could be updated in the sparc*solaris section to include the notes about gnu as in the same way that the x86*solaris section mentions it?
[Bug bootstrap/96378] New: ICE: Solaris/SPARCv9 bootstrap stage2 segfault compiling stdc++.h.gch/O2ggnu++0x.gch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96378 Bug ID: 96378 Summary: ICE: Solaris/SPARCv9 bootstrap stage2 segfault compiling stdc++.h.gch/O2ggnu++0x.gch Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: nicholas.h.briggs at gmail dot com Target Milestone: --- Created attachment 48952 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48952&action=edit Failing preprocessed source Configured as: ~/gcc-10.2-objdir$ ../gcc/configure prefix=/opt/gcc-10.2 --disable-werror --disable-checking CC=gcc CXX=g++ --disable-multilib --build=sparcv9-sun-solaris2.11 --with-gnu-as --with-as=/opt/binutils/bin/as --without-gnu-ld --with-ld=/usr/bin/ld --enable-languages=c,c++,lto $ gcc --version gcc (GCC) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ /opt/binutils/bin/as --version GNU assembler (GNU Binutils) 2.35 Copyright (C) 2020 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or later. This program has absolutely no warranty. This assembler was configured for a target of `sparc-sun-solaris2.11'. $ /usr/bin/ld -V ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.3159 Bootstrap fails at /export/home/briggs/gcc-10.2-objdir/./gcc/xgcc -shared-libgcc -B/export/home/briggs/gcc-10.2-objdir/./gcc -nostdinc++ -L/export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/src -L/export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/src/.libs -L/export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/libsupc++/.libs -B/opt/gcc-10.2/sparcv9-sun-solaris2.11/bin/ -B/opt/gcc-10.2/sparcv9-sun-solaris2.11/lib/ -isystem /opt/gcc-10.2/sparcv9-sun-solaris2.11/include -isystem /opt/gcc-10.2/sparcv9-sun-solaris2.11/sys-include -fno-checking -x c++-header -nostdinc++ -g -O2 -I/export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/sparcv9-sun-solaris2.11 -I/export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include -I/export/home/briggs/gcc/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x /export/home/briggs/gcc/libstdc++-v3/include/precompiled/stdc++.h \ -o sparcv9-sun-solaris2.11/bits/stdc++.h.gch/O2ggnu++0x.gch with In file included from /export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/bits/localefwd.h:40, from /export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/ios:41, from /export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/istream:38, from /export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/sstream:38, from /export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/complex:45, from /export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/ccomplex:39, from /export/home/briggs/gcc/libstdc++-v3/include/precompiled/stdc++.h:54: /export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/sparcv9-sun-solaris2.11/bits/c++locale.h: In function ‘int std::__convert_from_v(int* const&, char*, int, const char*, ...)’: /export/home/briggs/gcc-10.2-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/sparcv9-sun-solaris2.11/bits/c++locale.h:60:47: internal compiler error: Segmentation Fault 60 | char* __old = std::setlocale(LC_NUMERIC, 0); | ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. gmake[5]: *** [Makefile:1825: sparcv9-sun-solaris2.11/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1 gmake[4]: *** [Makefile:563: all-recursive] Error 1 gmake[3]: *** [Makefile:488: all] Error 2 gmake[2]: *** [Makefile:20026: all-stage2-target-libstdc++-v3] Error 2 gmake[1]: *** [Makefile:27159: stage2-bubble] Error 2 gmake: *** [Makefile:27403: bootstrap] Error 2
[Bug bootstrap/96378] ICE: Solaris/SPARCv9 bootstrap stage2 segfault compiling stdc++.h.gch/O2ggnu++0x.gch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96378 --- Comment #2 from Nick Briggs --- The initial gcc is: $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/gcc/7/lib/gcc/sparcv9-solaris2.11/7.3.0/lto-wrapper Target: sparcv9-solaris2.11 Configured with: /builds/ulhg/workspace/Solaris_11u4/Userland/full-build/02b-build-sparc/components/gcc7/gcc-7.3.0/configure --prefix=/usr/gcc/7 --mandir=/usr/gcc/7/share/man --bindir=/usr/gcc/7/bin --sbindir=/usr/gcc/7/sbin --libdir=/usr/gcc/7/lib --infodir=/usr/gcc/7/share/info --libexecdir=/usr/gcc/7/lib --enable-languages=c,c++,fortran,objc --enable-shared --enable-initfini-array --disable-rpath --with-system-zlib --with-build-config=no --with-gmp-include=/usr/include --with-mpfr-include=/usr/include --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/usr/gnu/bin/as --disable-bootstrap 'BOOT_CFLAGS=-g -O2' sparcv9-solaris2.11 Thread model: posix gcc version 7.3.0 (GCC)
[Bug bootstrap/96378] ICE: Solaris/SPARCv9 bootstrap stage2 segfault compiling stdc++.h.gch/O2ggnu++0x.gch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96378 --- Comment #3 from Nick Briggs --- This is still a problem, tested at commit 217d5beaff9987a9845155fc796322b5f8bb876d, Dec 17th, 2020 Starting with the same gcc (7.3.0) as before, but invoked with CC="gcc -m64" to make sure that we're building with a 64-bit toolchain -- leads to: /export/home/briggs/gcc-master-objdir/./gcc/xgcc -shared-libgcc -B/export/home/briggs/gcc-master-objdir/./gcc -nostdinc++ -L/export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/src -L/export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/src/.libs -L/export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/libsupc++/.libs -B/opt/gcc/sparcv9-sun-solaris2.11/bin/ -B/opt/gcc/sparcv9-sun-solaris2.11/lib/ -isystem /opt/gcc/sparcv9-sun-solaris2.11/include -isystem /opt/gcc/sparcv9-sun-solaris2.11/sys-include -fno-checking -x c++-header -nostdinc++ -g -O2 -I/export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/sparcv9-sun-solaris2.11 -I/export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include -I/export/home/briggs/gcc-master/libstdc++-v3/libsupc++ -O2 -g /export/home/briggs/gcc-master/libstdc++-v3/include/precompiled/stdc++.h -o sparcv9-sun-solaris2.11/bits/stdc++.h.gch/O2g.gch In file included from /export/home/briggs/gcc-master/libstdc++-v3/libsupc++/exception:147, from /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/ios:39, from /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/istream:38, from /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/sstream:38, from /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/complex:45, from /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/ccomplex:39, from /export/home/briggs/gcc-master/libstdc++-v3/include/precompiled/stdc++.h:54: /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/bits/exception_ptr.h: In member function ‘void std::__exception_ptr::exception_ptr::swap(std::__exception_ptr::exception_ptr&)’: /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/bits/exception_ptr.h:211:21: internal compiler error: Segmentation Fault 211 | void *__tmp = _M_exception_object; | ^~~ In file included from /export/home/briggs/gcc-master/libstdc++-v3/libsupc++/exception:147, from /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/ios:39, from /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/istream:38, from /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/sstream:38, from /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/complex:45, from /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/ccomplex:39, from /export/home/briggs/gcc-master/libstdc++-v3/include/precompiled/stdc++.h:54: /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/bits/exception_ptr.h: In member function ‘void std::__exception_ptr::exception_ptr::swap(std::__exception_ptr::exception_ptr&)’: /export/home/briggs/gcc-master-objdir/sparcv9-sun-solaris2.11/libstdc++-v3/include/bits/exception_ptr.h:211:21: internal compiler error: Segmentation Fault 211 | void *__tmp = _M_exception_object; | ^~~ 0x100bfec5f crash_signal ../../gcc-master/gcc/toplev.c:327 0x1006dddc0 complete_array_type(tree_node**, tree_node*, bool) ../../gcc-master/gcc/c-family/c-common.c:6680 0x1004fcb07 cp_complete_array_type(tree_node**, tree_node*, bool) ../../gcc-master/gcc/cp/decl.c:9247 0x1004fdedb cp_complete_array_type_or_error(tree_node**, tree_node*, bool, int) ../../gcc-master/gcc/cp/decl.c:9278 0x1004fd227 check_initializer ../../gcc-master/gcc/cp/decl.c:7024 0x10051553b cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc-master/gcc/cp/decl.c:7942 0x1005f5bdf cp_parser_init_declarator ../../gcc-master/gcc/cp/parser.c:21788 0x1005cf153 cp_parser_simple_declaration ../../gcc-master/gcc/cp/parser.c:14368 0x1005d1427 cp_parser_declaration_statement ../../gcc-master/gcc/cp/parser.c:13512 0x1005d1aaf cp_parser_statement ../../gcc-master/gcc/cp/parser.c:11736 0x1005d343b cp_parser_statement_seq_opt ../../gcc-master/gcc/cp/parser.c:12102 0x1005d3527 cp_parser_compound_statement ../../gcc-master/gcc/cp/parser.c:12052 0x1005f3807 cp_parser_function_body ../../gcc-maste
[Bug bootstrap/96378] ICE: Solaris/SPARCv9 bootstrap stage2 segfault compiling stdc++.h.gch/O2ggnu++0x.gch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96378 --- Comment #5 from Nick Briggs --- Thanks! configuring with --enable-checking=release allowed it to compile. The final configure that I used was: ../gcc-master/configure prefix=/opt/gcc --disable-werror --enable-checking=release CC="gcc -m64" CXX="g++ -m64" --build=sparcv9-sun-solaris2.11 --with-gnu-as --with-as=/opt/bin utils/bin/as --without-gnu-ld --with-ld=/usr/bin/ld build_alias=sparcv9-sun-solaris2.11 --enable-languages=c There was one hiccup -- the install step wants to compile: g++ -m64 -std=c++11 -fno-PIE -c -DIN_GCC_FRONTEND -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc-master/gcc -I../../gcc-master/gcc/. -I../../gcc-master/gcc/../include -I../../gcc-master/gcc/../libcpp/include -I../../gcc-master/gcc/../libcody -I/export/home/briggs/gcc-master-objdir/./gmp -I/export/home/briggs/gcc-master/gmp -I/export/home/briggs/gcc-master-objdir/./mpfr/src -I/export/home/briggs/gcc-master/mpfr/src -I/export/home/briggs/gcc-master/mpc/src -I../../gcc-master/gcc/../libdecnumber -I../../gcc-master/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-master/gcc/../libbacktrace -I/export/home/briggs/gcc-master-objdir/./isl/include -I/export/home/briggs/gcc-master/isl/include -o cc1-checksum.o -MT cc1-checksum.o -MMD -MP -MF ./.deps/cc1-checksum.TPo cc1-checksum.c cc1plus: error: -Werror=format-diag: no option -Wformat-diag however it appears to be using whatever g++ was already installed, and that g++ (7.3.0) is too old to know "-Wno-error=format-diag". The answer was to "gmake -i install" which managed to get a new g++ installed, and then "gmake install" again with the new g++ on the path to get an error-free install. Final result is: $ /opt/gcc/bin/gcc -v Using built-in specs. COLLECT_GCC=/opt/gcc/bin/gcc COLLECT_LTO_WRAPPER=/opt/gcc/libexec/gcc/sparcv9-sun-solaris2.11/11.0.0/lto-wrapper Target: sparcv9-sun-solaris2.11 Configured with: ../gcc-master/configure prefix=/opt/gcc --disable-werror --enable-checking=release CC='gcc -m64' CXX='g++ -m64' --build=sparcv9-sun-solaris2.11 --with-gnu-as --with-as=/opt/binutils/bin/as --without-gnu-ld --with-ld=/usr/bin/ld build_alias=sparcv9-sun-solaris2.11 --enable-languages=c Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20201217 (experimental) (GCC)