|
1 | 1 | --- PKGBUILD
|
2 | 2 | +++ PKGBUILD
|
3 |
| -@@ -14,7 +14,7 @@ pkgdesc="A D Compiler based on the LLVM Compiler Infrastructure including D runt |
4 |
| - arch=('x86_64') |
5 |
| - url="https://github.com/ldc-developers/ldc" |
6 |
| - license=('BSD-3-Clause AND BSL-1.0 AND Apache-2.0 WITH LLVM-exception') |
7 |
| --makedepends=('git' 'cmake' 'llvm' 'lld' 'ldc' 'ninja') |
8 |
| -+makedepends=('git' 'cmake' 'llvm' 'lld' 'ldc' 'ninja' 'llvm17-libs') |
9 |
| - # Disable lto as linking the ldc2 binary fails |
10 |
| - options=(!lto) |
11 |
| - |
12 |
| -@@ -35,6 +35,8 @@ prepare() { |
| 3 | +@@ -35,6 +35,11 @@ prepare() { |
13 | 4 |
|
14 | 5 | # Set version used for path construction in getRelativeClangCompilerRTLibPath()
|
15 | 6 | sed -i "s/ldc::llvm_version_base/\"$_clangversion\"/" driver/linker-gcc.cpp
|
16 | 7 | +
|
17 | 8 | + patch -Np1 -d runtime/phobos -i "$srcdir/disable-static-NaN-tests.patch"
|
| 9 | ++ |
| 10 | ++ # runtime: Link libatomic on 64-bit RISC-V and LoongArch |
| 11 | ++ git cherry-pick -n 9296fd6fccbc2a6ade38ded1358923d1a893caab |
18 | 12 | }
|
19 | 13 |
|
20 | 14 | build() {
|
21 |
| -@@ -50,7 +52,8 @@ build() { |
| 15 | +@@ -50,7 +55,7 @@ build() { |
22 | 16 | -DBUILD_SHARED_LIBS=BOTH \
|
23 | 17 | -DBUILD_LTO_LIBS=ON \
|
24 | 18 | -DLDC_WITH_LLD=OFF \
|
25 | 19 | - -DD_COMPILER_FLAGS="-link-defaultlib-shared=false -linker=lld --flto=thin" \
|
26 | 20 | + -DD_COMPILER_FLAGS="-link-defaultlib-shared=false -linker=lld" \
|
27 |
| -+ -DLD_FLAGS="-Wl,--no-as-needed -latomic -Wl,--as-needed" \ |
28 | 21 | -DADDITIONAL_DEFAULT_LDC_SWITCHES="\"-link-defaultlib-shared\"," \
|
29 | 22 | ..
|
30 | 23 | ninja
|
31 |
| -@@ -102,3 +105,6 @@ package_liblphobos() { |
| 24 | +@@ -102,3 +107,6 @@ package_liblphobos() { |
32 | 25 | # licenses
|
33 | 26 | install -D -m644 "$srcdir/ldc/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
34 | 27 | }
|
|
0 commit comments