aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-12-04 10:14:03 +0000
committerAriadne Conill <ariadne@dereferenced.org>2021-03-02 14:22:34 +0000
commit074082328bf9854b7725fa17e8436ebbef39e705 (patch)
tree04f679c9fff9ce5997e2d2a0b826212510238dc7
parent3a083c008f2774bfab5a03b74bbf346e00069c00 (diff)
downloadaports-074082328bf9854b7725fa17e8436ebbef39e705.tar.gz
aports-074082328bf9854b7725fa17e8436ebbef39e705.tar.bz2
aports-074082328bf9854b7725fa17e8436ebbef39e705.tar.xz
main/gc: riscv64 fixes
-rw-r--r--main/gc/APKBUILD12
-rw-r--r--main/gc/data_start_riscv64.patch27
2 files changed, 37 insertions, 2 deletions
diff --git a/main/gc/APKBUILD b/main/gc/APKBUILD
index ea25bcd2ff..d8699c1ac0 100644
--- a/main/gc/APKBUILD
+++ b/main/gc/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gc
pkgver=8.0.4
-pkgrel=4
+pkgrel=5
pkgdesc="A garbage collector for C and C++"
url="https://hboehm.info/gc/"
arch="all"
@@ -10,8 +10,15 @@ makedepends="linux-headers"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc libgc++:libgccpp"
source="http://hboehm.info/gc/gc_source/gc-$pkgver.tar.gz
0001-Fix-gctest-with-musl-libc-on-s390x.patch
+ data_start_riscv64.patch
"
+prepare() {
+ default_prepare
+ update_config_guess
+ update_config_sub
+}
+
build() {
export CFLAGS="$CFLAGS -D_GNU_SOURCE -DNO_GETCONTEXT -DUSE_MMAP -DHAVE_DL_ITERATE_PHDR"
./configure \
@@ -39,4 +46,5 @@ libgccpp() {
}
sha512sums="57ccca15c6e50048d306a30de06c1a844f36103a84c2d1c17cbccbbc0001e17915488baec79737449982da99ce5d14ce527176afae9ae153cbbb5a19d986366e gc-8.0.4.tar.gz
-0441dfe85b36e9e80b9135d62d56e5e9b67c6db1f927480dd3cf5048765f3a2ab51a45eaa0068066af97ce0398333890fff2f84cd01fec476655f34e0325bc13 0001-Fix-gctest-with-musl-libc-on-s390x.patch"
+0441dfe85b36e9e80b9135d62d56e5e9b67c6db1f927480dd3cf5048765f3a2ab51a45eaa0068066af97ce0398333890fff2f84cd01fec476655f34e0325bc13 0001-Fix-gctest-with-musl-libc-on-s390x.patch
+0348e224e0daeedafbd0776eca3e020ac7b6587ec208b4fd8101b220d7c02521650555740931715c700f36802917427ccdd120051906818085cfb3590dd103b4 data_start_riscv64.patch"
diff --git a/main/gc/data_start_riscv64.patch b/main/gc/data_start_riscv64.patch
new file mode 100644
index 0000000000..cab5aa3493
--- /dev/null
+++ b/main/gc/data_start_riscv64.patch
@@ -0,0 +1,27 @@
+From 538562ad01b181f4cc3913da1ac06a77945cd9b9 Mon Sep 17 00:00:00 2001
+From: Nikita Ermakov <coffe92@gmail.com>
+Date: Wed, 20 May 2020 17:57:17 +0300
+Subject: [PATCH] Fix 'undefined reference to __data_start' linker error on
+ RISC-V
+
+Issue #294 (bdwgc).
+
+* include/private/gcconfig.h [RISCV && LINUX] (__data_start): Add
+attribute(weak).
+---
+ include/private/gcconfig.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
+index b342883b..bd2e611f 100644
+--- a/include/private/gcconfig.h
++++ b/include/private/gcconfig.h
+@@ -2934,7 +2934,7 @@ EXTERN_C_BEGIN
+ # define ALIGNMENT (CPP_WORDSZ/8)
+ # ifdef LINUX
+ # define OS_TYPE "LINUX"
+- extern int __data_start[];
++ extern int __data_start[] __attribute__((__weak__));
+ # define DATASTART ((ptr_t)__data_start)
+ # define LINUX_STACKBOTTOM
+ # define DYNAMIC_LOADING