#994211 libgc-source: Add ARC support

Package:
src:libgc
Source:
libgc
Submitter:
Alexey Brodkin
Date:
2021-12-27 16:21:05 UTC
Severity:
normal
Tags:
#994211#5
Date:
2021-09-13 18:21:27 UTC
From:
To:
Dear Maintainer,

Dear Maintainer,

Please consider adding support of ARC architecture with
a patch below. It's a back-port of upstream change [1]
which will be a part of the next release whenever it happens.

This is needed as we work on a Debian port for ARCprocessors.

[1] https://github.com/ivmai/bdwgc/commit/968818a12c361a3a7fa6e8d8b851d04847335e58
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -658,6 +658,10 @@ EXTERN_C_BEGIN
 #   define NONSTOP
 #   define mach_type_known
 # endif
+# if defined(__arc__) && defined(LINUX)
+#   define ARC
+#   define mach_type_known
+# endif
 # if defined(__hexagon__) && defined(LINUX)
 #    define HEXAGON
 #    define mach_type_known
@@ -2812,6 +2816,21 @@ EXTERN_C_BEGIN
 #   endif
 # endif /* X86_64 */

+# ifdef ARC
+#   define CPP_WORDSZ 32
+#   define MACH_TYPE "ARC"
+#   define ALIGNMENT 4
+#   define CACHE_LINE_SIZE 64
+#   ifdef LINUX
+#     define OS_TYPE "LINUX"
+#     define LINUX_STACKBOTTOM
+#     define COUNT_UNMAPPED_REGIONS
+#     define DYNAMIC_LOADING
+      extern int __data_start[] __attribute__((__weak__));
+#     define DATASTART ((ptr_t)__data_start)
+#   endif
+# endif /* ARC */
+
 # ifdef HEXAGON
 #   define CPP_WORDSZ 32
 #   define MACH_TYPE "HEXAGON"

#994211#8
Date:
2021-10-19 08:53:07 UTC
From:
To:
Control: reassign -1 src:libgc 1:8.0.4-3

Reassigning to correct package.

Kind regards,
Andrei

#994211#19
Date:
2021-12-24 07:07:42 UTC
From:
To:
Just a polite reminder on getting backport for ARC accepted in the Debian package.
It's quite unfortunate upstream project was not yet ready for the next release which
will eventually contain the change in question, so we have to live with the backport
for some time.

FWIW this is needed for getting cross build-essential for ARC built as a part of
Rebootsrap.

#994211#24
Date:
2021-12-27 16:18:54 UTC
From:
To:
FWIW in addition to changes in libgc sources we'll need to update symbols.
See https://salsa.debian.org/abrodkin/libgc/-/commit/468b59e33dec3e788d749df5c8b02864580d0496

If it makes easier to squash both changes (sources & symbols) into one cumulative patch
and post it right here, I may do it shortly.