GO-ENV.ECLASS

Section: eclass-manpages (5)
Updated: Nov 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.

SUPPORTED EAPIS

7 8

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_goos [toolchain prefix]
Returns the appropriate GOOS setting for the target operating system.
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 <[email protected]>

MAINTAINERS

Flatcar Linux Maintainers <[email protected]>

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
SUPPORTED EAPIS
FUNCTIONS
AUTHORS
MAINTAINERS
REPORTING BUGS
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:27:01 GMT, November 25, 2024