go: fix musl build
This commit is contained in:
parent
e36279e319
commit
736e4b7989
|
@ -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
|
||||
|
||||
_go_targetarch() {
|
||||
local hostarch targetarch
|
||||
|
||||
case "$XBPS_MACHINE" in
|
||||
arm*) export hostarch=arm;;
|
||||
i686*) export hostarch=386;;
|
||||
|
@ -32,7 +34,7 @@ _go_targetarch() {
|
|||
do_build() {
|
||||
unset GCC CC CXX LD CFLAGS
|
||||
|
||||
targetarch=$(_go_targetarch)
|
||||
local targetarch=$(_go_targetarch)
|
||||
export GOROOT=$PWD
|
||||
export GOROOT_FINAL="/usr/lib/go"
|
||||
export GOOS=
|
||||
|
@ -66,6 +68,8 @@ do_build() {
|
|||
}
|
||||
|
||||
do_install() {
|
||||
local bindir
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
arm*) bindir=bin/linux_arm;;
|
||||
|
@ -106,7 +110,7 @@ go-cross-linux_package() {
|
|||
depends="${sourcepkg}-${version}_${revision}"
|
||||
short_desc+=" - Cross compilers for Linux"
|
||||
pkg_install() {
|
||||
targetarch=$(_go_targetarch)
|
||||
local targetarch=$(_go_targetarch)
|
||||
mkdir -p $PKGDESTDIR/usr/lib/go/pkg/tool/
|
||||
cd ${DESTDIR}/usr/lib/go/pkg/tool/
|
||||
for i in linux_*; do
|
||||
|
|
Loading…
Reference in New Issue