pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/go14 Add Yasushi Oshima patches for arm from:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0b7e643a3949
branches:  trunk
changeset: 374309:0b7e643a3949
user:      christos <christos%pkgsrc.org@localhost>
date:      Sat Jan 20 16:55:25 2018 +0000

description:
Add Yasushi Oshima patches for arm from:
    https://github.com/oshimaya/pkgsrc/tree/master/lang/go14

diffstat:

 lang/go14/Makefile                                            |   6 +-
 lang/go14/distinfo                                            |  19 ++-
 lang/go14/patches/patch-src_cmd_5l_obj.c                      |  32 +++++
 lang/go14/patches/patch-src_cmd_6l_obj.c                      |  31 +++++
 lang/go14/patches/patch-src_cmd_ld_elf.c                      |  17 ++
 lang/go14/patches/patch-src_make.bash                         |  28 ++++
 lang/go14/patches/patch-src_runtime_debug__netbsd.go          |  17 ++
 lang/go14/patches/patch-src_runtime_defs__netbsd.go           |  12 +
 lang/go14/patches/patch-src_runtime_defs__netbsd__arm.h       |  51 ++++++++
 lang/go14/patches/patch-src_runtime_mgc0.c                    |  30 ++++
 lang/go14/patches/patch-src_runtime_mheap.c                   |  18 ++
 lang/go14/patches/patch-src_runtime_os__netbsd.c              |  67 +++++++++++
 lang/go14/patches/patch-src_runtime_proc.c                    |  16 ++
 lang/go14/patches/patch-src_runtime_runtime.h                 |  16 ++
 lang/go14/patches/patch-src_syscall_sockcmsg__unix.go         |  14 ++
 lang/go14/patches/patch-src_syscall_syscall__netbsd__386.go   |  17 ++
 lang/go14/patches/patch-src_syscall_syscall__netbsd__amd64.go |  17 ++
 lang/go14/patches/patch-src_syscall_syscall__netbsd__arm.go   |  17 ++
 lang/go14/patches/patch-src_syscall_syscall__unix.go          |  12 +
 19 files changed, 433 insertions(+), 4 deletions(-)

diffs (truncated from 564 to 300 lines):

diff -r 52cdc073188a -r 0b7e643a3949 lang/go14/Makefile
--- a/lang/go14/Makefile        Sat Jan 20 16:55:05 2018 +0000
+++ b/lang/go14/Makefile        Sat Jan 20 16:55:25 2018 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.14 2017/10/04 10:03:53 jperkin Exp $
+# $NetBSD: Makefile,v 1.15 2018/01/20 16:55:25 christos Exp $
 
 .include "../../lang/go/version.mk"
 
 DISTNAME=      go${GO14_VERSION}.src
 PKGNAME=       go14-${GO14_VERSION}
-PKGREVISION=   5
+PKGREVISION=   6
 CATEGORIES=    lang
 MASTER_SITES=  https://storage.googleapis.com/golang/
 PATCH_SITES=   https://codereview.appspot.com/download/
@@ -81,7 +81,7 @@
 CHECK_INTERPRETER_SKIP+=       go14/src/run.rc
 
 do-build:
-       cd ${WRKSRC}/src && ${PKGSRC_SETENV} ${MAKE_ENV} ${BASH} ./make.bash
+       cd ${WRKSRC}/src && ${PKGSRC_SETENV} ${MAKE_ENV}  ${GOOPT} ${BASH} ./make.bash
 
 do-install:
        cd ${WRKSRC} && rm -rf .hgignore .hgtags pkg/obj
diff -r 52cdc073188a -r 0b7e643a3949 lang/go14/distinfo
--- a/lang/go14/distinfo        Sat Jan 20 16:55:05 2018 +0000
+++ b/lang/go14/distinfo        Sat Jan 20 16:55:25 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2017/10/19 14:29:01 jperkin Exp $
+$NetBSD: distinfo,v 1.9 2018/01/20 16:55:25 christos Exp $
 
 SHA1 (go1.4.3.src.tar.gz) = 486db10dc571a55c8d795365070f66d343458c48
 RMD160 (go1.4.3.src.tar.gz) = b1fbb2805a777c8107e7c946f36a881303ac5e35
@@ -10,19 +10,23 @@
 SHA1 (patch-misc_cgo_testso_cgoso.go) = ef782a6f173c814656eac0df640aedaa1a923bbc
 SHA1 (patch-misc_cgo_testso_cgoso__unix.go) = 58e221e1ce123428a3fe6ecededf0590cbfb81ca
 SHA1 (patch-src_cmd_5l_asm.c) = fd78203b7c92b9bbd057077671d649bac2d121ee
+SHA1 (patch-src_cmd_5l_obj.c) = 784a6c1e61ea54449772e35f257aa080c632273d
 SHA1 (patch-src_cmd_6c_txt.c) = 7ccddadedceb13b6a7c2f29cdfca501a85888488
 SHA1 (patch-src_cmd_6l_asm.c) = e15ece4886c459c500b91b3b0c6a4ccbe111bfc0
+SHA1 (patch-src_cmd_6l_obj.c) = 93599668f635b73c92fbf1f05bbd84d8170b4f7a
 SHA1 (patch-src_cmd_8l_asm.c) = a402a0db31d875cc04e8e15b2e4567ff2f77fee3
 SHA1 (patch-src_cmd_go_build.go) = f7705aa955241d3add353a144a676a58a0a1617e
 SHA1 (patch-src_cmd_go_pkg.go) = e70441f3fdf312eb389e4dd5408c207a4d4b8350
 SHA1 (patch-src_cmd_ld_data.c) = 96181bac03333f7bc5293ab9ddbd68bb9174ed47
 SHA1 (patch-src_cmd_ld_doc.go) = 000447f5a5862358a85a7510dc92195494972e26
+SHA1 (patch-src_cmd_ld_elf.c) = 32a2fb67fb70bcfb762e6bca7d0f52a4c3548a8a
 SHA1 (patch-src_cmd_ld_elf.h) = 067272ae88ec8631917e260c260ecbc84ce33dd5
 SHA1 (patch-src_cmd_ld_ldelf.c) = fce969ab60486b892b1bb81cd84237b77bf6e65f
 SHA1 (patch-src_cmd_ld_lib.h) = e6aa8b9520e1b75f435e179e5ea4f0ef738621f4
 SHA1 (patch-src_cmd_ld_pobj.c) = eaf67d6bc4f9ba835893f9d8c2d36941ff84933d
 SHA1 (patch-src_crypto_x509_root__unix.go) = c933f334da1c8de48a06d23abd12da01f73776e6
 SHA1 (patch-src_go_build_build.go) = b68bc557e7b48877889c63070e9cb9d8360f40f5
+SHA1 (patch-src_make.bash) = 337a0f384d71b6cad84f00da7749b9f70d641dec
 SHA1 (patch-src_net_cgo__bsd.go) = 4678fccd6956300ce55343965334fc3881383bbc
 SHA1 (patch-src_net_cgo__stub.go) = cf373587745d68e556dadf3a61956b489b4f420a
 SHA1 (patch-src_net_cgo__unix.go) = cebe897ab624aaf52bebc50d12a045d6b4ea2bc6
@@ -31,12 +35,25 @@
 SHA1 (patch-src_runtime_cgo_gcc__setenv.c) = c9614b76d71e84ad46b2ce785580fdc54b261455
 SHA1 (patch-src_runtime_cgo_gcc__solaris__amd64.c) = 633d8dcc8a843e343ee2ab9edb7cfaf6f6c3865b
 SHA1 (patch-src_runtime_cgo_setenv.c) = f3b56885fa54cabf78944fad75c21f04bea5cd88
+SHA1 (patch-src_runtime_debug__netbsd.go) = 3a54698e749dcd362e5fe4284a4c1f59d654b095
+SHA1 (patch-src_runtime_defs__netbsd.go) = 5f433bb92bd50707fcde5f941e9ca084eac4f659
+SHA1 (patch-src_runtime_defs__netbsd__arm.h) = 150973e3fdb118e11fadea910f7e9f39a70b6067
+SHA1 (patch-src_runtime_mgc0.c) = 6cd1a52376efbf3f825fc511044af4a82528eccc
+SHA1 (patch-src_runtime_mheap.c) = 646f4ba1abf407936ec6c3c0783dd59922079fe3
 SHA1 (patch-src_runtime_netpoll__solaris.c) = ae399518bb02d6b898734a52dfa7fe18f041e1ec
+SHA1 (patch-src_runtime_os__netbsd.c) = 8bb3a4612f5693727f66f6d3a16261e9087b01f0
 SHA1 (patch-src_runtime_os__solaris.c) = eec5b293fe4a72f58e4cd51cd23ea6e6fce714b6
 SHA1 (patch-src_runtime_os__solaris.h) = c0a39aa6ab57eca7056178c87ebb00bb21236499
+SHA1 (patch-src_runtime_proc.c) = 0167ab97ea9229f57d21c549201c2d17965e4c69
+SHA1 (patch-src_runtime_runtime.h) = ab89a3da0870c346529cfe5b8bda202aba0b59f7
 SHA1 (patch-src_runtime_sys__darwin__386.s) = e352e039bba8435a48b88c76290b245731c299ed
 SHA1 (patch-src_runtime_sys__darwin__amd64.s) = 3eccddc8228657db1480393f8476ddd68ac942ff
 SHA1 (patch-src_runtime_sys__solaris__amd64.s) = 88f2e3fc43b0d6e4f17ef06d3f4f27cfed3103c6
 SHA1 (patch-src_runtime_thunk__solaris__amd64.s) = 2835cdc171ae3209c61ef804fbfbf22cdf68bf43
+SHA1 (patch-src_syscall_sockcmsg__unix.go) = f8189d04c5f33a0a22be30100d1f1aedb24e1365
 SHA1 (patch-src_syscall_syscall__darwin__386.go) = 2f0986bdb199feaa73e933a1a75df87e5c7a8bff
 SHA1 (patch-src_syscall_syscall__darwin__amd64.go) = 1bfba4b0f1e2fe6dee55b24f7f8d7cd89d05dea0
+SHA1 (patch-src_syscall_syscall__netbsd__386.go) = 1d742efd113ed9d94affac03677df8e20e394895
+SHA1 (patch-src_syscall_syscall__netbsd__amd64.go) = 1ccfece5a676eb90142762d5349b492c2dab901e
+SHA1 (patch-src_syscall_syscall__netbsd__arm.go) = 085735db967594350481d3e810ba649a7fb1ce60
+SHA1 (patch-src_syscall_syscall__unix.go) = e168ea3d4d463e2d9be22ae5345f6067693a9bc3
diff -r 52cdc073188a -r 0b7e643a3949 lang/go14/patches/patch-src_cmd_5l_obj.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/go14/patches/patch-src_cmd_5l_obj.c  Sat Jan 20 16:55:25 2018 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-src_cmd_5l_obj.c,v 1.1 2018/01/20 16:55:25 christos Exp $
+
+ * Change Load Align in ELF Program Headers to the same as the system standard
+
+--- src/cmd/5l/obj.c.orig      2015-09-23 04:37:36.000000000 +0000
++++ src/cmd/5l/obj.c
+@@ -82,7 +82,6 @@ archinit(void)
+               break;
+       case Hlinux:    /* arm elf */
+       case Hfreebsd:
+-      case Hnetbsd:
+               debug['d'] = 0; // with dynamic linking
+               elfinit();
+               HEADR = ELFRESERVE;
+@@ -93,6 +92,17 @@ archinit(void)
+               if(INITRND == -1)
+                       INITRND = 4096;
+               break;
++      case Hnetbsd:
++              debug['d'] = 0; // with dynamic linking
++              elfinit();
++              HEADR = ELFRESERVE;
++              if(INITTEXT == -1)
++                      INITTEXT = 0x10000 + HEADR;
++              if(INITDAT == -1)
++                      INITDAT = 0;
++              if(INITRND == -1)
++                      INITRND = 0x10000;
++              break;
+       case Hnacl:
+               elfinit();
+               HEADR = 0x10000;
diff -r 52cdc073188a -r 0b7e643a3949 lang/go14/patches/patch-src_cmd_6l_obj.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/go14/patches/patch-src_cmd_6l_obj.c  Sat Jan 20 16:55:25 2018 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_cmd_6l_obj.c,v 1.1 2018/01/20 16:55:25 christos Exp $
+
+ * Change Load Align in ELF Program Headers to the same as the system standard.
+ 
+--- src/cmd/6l/obj.c.orig      2015-09-23 04:37:36.000000000 +0000
++++ src/cmd/6l/obj.c
+@@ -114,7 +114,6 @@ archinit(void)
+               break;
+       case Hlinux:            /* elf64 executable */
+       case Hfreebsd:          /* freebsd */
+-      case Hnetbsd:           /* netbsd */
+       case Hopenbsd:          /* openbsd */
+       case Hdragonfly:        /* dragonfly */
+       case Hsolaris:          /* solaris */
+@@ -127,6 +126,16 @@ archinit(void)
+               if(INITRND == -1)
+                       INITRND = 4096;
+               break;
++      case Hnetbsd:           /* netbsd */
++              elfinit();
++              HEADR = ELFRESERVE;
++              if(INITTEXT == -1)
++                      INITTEXT = (1<<22)+HEADR;
++              if(INITDAT == -1)
++                      INITDAT = 0;
++              if(INITRND == -1)
++                      INITRND = 0x200000;
++              break;
+       case Hnacl:
+               elfinit();
+               debug['w']++; // disable dwarf, which gets confused and is useless anyway
diff -r 52cdc073188a -r 0b7e643a3949 lang/go14/patches/patch-src_cmd_ld_elf.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/go14/patches/patch-src_cmd_ld_elf.c  Sat Jan 20 16:55:25 2018 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_cmd_ld_elf.c,v 1.1 2018/01/20 16:55:25 christos Exp $
+
+ * Change to EABI when NetBSD/arm (earm)
+
+--- src/cmd/ld/elf.c.orig      2015-09-23 04:37:36.000000000 +0000
++++ src/cmd/ld/elf.c
+@@ -55,8 +55,8 @@ elfinit(void)
+ 
+       // 32-bit architectures
+       case '5':
+-              // we use EABI on both linux/arm and freebsd/arm.
+-              if(HEADTYPE == Hlinux || HEADTYPE == Hfreebsd)
++              // we use EABI on linux/arm, freebsd/arm and netbsd/arm
++              if(HEADTYPE == Hlinux || HEADTYPE == Hfreebsd || Hnetbsd)
+                       hdr.flags = 0x5000002; // has entry point, Version5 EABI
+               // fallthrough
+       default:
diff -r 52cdc073188a -r 0b7e643a3949 lang/go14/patches/patch-src_make.bash
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/go14/patches/patch-src_make.bash     Sat Jan 20 16:55:25 2018 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-src_make.bash,v 1.1 2018/01/20 16:55:25 christos Exp $
+
+ * Workaround for Warninig armv5 instruction in GCC4.8 generic arm compiler 
+
+--- src/make.bash.orig 2015-09-23 04:37:37.000000000 +0000
++++ src/make.bash
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env bash
++#!/usr/pkg/bin/bash
+ # Copyright 2009 The Go Authors. All rights reserved.
+ # Use of this source code is governed by a BSD-style
+ # license that can be found in the LICENSE file.
+@@ -121,6 +121,15 @@ case "$GOHOSTARCH" in
+ 386) mflag=-m32;;
+ amd64) mflag=-m64;;
+ esac
++
++# In gcc 4.8 on NetBSD 7.0, need -march=armv5 flag for arm target.
++# Default target of gcc is generic-arm. however some assemble-sources
++# in golang use operator for armv5 or lator.
++
++if [ "$GOARCH" == "arm" -o -z '$GOARCH' -a "$(uname -sp)" == "NetBSD earm" ]; then
++              mflag="-march=armv5"
++fi
++
+ if [ "$(uname)" == "Darwin" ]; then
+       # golang.org/issue/5261
+       mflag="$mflag -mmacosx-version-min=10.6"
diff -r 52cdc073188a -r 0b7e643a3949 lang/go14/patches/patch-src_runtime_debug__netbsd.go
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/go14/patches/patch-src_runtime_debug__netbsd.go      Sat Jan 20 16:55:25 2018 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_runtime_debug__netbsd.go,v 1.1 2018/01/20 16:55:25 christos Exp $
+
+ * add function return 'Real' pagesize from runtime package
+
+--- src/runtime/debug_netbsd.go.orig   2016-08-27 17:50:31.000000000 +0000
++++ src/runtime/debug_netbsd.go
+@@ -0,0 +1,10 @@
++// Copyright 2009 The Go Authors. All rights reserved.
++// Use of this source code is governed by a BSD-style
++// license that can be found in the LICENSE file.
++// +build netbsd
++
++package runtime
++
++func Physpagesize() int {
++      return int(physpagesz)
++}
diff -r 52cdc073188a -r 0b7e643a3949 lang/go14/patches/patch-src_runtime_defs__netbsd.go
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/go14/patches/patch-src_runtime_defs__netbsd.go       Sat Jan 20 16:55:25 2018 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-src_runtime_defs__netbsd.go,v 1.1 2018/01/20 16:55:25 christos Exp $
+
+ * Fix Struct name Kevent to KeventT.This file is the base of defs_netbsd_XXX 
+
+--- src/runtime/defs_netbsd.go.orig    2015-09-23 04:37:37.000000000 +0000
++++ src/runtime/defs_netbsd.go
+@@ -122,4 +122,4 @@ type Itimerval C.struct_itimerval
+ type McontextT C.mcontext_t
+ type UcontextT C.ucontext_t
+ 
+-type Kevent C.struct_kevent
++type KeventT C.struct_kevent
diff -r 52cdc073188a -r 0b7e643a3949 lang/go14/patches/patch-src_runtime_defs__netbsd__arm.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/go14/patches/patch-src_runtime_defs__netbsd__arm.h   Sat Jan 20 16:55:25 2018 +0000
@@ -0,0 +1,51 @@
+$NetBSD: patch-src_runtime_defs__netbsd__arm.h,v 1.1 2018/01/20 16:55:25 christos Exp $
+
+ * Change to EABI in netbsd/arm  the aliment is changed when 64bit value.
+
+--- src/runtime/defs_netbsd_arm.h.orig 2015-09-23 04:37:37.000000000 +0000
++++ src/runtime/defs_netbsd_arm.h
+@@ -119,10 +119,12 @@ struct StackT {
+ struct Timespec {
+       int64   tv_sec;
+       int32   tv_nsec;
++      byte    Pad_cgo_0[4];
+ };
+ struct Timeval {
+       int64   tv_sec;
+       int32   tv_usec;
++      byte    Pad_cgo_0[4];
+ };
+ struct Itimerval {
+       Timeval it_interval;
+@@ -131,18 +133,18 @@ struct Itimerval {
+ 
+ struct McontextT {
+       uint32  __gregs[17];
+-#ifdef __ARM_EABI__
+-      byte    __fpu[4+8*32+4];
+-#else
+-      byte    __fpu[4+4*33+4];
+-#endif
++      byte    Pad_cgo_0[4];
++      // For EABI, fpscr[4]+pad[4]+fstmx[8*32]+fpsid[4]+pad[4]
++      byte    __fpu[272];
+       uint32  _mc_tlsbase;
++      byte    Pad_cgo_1[4];
+ };
+ struct UcontextT {
+       uint32  uc_flags;
+       UcontextT       *uc_link;
+       Sigset  uc_sigmask;
+       StackT  uc_stack;
++      byte    Pad_cgo_0[4];
+       McontextT       uc_mcontext;
+       int32   __uc_pad[2];
+ };
+@@ -154,6 +156,7 @@ struct KeventT {
+       uint32  fflags;
+       int64   data;
+       byte    *udata;
++      byte    Pad_cgo_0[4];
+ };
+ 
+ 



Home | Main Index | Thread Index | Old Index