On Sun, May 23, 2021 at 3:57 AM Bagas Sanjaya <bagasdo...@gmail.com> wrote: > > Today I have built GCC 11.1.0 for use to bootstrap Go using gccgo. > I installed GCC to non-standard path, that is inside my home directory > (~/.ct-ng/tools/gcc-11.1.10) (sorry for typo when building GCC, I > meant gcc-11.1.0). > > `gcc -v` gave: > > > COLLECT_GCC=/home/bagas/.ct-ng/tools/gcc-11.1.10/bin/gcc > > COLLECT_LTO_WRAPPER=/home/bagas/.ct-ng/tools/gcc-11.1.10/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/lto-wrapper > > Target: x86_64-pc-linux-gnu > > Configured with: ../configure --prefix=/home/bagas/.ct-ng/tools/gcc-11.1.10 > > --disable-multilib --enable-languages=c,c++,go --enable-default-pie > > Thread model: posix > > Supported LTO compression algorithms: zlib > > gcc version 11.1.0 (GCC) > > Then I bootstrapped Go using gccgo from GCC 11.1.0. Because I installed > GCC to non-standard path, I had to add LD_LIBRARY_PATH when invoking > `make.bash`: > > ``` > $ LD_LIBRARY_PATH=/home/bagas/.ct-ng/tools/gcc-11.1.10/lib64 \ > GOROOT_BOOTSTRAP=/home/bagas/.ct-ng/tools/gcc-11.1.10 \ > ./make.bash > ``` > Bootstrapping process took about thirty minutes to complete. > > Note that LD_LIBRARY_PATH was required because `go` command from > gccgo was dynamically linked with supporting library `libgo.so`, > and the library was installed to non-standard path. > > However, on official installation from source instructions [1], gccgo > was assumed to be installed from distribution's package manager, > and thus was installed to standard path (/usr), so LD_LIBRARY_PATH > isn't required. > > Maybe the documentation should be updated to take into account > gccgo installations that are installed on non-standard paths > like my case above.
Thanks, but I think it's implied that if you want to use gccgo to bootstrap Go, then the gccgo installation has to work. I don't think we want to get into all possible details of how to get your gccgo installation to work. LD_LIBRARY_PATH is just one of many different possible issues. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUPbavzAnPV0B6yVe1SrFY%2BuRfOKdAHOJOE%2BUX2z8_S9A%40mail.gmail.com.