Skip to content

cmd/internal/notsha256: fails to bootstrap with gccgo #53662

@zhsj

Description

@zhsj

What version of Go are you using (go version)?

$ go version
go version unknown linux/amd64

It is gccgo-12.

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/zhsj/.cache/go-build"
GOENV="/home/zhsj/.config/go/env"
GOEXE=""
GOEXPERIMENT="fieldtrack,regabiwrappers"
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/zhsj/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/zhsj/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn"
GOROOT="/usr"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/gcc/x86_64-linux-gnu/12"
GOVCS=""
GOVERSION="unknown"
GCCGO="/usr/bin/x86_64-linux-gnu-gccgo-12"
GOAMD64="v1"
AR="ar"
CC="x86_64-linux-gnu-gcc-12"
CXX="x86_64-linux-gnu-g++-12"
CGO_ENABLED="1"
GOMOD="/tmp/t/go1.19/go/src/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2117576764=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

What did you do?

zhsj@debian:/tmp/t/go1.19/go/src$ GOROOT_BOOTSTRAP=/usr/local ./make.bash 
Building Go cmd/dist using /usr/local. (unknown linux/amd64)
Building Go toolchain1 using /usr/local.
# bootstrap/cmd/internal/notsha256
cmd/internal/notsha256/sha256block_amd64.s:9:10: fatal error: textflag.h: No such file or directory
    9 | #include "textflag.h"
      |          ^~~~~~~~~~~~
compilation terminated.
go tool dist: FAILED: /usr/local/bin/go install -gcflags=-l -tags=math_big_pure_go compiler_bootstrap bootstrap/cmd/...: exit status 2

What did you expect to see?

Can bootstrap go1.19 with gccgo.

What did you see instead?

Compile error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions