mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 15:43:49 +02:00
go: fix musl build
This commit is contained in:
parent
e36279e319
commit
736e4b7989
2 changed files with 18 additions and 2 deletions
12
srcpkgs/go/patches/no-longjmp-redefine.patch
Normal file
12
srcpkgs/go/patches/no-longjmp-redefine.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
--- include/libc.h.orig
|
||||||
|
+++ include/libc.h
|
||||||
|
@@ -102,7 +102,10 @@ extern void sysfatal(char*, ...);
|
||||||
|
#define atoll p9atoll
|
||||||
|
#define getenv p9getenv
|
||||||
|
#define getwd p9getwd
|
||||||
|
+#ifdef longjmp
|
||||||
|
+#undef longjmp
|
||||||
|
+#endif
|
||||||
|
#define longjmp p9longjmp
|
||||||
|
#undef setjmp
|
||||||
|
#define setjmp p9setjmp
|
|
@ -15,6 +15,8 @@ nostrip=yes
|
||||||
noverifyrdeps=yes
|
noverifyrdeps=yes
|
||||||
|
|
||||||
_go_targetarch() {
|
_go_targetarch() {
|
||||||
|
local hostarch targetarch
|
||||||
|
|
||||||
case "$XBPS_MACHINE" in
|
case "$XBPS_MACHINE" in
|
||||||
arm*) export hostarch=arm;;
|
arm*) export hostarch=arm;;
|
||||||
i686*) export hostarch=386;;
|
i686*) export hostarch=386;;
|
||||||
|
@ -32,7 +34,7 @@ _go_targetarch() {
|
||||||
do_build() {
|
do_build() {
|
||||||
unset GCC CC CXX LD CFLAGS
|
unset GCC CC CXX LD CFLAGS
|
||||||
|
|
||||||
targetarch=$(_go_targetarch)
|
local targetarch=$(_go_targetarch)
|
||||||
export GOROOT=$PWD
|
export GOROOT=$PWD
|
||||||
export GOROOT_FINAL="/usr/lib/go"
|
export GOROOT_FINAL="/usr/lib/go"
|
||||||
export GOOS=
|
export GOOS=
|
||||||
|
@ -66,6 +68,8 @@ do_build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
local bindir
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
arm*) bindir=bin/linux_arm;;
|
arm*) bindir=bin/linux_arm;;
|
||||||
|
@ -106,7 +110,7 @@ go-cross-linux_package() {
|
||||||
depends="${sourcepkg}-${version}_${revision}"
|
depends="${sourcepkg}-${version}_${revision}"
|
||||||
short_desc+=" - Cross compilers for Linux"
|
short_desc+=" - Cross compilers for Linux"
|
||||||
pkg_install() {
|
pkg_install() {
|
||||||
targetarch=$(_go_targetarch)
|
local targetarch=$(_go_targetarch)
|
||||||
mkdir -p $PKGDESTDIR/usr/lib/go/pkg/tool/
|
mkdir -p $PKGDESTDIR/usr/lib/go/pkg/tool/
|
||||||
cd ${DESTDIR}/usr/lib/go/pkg/tool/
|
cd ${DESTDIR}/usr/lib/go/pkg/tool/
|
||||||
for i in linux_*; do
|
for i in linux_*; do
|
||||||
|
|
Loading…
Add table
Reference in a new issue