There are so many reasons I want to upgrade the os from fc21 to anything more recent, but unfortunately I can't.
I'm just trying to build the latest golang using the following:
GOPATH=/root/Code
GOROOT=/root/loongson-golang
root@sunhaiyong:~/Code/src/
github.com/omac777# go version
go version xgcc (GCC) 4.9.3 20150626 (Red Hat 4.9.3-3) linux/mipsn64
GOROOT_BOOTSTRAP=/root/loongson-golang ./all.bash
##### Building Go bootstrap tool.
cmd/dist
# _/root/go/src/cmd/dist
cmd/dist/test.go:183:5: error: reference to undefined identifier ‘os.Unsetenv’
os.Unsetenv("GOROOT_FINAL")
^
cmd/dist/build.go:127:6: error: reference to undefined name ‘cansse2’
if cansse2() {
^
cmd/dist/util.go:493:3: error: reference to undefined name ‘useVFPv1’
useVFPv1() // might fail with SIGILL
^
cmd/dist/util.go:495:3: error: reference to undefined name ‘useVFPv3’
useVFPv3() // might fail with SIGILL
^
root@sunhaiyong:~/Code/src/
github.com/omac777# uname -a
Linux sunhaiyong 4.1.19-1.fc21.loongson.1.mips64el #1 SMP PREEMPT Tue Mar 8 07:47:34 UTC 2016 mips64 mips64 mips64 GNU/Linux
root@sunhaiyong:~/Code/src/
github.com/omac777# go build -x -v -v -work -ccflags '-v' -gccgoflags -v hello.go
WORK=/tmp/go-build218067275
command-line-arguments
mkdir -p $WORK/command-line-arguments/_obj/
cd /root/Code/src/
github.com/omac777gccgo
-I $WORK -c -g
-fgo-relative-import-path=_/root/Code/src/
github.com/omac777 -o
$WORK/command-line-arguments/_obj/main.o -v ./hello.go
# command-line-arguments
Using built-in specs.
COLLECT_GCC=gccgo
Target: mips64el-redhat-linux
Configured
with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=
http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--enable-multilib --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id
--enable-languages=c,c++,objc,obj-c++,fortran,go,lto --enable-plugin
--enable-initfini-array --disable-libgcj
--with-isl=/root/rpmbuild/BUILD/gcc-4.9.3/obj-mips64el-redhat-linux/isl-install
--with-cloog=/root/rpmbuild/BUILD/gcc-4.9.3/obj-mips64el-redhat-linux/cloog-install
--enable-gnu-indirect-function --with-long-double-128
--build=mips64el-redhat-linux
Thread model: posix
gcc version 4.9.3 20150626 (Red Hat 4.9.3-3) (GCC)
COLLECT_GCC_OPTIONS='-I'
'/tmp/go-build218067275' '-c' '-g'
'-fgo-relative-import-path=_/root/Code/src/
github.com/omac777' '-o'
'/tmp/go-build218067275/command-line-arguments/_obj/main.o' '-v'
'-shared-libgcc' '-mllsc' '-mno-shared' '-EL' '-mabi=64'
/usr/libexec/gcc/mips64el-redhat-linux/4.9.3/go1
./hello.go -mel -quiet -dumpbase hello.go -mllsc -mno-shared -mabi=64
-auxbase-strip $WORK/command-line-arguments/_obj/main.o -g -version
-fgo-relative-import-path=_/root/Code/src/
github.com/omac777 -I $WORK
-L/usr/lib/gcc/mips64el-redhat-linux/4.9.3
-L/usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../.. -o /tmp/ccbkllV8.s
GNU Go (GCC) version 4.9.3 20150626 (Red Hat 4.9.3-3) (mips64el-redhat-linux)
compiled by GNU C version 4.9.3 20150626 (Red Hat 4.9.3-3), GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Go (GCC) version 4.9.3 20150626 (Red Hat 4.9.3-3) (mips64el-redhat-linux)
compiled by GNU C version 4.9.3 20150626 (Red Hat 4.9.3-3), GMP version 6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-I'
'/tmp/go-build218067275' '-c' '-g'
'-fgo-relative-import-path=_/root/Code/src/
github.com/omac777' '-o'
'/tmp/go-build218067275/command-line-arguments/_obj/main.o' '-v'
'-shared-libgcc' '-mllsc' '-mno-shared' '-EL' '-mabi=64'
as -v -I $WORK -EL -O1 -g -no-mdebug -mabi=64 -mno-shared -KPIC -o $WORK/command-line-arguments/_obj/main.o /tmp/ccbkllV8.s
GNU assembler version 2.24 (mips64el-redhat-linux) using BFD version version 2.24
COMPILER_PATH=/usr/libexec/gcc/mips64el-redhat-linux/4.9.3/:/usr/libexec/gcc/mips64el-redhat-linux/4.9.3/:/usr/libexec/gcc/mips64el-redhat-linux/:/usr/lib/gcc/mips64el-redhat-linux/4.9.3/:/usr/lib/gcc/mips64el-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/mips64el-redhat-linux/4.9.3/:/usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-I'
'/tmp/go-build218067275' '-c' '-g'
'-fgo-relative-import-path=_/root/Code/src/
github.com/omac777' '-o'
'/tmp/go-build218067275/command-line-arguments/_obj/main.o' '-v'
'-shared-libgcc' '-mllsc' '-mno-shared' '-EL' '-mabi=64'
ar cru $WORK/libcommand-line-arguments.a $WORK/command-line-arguments/_obj/main.o
cd .
gccgo -o hello $WORK/command-line-arguments/_obj/main.o -Wl,-( -Wl,-) -v
# command-line-arguments
Using built-in specs.
COLLECT_GCC=gccgo
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/mips64el-redhat-linux/4.9.3/lto-wrapper
Target: mips64el-redhat-linux
Configured
with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=
http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--enable-multilib --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id
--enable-languages=c,c++,objc,obj-c++,fortran,go,lto --enable-plugin
--enable-initfini-array --disable-libgcj
--with-isl=/root/rpmbuild/BUILD/gcc-4.9.3/obj-mips64el-redhat-linux/isl-install
--with-cloog=/root/rpmbuild/BUILD/gcc-4.9.3/obj-mips64el-redhat-linux/cloog-install
--enable-gnu-indirect-function --with-long-double-128
--build=mips64el-redhat-linux
Thread model: posix
gcc version 4.9.3 20150626 (Red Hat 4.9.3-3) (GCC)
COMPILER_PATH=/usr/libexec/gcc/mips64el-redhat-linux/4.9.3/:/usr/libexec/gcc/mips64el-redhat-linux/4.9.3/:/usr/libexec/gcc/mips64el-redhat-linux/:/usr/lib/gcc/mips64el-redhat-linux/4.9.3/:/usr/lib/gcc/mips64el-redhat-linux/
LIBRARY_PATH=/usr/lib/gcc/mips64el-redhat-linux/4.9.3/:/usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-o' 'hello' '-v' '-shared-libgcc' '-mllsc' '-mno-shared' '-EL' '-mabi=64'
/usr/libexec/gcc/mips64el-redhat-linux/4.9.3/collect2
-plugin /usr/libexec/gcc/mips64el-redhat-linux/4.9.3/liblto_plugin.so
-plugin-opt=/usr/libexec/gcc/mips64el-redhat-linux/4.9.3/lto-wrapper
-plugin-opt=-fresolution=/tmp/cc7OdiyK.res
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s
-plugin-opt=-pass-through=-lgcc --build-id --no-add-needed
--eh-frame-hdr -EL -EL -dynamic-linker /lib64/ld.so.1 -melf64ltsmip -o
hello /usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../../../lib64/crt1.o
/usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../../../lib64/crti.o
/usr/lib/gcc/mips64el-redhat-linux/4.9.3/crtbegin.o
-L/usr/lib/gcc/mips64el-redhat-linux/4.9.3
-L/usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../..
$WORK/command-line-arguments/_obj/main.o -( -) -lgobegin -lgo -lm
-lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/lib/gcc/mips64el-redhat-linux/4.9.3/crtend.o
/usr/lib/gcc/mips64el-redhat-linux/4.9.3/../../../../lib64/crtn.o