# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/go/go-conf.in # Copyright (C) 2022 - 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2. # --- T2-COPYRIGHT-NOTE-END --- export GOCACHE=$builddir/gocache \ GOENV=$builddir/goenv \ GOPATH=$builddir/gopath \ TMPDIR="$builddir/tmp" \ GOFLAGS="-buildmode=pie -trimpath -mod=readonly -ldflags=-linkmode=external" \ CGO_ENABLED=1 # golang arches are different than T2s ARCH=$arch ENDIAN=$arch_bigendian case $ENDIAN in yes) BE=be EB=eb LE='' EL='' ;; no) BE='' EB='' LE=le EL=el ;; esac case $ARCH in x86-64|x86_64) TARGET_ARCH=amd64 ;; x86) TARGET_ARCH=386 ;; arm64) TARGET_ARCH=arm64 ;; powerpc64) TARGET_ARCH=ppc64$LE ;; mips*) TARGET_ARCH=$ARCH$EL ;; *) TARGET_ARCH=$ARCH ;; esac go_prepare() { mkdir -p $GOCACHE $GOENV $GOPATH $TMPDIR } hook_add preconf 1 'go_prepare'