Skip to content
Snippets Groups Projects
Verified Commit 002e44d6 authored by Andrei Gherzan's avatar Andrei Gherzan :penguin:
Browse files

go: Drop version 1.16.10


oe-core now comes with a newer version: 1.17.3. 1.16.10 version was an
upgrade for dunfell but now that we move to newer layers, we can drop it
and use the latest in upstream.

Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent b6c0e8ad
No related branches found
No related tags found
1 merge request!30flavours/zephyr/local.conf.sample: Bump CONF_VERSION
DEPENDS = "virtual/${TUNE_PKGARCH}-go go-native"
DEPENDS:class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk"
PROVIDES = "virtual/${TARGET_PREFIX}go-runtime"
export CGO_CFLAGS = "${CFLAGS}"
export CGO_CPPFLAGS = "${CPPFLAGS}"
export CGO_CXXFLAGS = "${CXXFLAGS}"
export CGO_LDFLAGS = "${LDFLAGS}"
export GOCACHE = "${B}/.cache"
GO_EXTLDFLAGS ?= "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}"
GO_SHLIB_LDFLAGS ?= '-ldflags="--linkmode=external -extldflags '${GO_EXTLDFLAGS}'"'
do_configure() {
:
}
do_configure:libc-musl() {
rm -f ${S}/src/runtime/race/*.syso
}
do_compile() {
export CC_FOR_${TARGET_GOTUPLE}="${CC}"
export CXX_FOR_${TARGET_GOTUPLE}="${CXX}"
cd src
./make.bash --target-only --no-banner std
if [ -n "${GO_DYNLINK}" ]; then
export GOTOOLDIR="${B}/pkg/tool/native_native"
CC="$CC_FOR_${TARGET_GOTUPLE}" GOARCH="${TARGET_GOARCH}" GOOS="${TARGET_GOOS}" GOROOT=${B} \
$GOTOOLDIR/go_bootstrap install -linkshared -buildmode=shared ${GO_SHLIB_LDFLAGS} std
fi
cd ${B}
}
do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
do_install() {
install -d ${D}${libdir}/go/src
cp --preserve=mode,timestamps -R ${B}/pkg ${D}${libdir}/go/
if [ "${BUILD_GOTUPLE}" != "${TARGET_GOTUPLE}" ]; then
rm -rf ${D}${libdir}/go/pkg/${BUILD_GOTUPLE}
rm -rf ${D}${libdir}/go/pkg/obj/${BUILD_GOTUPLE}
fi
rm -rf ${D}${libdir}/go/pkg/tool
rm -rf ${D}${libdir}/go/pkg/obj
rm -rf ${D}${libdir}/go/pkg/bootstrap
find src -mindepth 1 -maxdepth 1 -type d | while read srcdir; do
cp --preserve=mode,timestamps -R $srcdir ${D}${libdir}/go/src/
done
find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
rm -f ${D}${libdir}/go/src/cmd/dist/dist
rm -f ${D}${libdir}/go/src/cmd/cgo/zdefaultcc.go
rm -f ${D}${libdir}/go/src/cmd/go/internal/cfg/zdefaultcc.go
}
ALLOW_EMPTY:${PN} = "1"
FILES:${PN} = "${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*${SOLIBSDEV}"
FILES:${PN}-dev = "${libdir}/go/src ${libdir}/go/pkg/include \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.shlibname \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*.a \
${libdir}/go/pkg/${TARGET_GOTUPLE}_dynlink/*/*/*/*/*/*/*.a \
"
FILES:${PN}-staticdev = "${libdir}/go/pkg/${TARGET_GOTUPLE}"
# Go sources include some scripts and pre-built binaries for
# multiple architectures. The static .a files for dynamically-linked
# runtime are also required in -dev.
INSANE_SKIP:${PN}-dev = "staticdev file-rdeps arch"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
INHIBIT_SYSROOT_STRIP = "1"
BBCLASSEXTEND = "nativesdk"
require go-${PV}.inc
require go-runtime.inc
DEPENDS = "virtual/${TUNE_PKGARCH}-go go-native"
DEPENDS:class-nativesdk = "virtual/${TARGET_PREFIX}go-crosssdk go-native"
export GOCACHE = "${B}/.cache"
GO_LDFLAGS = ""
GO_LDFLAGS:class-nativesdk = "-linkmode external"
export GO_LDFLAGS
CC:append:class-nativesdk = " ${SECURITY_NOPIE_CFLAGS}"
do_configure[noexec] = "1"
do_compile() {
export CC_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CC}"
export CXX_FOR_${TARGET_GOOS}_${TARGET_GOARCH}="${CXX}"
cd src
./make.bash --target-only --no-banner
cd ${B}
}
do_compile[dirs] =+ "${GOTMPDIR} ${B}/bin ${B}/pkg"
do_compile[cleandirs] += "${GOTMPDIR} ${B}/bin ${B}/pkg"
do_install() {
install -d ${D}${libdir}/go/pkg/tool
cp --preserve=mode,timestamps -R ${B}/pkg/tool/${TARGET_GOTUPLE} ${D}${libdir}/go/pkg/tool/
install -d ${D}${libdir}/go/src
cp --preserve=mode,timestamps -R ${S}/src/cmd ${D}${libdir}/go/src/
find ${D}${libdir}/go/src -depth -type d -name testdata -exec rm -rf {} \;
install -d ${D}${libdir}/go/bin
install -d ${D}${bindir}
for f in ${B}/${GO_BUILD_BINDIR}/*; do
name=`basename $f`
install -m 0755 $f ${D}${libdir}/go/bin/
ln -sf ../${baselib}/go/bin/$name ${D}${bindir}/
done
rm -rf ${D}${libdir}/go/src
}
PACKAGES = "${PN} ${PN}-dev"
FILES:${PN} = "${libdir}/go/bin ${libdir}/go/pkg/tool/${TARGET_GOTUPLE} ${bindir}"
RDEPENDS:${PN} = "go-runtime"
INSANE_SKIP:${PN} = "ldflags"
BBCLASSEXTEND = "nativesdk"
require go-${PV}.inc
require go-target.inc
inherit linuxloader
export GOBUILDMODE=""
export GO_LDSO = "${@get_linuxloader(d)}"
export CC_FOR_TARGET = "gcc"
export CXX_FOR_TARGET = "g++"
# mips/rv64 doesn't support -buildmode=pie, so skip the QA checking for mips/riscv32 and its
# variants.
python() {
if 'mips' in d.getVar('TARGET_ARCH',True) or 'riscv32' in d.getVar('TARGET_ARCH',True):
d.appendVar('INSANE_SKIP:%s' % d.getVar('PN',True), " textrel")
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment