GO-ENV.ECLASS

Section: eclass-manpages (5)
Updated: Jun 2024
Index Return to Main Contents

NAME

go-env.eclass - Helper eclass for setting the Go compile environment. Required for cross-compiling.

DESCRIPTION

This eclass includes helper functions for setting the compile environment for Go ebuilds. Intended to be called by other Go eclasses in an early build stage, e.g. src_unpack.

FUNCTIONS

go-env_set_compile_environment
Set up basic compile environment: CC, CXX, and GOARCH. Necessary platform-specific settings such as GOARM or GO386 are also set according to the Portage configuration when building for those architectures. Also carry over CFLAGS, LDFLAGS and friends. Required for cross-compiling with crossdev. If not set, host defaults will be used and the resulting binaries are host arch. (e.g. "emerge-aarch64-cross-linux-gnu foo" run on x86_64 will emerge "foo" for x86_64
 instead of aarch64)
go-env_goarch [toolchain prefix]
Returns the appropriate GOARCH setting for the target architecture.
go-env_go386
Returns the appropriate GO386 setting for the CFLAGS in use.
go-env_goarm [CHOST-value]
Returns the appropriate GOARM setting for the CHOST given, or the default CHOST.

AUTHORS

Flatcar Linux Maintainers <infra@flatcar-linux.org>

MAINTAINERS

Flatcar Linux Maintainers <infra@flatcar-linux.org>

REPORTING BUGS

Please report bugs via https://bugs.gentoo.org/

FILES

go-env.eclass

SEE ALSO

ebuild(5)
https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/go-env.eclass


Index

NAME
DESCRIPTION
FUNCTIONS
AUTHORS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:27:02 GMT, June 23, 2024