-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/dist: detect FPUless ARMv7 platforms? #23274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The Go toolchain doesn’t expect v7 implementations to lack vfpv3 so your best bet, without patching the compiler, is to
export GOARM=5
To disable the use of hard fp
… On 29 Dec 2017, at 08:22, alllexx88 ***@***.***> wrote:
Hi,
I'm trying to build Go on an FPUless ARMv7 platform:
***@***.*** src]$ cat /proc/cpuinfo
Processor : ARMv7 Processor rev 0 (v7l)
processor : 0
BogoMIPS : 1599.07
processor : 1
BogoMIPS : 1595.80
Features : swp half thumb fastmult edsp
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc09
CPU revision : 0
Hardware : Northstar Prototype
Revision : 0000
Serial : 0000000000000000
gccgo-go from GCC-7.2.0 is used as the bootstrap toolchain:
***@***.*** src]$ go version
go version go1.8.1 arm-buildroot-linux-uclibcgnueabi-gccgo (Buildroot 2017.08-g56f1bab-dirty) 7.2.0 linux/arm
***@***.*** src]$ go env
GOARCH="arm"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/opt"
GOTOOLDIR="/opt/libexec/gcc/arm-buildroot-linux-uclibcgnueabi/7.2.0"
GCCGO="/opt/bin/gccgo"
GOARM=""
CC="/opt/bin/gcc"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build935653095=/tmp/go-build -gno-record-gcc-switches"
CXX="/opt/bin/g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
I tried both go1.9.2 and master branch. Here's build log for the latter:
***@***.*** src]$ GOROOT_FINAL=/opt/local CGO_ENABLED=1 GOROOT_BOOTSTRAP=/opt ./make.bash
Building Go cmd/dist using /opt.
Building Go toolchain1 using /opt.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
go tool dist: FAILED: /opt/src/golang/pkg/tool/linux_arm/go_bootstrap install -gcflags=all= -ldflags=all= -i cmd/asm cmd/cgo cmd/compile cmd/link: signal: Illegal instruction
And here's a gdb log:
***@***.*** src]$ gdb /opt/src/golang/pkg/tool/linux_arm/go_bootstrap
GNU gdb (GDB) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /opt/src/golang/pkg/tool/linux_arm/go_bootstrap...done.
warning: Unsupported auto-load script at offset 0 in section .debug_gdb_scripts
of file /opt/src/golang/pkg/tool/linux_arm/go_bootstrap.
Use `info auto-load python-scripts [REGEXP]' to list them.
(gdb) run
Starting program: /opt/src/golang/pkg/tool/linux_arm/go_bootstrap
Program received signal SIGILL, Illegal instruction.
runtime.check () at /opt/local/src/runtime/runtime1.go:146
146 i, i1 float32
(gdb) bt full
#0 runtime.check () at /opt/local/src/runtime/runtime1.go:146
e = 0
i = 0
j = 0
k = 0x0
m = "\000\000\000"
z = 0
#1 0x00062e94 in runtime.rt0_go () at /opt/local/src/runtime/asm_arm.s:149
No locals.
#2 0x00000000 in ?? ()
No symbol table info available.
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
The line /opt/local/src/runtime/asm_arm.s:149 is:
BL runtime·check(SB)
In go1.9.2 it crashes on BL runtime·check(SB) as well.
I should also note that uClibc-ng 1.0.27 is used as the libc.
Regards,
Alex
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
It works as a workaround, thank you! It'd be good for this to be detected automatically, at least during a native build |
cmd/dist can and probably should check for this. I thought that's what it already did for GOARM detection, but maybe the detection needs refining. |
Hi,
I'm trying to build Go on an FPUless ARMv7 platform:
gccgo-go
from GCC-7.2.0 is used as the bootstrap toolchain:I tried both
go1.9.2
andmaster
branch. Here's build log for the latter:And here's a
gdb
log:The line
/opt/local/src/runtime/asm_arm.s:149
is:In
go1.9.2
it crashes onBL runtime·check(SB)
as well.I should also note that uClibc-ng 1.0.27 is used as the libc.
Regards,
Alex
The text was updated successfully, but these errors were encountered: