Skip to content

Commit

Permalink
eclass: install pkg/linux_{amd64,arm64} only for 1.19 or older
Browse files Browse the repository at this point in the history
Since Go 1.20 stopped shipping pre-compiled package archives for the
standard library in $GOROOT/pkg, it became impossible to install
pkg/linux_{amd64,arm64} for every version. To avoid build failure,
install the library if the Go slot number is 1.19 or older.

Also depend on go-bootstrap 1.17.13 or newer.

See also https://go.dev/doc/go1.20.
  • Loading branch information
dongsupark authored and sayanchowdhury committed May 29, 2023
1 parent 886cdf4 commit 1d2ea91
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ IUSE=""

RDEPEND="app-eselect/eselect-go"
DEPEND="${RDEPEND}
>=dev-lang/go-bootstrap-1.5.3"
>=dev-lang/go-bootstrap-1.17.13"

# These test data objects have writable/executable stacks.
QA_EXECSTACK="usr/lib/go${GOSLOT}/src/debug/elf/testdata/*.obj"
Expand Down Expand Up @@ -100,7 +100,12 @@ coreos-go-lang_src_install() {
insinto "/usr/lib/go${GOSLOT}"
doins -r doc lib src
insinto "/usr/lib/go${GOSLOT}/pkg"
doins -r "pkg/include" "pkg/$(go_tuple)"
doins -r "pkg/include"

# Install pkg/linux_{amd64,arm64} only for Go <= 1.19, as Go 1.20+
# does not ship pre-compiled package archives for the standard library
# in $GOROOT/pkg. See https://go.dev/doc/go1.20.
ver_test "${GOSLOT}" -lt 1.20 && doins -r "pkg/$(go_tuple)"

dodoc CONTRIBUTING.md PATENTS README.md
}
Expand Down

0 comments on commit 1d2ea91

Please sign in to comment.