Skip to content

Commit f381b50

Browse files
Ast-x64felixonmars
authored andcommitted
addpkg: d-stdx-allocator
1 parent 2b9d09e commit f381b50

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

d-stdx-allocator/riscv64.patch

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
diff --git PKGBUILD PKGBUILD
2+
index 6d45b0e56..fb1afc3b0 100644
3+
--- PKGBUILD
4+
+++ PKGBUILD
5+
@@ -11,14 +11,17 @@ license=('Boost')
6+
depends=('liblphobos' 'd-mir-core')
7+
makedepends=('meson' 'ldc')
8+
source=("$_pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
9+
- "add-dependency.patch::https://github.com/dlang-community/stdx-allocator/commit/676b4c782ba9c484864075508c27ef44399396f7.patch")
10+
+ "add-dependency.patch::https://github.com/dlang-community/stdx-allocator/commit/676b4c782ba9c484864075508c27ef44399396f7.patch"
11+
+ "support-riscv64.patch")
12+
sha512sums=('f4dc887225926cc4530314976e5e236c696a54c6e2ccdb48271b97b0c0a70882b70e92768c94c2932ccc9bd2282c3e953b27cf72088904458f7fc15234dca4be'
13+
- '13d52d3bb4d90e7b5fb3163f1761c20a57a59be1306ac665fea0eb9331864821d77e790f8ca6027b1936a6930085d2ccca7a1d49d4bd139a939e2c58f03bd47a')
14+
+ '13d52d3bb4d90e7b5fb3163f1761c20a57a59be1306ac665fea0eb9331864821d77e790f8ca6027b1936a6930085d2ccca7a1d49d4bd139a939e2c58f03bd47a'
15+
+ '3da013d6027527180f529155ab90e23a6c0e2f218dcf237de040d2bfb75acb9b95a94e417240bdfd058dfaf859cb87b3cdeacce0af8916b62526a8052d00fa7f')
16+
17+
prepare() {
18+
cd $_pkgname-$pkgver
19+
20+
patch -p1 < ../add-dependency.patch
21+
+ patch -p1 < ../support-riscv64.patch
22+
}
23+
24+
build() {
25+
@@ -26,7 +29,7 @@ build() {
26+
cd $_pkgname-$pkgver/build
27+
28+
export DC=ldc
29+
- export LDFLAGS="$(echo -ne $LDFLAGS | sed -e 's/-flto=auto/--flto=full/')"
30+
+ export LDFLAGS="$(echo -ne $LDFLAGS | sed -e 's/-flto=auto//')"
31+
32+
arch-meson ..
33+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/source/stdx/allocator/building_blocks/region.d b/source/stdx/allocator/building_blocks/region.d
2+
index c25ff62..6bb8017 100644
3+
--- a/source/stdx/allocator/building_blocks/region.d
4+
+++ b/source/stdx/allocator/building_blocks/region.d
5+
@@ -390,6 +390,7 @@ struct InSituRegion(size_t size, size_t minAlign = platformAlignment)
6+
else version (MIPS64) enum growDownwards = Yes.growDownwards;
7+
else version (SPARC) enum growDownwards = Yes.growDownwards;
8+
else version (SystemZ) enum growDownwards = Yes.growDownwards;
9+
+ else version (RISCV64) enum growDownwards = Yes.growDownwards;
10+
else static assert(0, "Dunno how the stack grows on this architecture.");
11+
12+
@disable this(this);

0 commit comments

Comments
 (0)