On Thu, Jun 6, 2024 at 7:13 AM Rainer Orth <r...@cebitec.uni-bielefeld.de> wrote: > > The Go testsuite's go.sum file ends in > > Couldn't determine version of > /var/gcc/regression/master/11.4-gcc-64/build/gcc/gccgo > > on Solaris. It turns out this happens because gccgo -v is confused: > > [...] > gcc version 15.0.0 20240531 (experimental) [master > a0d60660f2aae2d79685f73d568facb2397582d8] (GCC) > COMPILER_PATH=./:/usr/ccs/bin/ > LIBRARY_PATH=./:/lib/amd64/:/usr/lib/amd64/:/lib/:/usr/lib/ > COLLECT_GCC_OPTIONS='-g1' '-B' './' '-v' '-shared-libgcc' '-mtune=generic' > '-march=x86-64' '-dumpdir' 'a.' > ./collect2 -V -M ./libgcc-unwind.map -Qy /usr/lib/amd64/crt1.o ./crtp.o > /usr/lib/amd64/crti.o /usr/lib/amd64/values-Xa.o /usr/lib/amd64/values-xpg6.o > ./crtbegin.o -L. -L/lib/amd64 -L/usr/lib/amd64 -t -lgcc_s -lgcc -lc -lgcc_s > -lgcc ./crtend.o /usr/lib/amd64/crtn.o > ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.3297 > Undefined first referenced > symbol in file > main /usr/lib/amd64/crt1.o > ld: fatal: symbol referencing errors > collect2: error: ld returned 1 exit status > > trying to invoke the linker without adding any object file. This only > happens when Solaris ld is in use. gccgo passes -t to the linker in > that case, but does it unconditionally, even with -v. > > When configured to use GNU ld, gccgo -v is fine instead. > > This patch avoids this by restricting the -t to actually linking. > > Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11 (ld and gld). > > Ok for trunk? > > I believe this has to go via gofrontend, though. > > Raine > > -- > ----------------------------------------------------------------------------- > Rainer Orth, Center for Biotechnology, Bielefeld University > > > 2024-06-05 Rainer Orth <r...@cebitec.uni-bielefeld.de> > > gcc/go: > * gospec.cc (lang_specific_driver) [TARGET_SOLARIS !USE_GLD]: Only > add -t if linking.
This is OK. Thanks. You can just go ahead and commit this change. The files in the gcc/go directory itself live in the GCC tree. The files in gcc/go/gofrontend are copied in from a different repository. Ian