]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgo: support gollvm build on arm64 linux
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 19 Sep 2019 00:03:25 +0000 (00:03 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 19 Sep 2019 00:03:25 +0000 (00:03 +0000)
    This CL serves as part of an initial change for enabling gollvm
    building on arm64 linux, the rest of the change will be covered by
    another one to the gollvm repo.

    Incorporate type definition of 'uint128' to 'runtime' and 'syscall'
    packges, the change is not specific to arm64 linux but made available
    for all platforms.

    Verified by building and unit-testing gollvm on linux x86-64 and arm64.

    Verified by building and checking gccgo on linux x86-64 and arm64.

    Fixes golang/go#33711

    Change-Id: I4720c7d810cfd4ef720962fb4104c5641b2459c0

From-SVN: r275919

gcc/go/gofrontend/MERGE
libgo/mkrsysinfo.sh
libgo/mksysinfo.sh
libgo/sysinfo.c

index 4b7a4b3073b45b3461d9ef1ca7428f8f29789e7c..330c458ec8c6f5879b03973da530e6b31a31de97 100644 (file)
@@ -1,4 +1,4 @@
-09ca3c1ea8a52b5d3d6c4331c59d44e0b6bfab57
+d81ff42c367cce2110ccf5ddbadb6cc9bdf94e28
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 0a5e29ed4ba40750fa840e309c6d8977ee81cf4c..c28f0e5f1f695009b3d6ce2d8b529bedc0eaa539 100755 (executable)
@@ -209,3 +209,9 @@ grep '^type _kevent ' gen-sysinfo.go | \
     sed -e s'/_kevent/keventt/' \
       -e 's/ udata [^;}]*/ udata *byte/' \
     >> ${OUT}
+
+# Type 'uint128' is needed in a couple of type definitions on arm64,such
+# as _user_fpsimd_struct, _elf_fpregset_t, etc.
+if ! grep '^type uint128' ${OUT} > /dev/null 2>&1; then
+    echo "type uint128 [16]byte" >> ${OUT}
+fi
index d616bd8097709c904e377200241dcb084668f4e1..488b223b434f20805d6af8483d7f8e8351c18a07 100755 (executable)
@@ -1393,4 +1393,10 @@ grep '^type _mactun_info_t ' gen-sysinfo.go | \
     sed -e 's/_in6_addr_t/[16]byte/g' \
     >> ${OUT}
 
+# Type 'uint128' is needed in a couple of type definitions on arm64,such
+# as _user_fpsimd_struct, _elf_fpregset_t, etc.
+if ! grep '^type uint128' ${OUT} > /dev/null 2>&1; then
+    echo "type uint128 [16]byte" >> ${OUT}
+fi
+
 exit $?
index 4ab798c49788b51d04bc4d2ed135deab71626fe7..0692fd41eb791d5135652e48dc1fe7b1701e6f19 100644 (file)
@@ -424,7 +424,11 @@ EREF(MNT_FORCE);
 
 #if defined(HAVE_SYS_PTRACE_H)
 // From <sys/ptrace.h>
+#if defined (__aarch64__)
+SREF(user_pt_regs);
+#else
 SREF(pt_regs);
+#endif
 EREF(PTRACE_PEEKTEXT);
 #endif