pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/libgcroots libgcroots: add support for netbsd/aa...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/35d3501388ea
branches:  trunk
changeset: 418108:35d3501388ea
user:      maya <maya%pkgsrc.org@localhost>
date:      Wed Nov 20 21:24:33 2019 +0000

description:
libgcroots: add support for netbsd/aarch64.

diffstat:

 devel/libgcroots/distinfo                                 |   3 +-
 devel/libgcroots/patches/patch-include_private_gcconfig.h |  93 +++++++++++++++
 2 files changed, 95 insertions(+), 1 deletions(-)

diffs (109 lines):

diff -r 7e91cb429382 -r 35d3501388ea devel/libgcroots/distinfo
--- a/devel/libgcroots/distinfo Wed Nov 20 21:01:20 2019 +0000
+++ b/devel/libgcroots/distinfo Wed Nov 20 21:24:33 2019 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.4 2015/11/03 03:27:41 agc Exp $
+$NetBSD: distinfo,v 1.5 2019/11/20 21:24:33 maya Exp $
 
 SHA1 (libgcroots-0.2.3.tar.gz) = 0542e8ca20f465c0cd7355a426dea89a9b7be3af
 RMD160 (libgcroots-0.2.3.tar.gz) = eef2db5ea64e6ba20ec68b01b4f0621f45e0ecab
 SHA512 (libgcroots-0.2.3.tar.gz) = 0ab0d9937f1eb233423b633c8ae969a01570735f8eff2a1871fba6f14ed298d97904e634774ccc4b721f1843df6588258350f67a67ae45f02353c55bb1512a49
 Size (libgcroots-0.2.3.tar.gz) = 379193 bytes
+SHA1 (patch-include_private_gcconfig.h) = c6b57524599cdb09e43a3898c136d20a0a974b3f
diff -r 7e91cb429382 -r 35d3501388ea devel/libgcroots/patches/patch-include_private_gcconfig.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libgcroots/patches/patch-include_private_gcconfig.h Wed Nov 20 21:24:33 2019 +0000
@@ -0,0 +1,93 @@
+$NetBSD: patch-include_private_gcconfig.h,v 1.1 2019/11/20 21:24:33 maya Exp $
+
+Add support for netbsd/aarch64, based on netbsd/arm32 code within the same file.
+
+--- include/private/gcconfig.h.orig    2008-02-19 15:51:24.000000000 +0000
++++ include/private/gcconfig.h
+@@ -62,6 +62,14 @@
+ # endif
+ 
+ /* Determine the machine type: */
++# if defined(__aarch64__)
++#    define AARCH64
++#    if !defined(LINUX) && !defined(DARWIN) && !defined(FREEBSD) \
++        && !defined(NETBSD) && !defined(NN_BUILD_TARGET_PLATFORM_NX)
++#      define NOSYS
++#      define mach_type_known
++#    endif
++# endif
+ # if defined(__arm__) || defined(__thumb__)
+ #    define ARM32
+ #    if !defined(LINUX) && !defined(NETBSD)
+@@ -99,6 +107,10 @@
+ #    define ARM32
+ #    define mach_type_known
+ # endif
++# if defined(NETBSD) && defined(__aarch64__)
++#    define AARCH64
++#    define mach_type_known
++# endif
+ # if defined(NETBSD) && defined(__sh__)
+ #    define SH
+ #    define mach_type_known
+@@ -1724,6 +1736,60 @@
+ #   endif
+ # endif
+ 
++
++# ifdef ARM32
++#   define CPP_WORDSZ 64
++#   define MACH_TYPE "AARCH64"
++#   define ALIGNMENT 8
++#   ifdef NETBSD
++#       define OS_TYPE "NETBSD"
++#       define HEURISTIC2
++#     ifdef __ELF__
++#          define DATASTART GC_data_start
++#        define DYNAMIC_LOADING
++#     else
++           extern char etext[];
++#          define DATASTART ((ptr_t)(etext))
++#     endif
++#   endif
++#   ifdef LINUX
++#       define OS_TYPE "LINUX"
++#       define LINUX_STACKBOTTOM
++#       ifdef __ELF__
++#            define DYNAMIC_LOADING
++#          include <features.h>
++#          if defined(__GLIBC__) && __GLIBC__ >= 2
++#              define SEARCH_FOR_DATA_START
++#          else
++               extern char **__environ;
++#                define DATASTART ((ptr_t)(&__environ))
++                            /* hideous kludge: __environ is the first */
++                            /* word in crt0.o, and delimits the start */
++                            /* of the data segment, no matter which   */
++                            /* ld options were passed through.        */
++                            /* We could use _etext instead, but that  */
++                            /* would include .rodata, which may       */
++                            /* contain large read-only data tables    */
++                            /* that we'd rather not scan.             */
++#          endif
++           extern int _end[];
++#          define DATAEND (_end)
++#     else
++           extern int etext[];
++#            define DATASTART ((ptr_t)((((word) (etext)) + 0xfff) & ~0xfff))
++#       endif
++#   endif
++#   ifdef NOSYS
++      /* __data_start is usually defined in the target linker script.  */
++      extern int __data_start[];
++#     define DATASTART (ptr_t)(__data_start)
++      /* __stack_base__ is set in newlib/libc/sys/arm/crt0.S  */
++      extern void *__stack_base__;
++#     define STACKBOTTOM ((ptr_t) (__stack_base__))
++#   endif
++#endif
++
++
+ # ifdef ARM32
+ #   define CPP_WORDSZ 32
+ #   define MACH_TYPE "ARM32"



Home | Main Index | Thread Index | Old Index