go: fix musl build

This commit is contained in:
Eivind Uggedal 2015-05-08 09:34:06 +00:00
parent e36279e319
commit 736e4b7989
2 changed files with 18 additions and 2 deletions

View 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

View File

@ -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