Skip to content
Snippets Groups Projects
Commit 87c15ae3 authored by Mathias LANG's avatar Mathias LANG Committed by Andy Postnikov
Browse files

community/dmd: upgrade to 2.098.0

parent ba5acb2b
No related branches found
No related tags found
1 merge request!22075community/dmd: upgrade to 2.098.0
Pipeline #98015 canceled
......@@ -26,7 +26,7 @@ when multiple exceptions are thrown and -O is used.
delete mode 100644 test/runnable/gdb4149.d
delete mode 100644 test/runnable/gdb4181.d
diff --git a/test/runnable/eh.d b/test/runnable/eh.d
diff --git a/dmd/test/runnable/eh.d b/dmd/test/runnable/eh.d
index 7e7ec19eb..deb68ae4e 100644
--- a/dmd/test/runnable/eh.d
+++ b/dmd/test/runnable/eh.d
......@@ -50,7 +50,7 @@ index 7e7ec19eb..deb68ae4e 100644
}
void collidetwo()
diff --git a/test/runnable/gdb1.d b/test/runnable/gdb1.d
diff --git a/dmd/test/runnable/gdb1.d b/dmd/test/runnable/gdb1.d
deleted file mode 100644
index 2dc506131..000000000
--- a/dmd/test/runnable/gdb1.d
......@@ -61,7 +61,7 @@ index 2dc506131..000000000
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 15
-b gdb1.d:15
-r ARG1 ARG2
-echo RESULT=
-p args
......@@ -72,7 +72,7 @@ index 2dc506131..000000000
-{
- // BP
-}
diff --git a/test/runnable/gdb10311.d b/test/runnable/gdb10311.d
diff --git a/dmd/test/runnable/gdb10311.d b/dmd/test/runnable/gdb10311.d
deleted file mode 100644
index 57b040bd9..000000000
--- a/dmd/test/runnable/gdb10311.d
......@@ -83,7 +83,7 @@ index 57b040bd9..000000000
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 19
-b gdb10311.d:19
-r
-echo RESULT=
-p x
......@@ -98,7 +98,7 @@ index 57b040bd9..000000000
- call({++x;});
- // BP
-}
diff --git a/test/runnable/gdb14225.d b/test/runnable/gdb14225.d
diff --git a/dmd/test/runnable/gdb14225.d b/dmd/test/runnable/gdb14225.d
deleted file mode 100644
index a97b0424d..000000000
--- a/dmd/test/runnable/gdb14225.d
......@@ -109,7 +109,7 @@ index a97b0424d..000000000
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 17
-b gdb14225.d:17
-r
-echo RESULT=
-p lok
......@@ -122,7 +122,7 @@ index a97b0424d..000000000
- auto chars = "Anything".dup;
- // BP
-}
diff --git a/test/runnable/gdb14276.d b/test/runnable/gdb14276.d
diff --git a/dmd/test/runnable/gdb14276.d b/dmd/test/runnable/gdb14276.d
deleted file mode 100644
index ab57427aa..000000000
--- a/dmd/test/runnable/gdb14276.d
......@@ -133,7 +133,7 @@ index ab57427aa..000000000
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 21
-b gdb14276.d:21
-r
-echo RESULT=
-p v[0] + v[1] + v[2] + v[3]
......@@ -150,7 +150,7 @@ index ab57427aa..000000000
- int[4] v = [1000, 200, 30, 4];
- // BP
-}
diff --git a/test/runnable/gdb14313.d b/test/runnable/gdb14313.d
diff --git a/dmd/test/runnable/gdb14313.d b/dmd/test/runnable/gdb14313.d
deleted file mode 100644
index 369ba29d7..000000000
--- a/dmd/test/runnable/gdb14313.d
......@@ -161,7 +161,7 @@ index 369ba29d7..000000000
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 21
-b gdb14313.d:21
-r
-echo RESULT=
-p 'gdb.x' + 'gdb.y'
......@@ -178,7 +178,7 @@ index 369ba29d7..000000000
- ++x; ++y;
- // BP
-}
diff --git a/test/runnable/gdb14330.d b/test/runnable/gdb14330.d
diff --git a/dmd/test/runnable/gdb14330.d b/dmd/test/runnable/gdb14330.d
deleted file mode 100644
index ded690a53..000000000
--- a/dmd/test/runnable/gdb14330.d
......@@ -189,7 +189,7 @@ index ded690a53..000000000
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 20
-b gdb14330.d:20
-r
-echo RESULT=
-p str
......@@ -205,7 +205,7 @@ index ded690a53..000000000
- string str = "something";
- // BP
-}
diff --git a/test/runnable/gdb4149.d b/test/runnable/gdb4149.d
diff --git a/dmd/test/runnable/gdb4149.d b/dmd/test/runnable/gdb4149.d
deleted file mode 100644
index 9a29b3c75..000000000
--- a/dmd/test/runnable/gdb4149.d
......@@ -216,7 +216,7 @@ index 9a29b3c75..000000000
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 17
-b gdb4149.d:17
-r
-echo RESULT=
-p x
......@@ -235,7 +235,7 @@ index 9a29b3c75..000000000
- auto x = 32;
- foo(x);
-}
diff --git a/test/runnable/gdb4181.d b/test/runnable/gdb4181.d
diff --git a/dmd/test/runnable/gdb4181.d b/dmd/test/runnable/gdb4181.d
deleted file mode 100644
index a859bdded..000000000
--- a/dmd/test/runnable/gdb4181.d
......@@ -246,7 +246,7 @@ index a859bdded..000000000
-PERMUTE_ARGS:
-GDB_SCRIPT:
----
-b 22
-b gdb4181.d:22
-r
-echo RESULT=
-p 'gdb.x' + 'gdb.STest.y'
......@@ -264,6 +264,163 @@ index a859bdded..000000000
- STest.y = 22;
- // BP
-}
--
2.24.3 (Apple Git-128)
diff --git a/dmd/test/runnable/test17559.d b/dmd/test/runnable/test17559.d
deleted file mode 100644
index a759f1564..000000000
--- a/dmd/test/runnable/test17559.d
+++ /dev/null
@@ -1,84 +0,0 @@
-// REQUIRED_ARGS: -g
-// REQUIRED_ARGS(linux freebsd dragonflybsd): -L-export-dynamic
-// PERMUTE_ARGS:
-// DISABLED: osx
-
-import core.stdc.stdio;
-
-void main()
-{
- fun(1);
- fun(2);
- fun(3);
-#line 30
- fun(4);
-
- foo(1, 10);
- foo(2, 10);
- foo(3, 10);
-#line 40
- foo(4, 10);
-}
-
-void fun(int n, int defParam = 10)
-{
- try
- {
- if (n == 4)
- throw new Exception("fun");
- }
- catch(Exception e)
- {
- string s = e.toString();
- printf("%.*s\n", cast(int)s.length, s.ptr);
- int line = lineInMain(e.toString());
- assert(line >= 30 && line <= 32); // return address might be next statement
- }
-}
-
-void foo(int n, int m)
-{
- try
- {
- if (n == 4)
- throw new Exception("foo");
- }
- catch(Exception e)
- {
- string s = e.toString();
- printf("%.*s\n", cast(int)s.length, s.ptr);
- int line = lineInMain(e.toString());
- assert(line >= 40 && line <= 41); // return address might be next statement
- }
-}
-
-int lineInMain(string msg)
-{
- // find line number of _Dmain in stack trace
- // on linux: file.d:line _Dmain [addr]
- // on windows: addr in _Dmain at file.d(line)
- int line = 0;
- bool mainFound = false;
- for (size_t pos = 0; pos + 6 < msg.length; pos++)
- {
- if (msg[pos] == '\n')
- {
- line = 0;
- mainFound = false;
- }
- else if ((msg[pos] == ':' || msg[pos] == '(') && line == 0)
- {
- for (pos++; pos < msg.length && msg[pos] >= '0' && msg[pos] <= '9'; pos++)
- line = line * 10 + msg[pos] - '0';
- if (line > 0 && mainFound)
- return line;
- }
- else if (msg[pos .. pos + 6] == "_Dmain" || msg[pos .. pos + 6] == "D main")
- {
- mainFound = true;
- if (line > 0 && mainFound)
- return line;
- }
- }
- return 0;
-}
diff --git a/dmd/test/runnable/test19086.d b/dmd/test/runnable/test19086.d
deleted file mode 100644
index 04e524e4a..000000000
--- a/dmd/test/runnable/test19086.d
+++ /dev/null
@@ -1,64 +0,0 @@
-// REQUIRED_ARGS: -g
-// REQUIRED_ARGS(linux freebsd dragonflybsd): -L-export-dynamic
-// PERMUTE_ARGS:
-// DISABLED: osx
-
-void run19086()
-{
- long x = 1;
- int y = 0;
-#line 20
- throw newException();
-}
-
-// moved here to keep run19086 short
-Exception newException() { return new Exception("hi"); }
-
-void test19086()
-{
- try
- {
- run19086();
- }
- catch(Exception e)
- {
- int line = findLineStackTrace(e.toString(), "run19086");
- assert(line >= 20 && line <= 21);
- }
-}
-
-int findLineStackTrace(string msg, string func)
-{
- // find line number of _Dmain in stack trace
- // on linux: file.d:line _Dmain [addr]
- // on windows: addr in _Dmain at file.d(line)
- int line = 0;
- bool found = false;
- for (size_t pos = 0; pos + func.length < msg.length; pos++)
- {
- if (msg[pos] == '\n')
- {
- line = 0;
- found = false;
- }
- else if ((msg[pos] == ':' || msg[pos] == '(') && line == 0)
- {
- for (pos++; pos < msg.length && msg[pos] >= '0' && msg[pos] <= '9'; pos++)
- line = line * 10 + msg[pos] - '0';
- if (line > 0 && found)
- return line;
- }
- else if (msg[pos .. pos + func.length] == func)
- {
- found = true;
- if (line > 0 && found)
- return line;
- }
- }
- return 0;
-}
-
-void main()
-{
- test19086();
-}
......@@ -12,17 +12,15 @@ diff -Nurp a/dmd/src/dmd/link.d b/dmd/src/dmd/link.d
}
if (global.params.verbose)
{
diff -Nurp a/dmd/src/dmd/mars.d b/dmd/src/dmd/mars.d
--- a/dmd/src/dmd/mars.d
+++ b/dmd/src/dmd/mars.d
@@ -1194,7 +1194,10 @@ void addDefaultVersionIdentifiers(const ref Param params)
// See https://github.com/dlang/dmd/pull/8020
// And https://wiki.osdev.org/Target_Triplet
version (CRuntime_Musl)
+ {
VersionCondition.addPredefinedGlobalIdent("CRuntime_Musl");
+ VersionCondition.addPredefinedGlobalIdent("DRuntime_Use_Libunwind");
+ }
else
VersionCondition.addPredefinedGlobalIdent("CRuntime_Glibc");
VersionCondition.addPredefinedGlobalIdent("CppRuntime_Gcc");
diff --Nurp a/dmd/src/dmd/target.d b/dmd/src/dmd/target.d
--- a/dmd/src/dmd/target.d
+++ b/dmd/src/dmd/target.d
@@ -1253,7 +1253,7 @@ struct TargetC
case DigitalMars: return predef("CRuntime_DigitalMars");
case Glibc: return predef("CRuntime_Glibc");
case Microsoft: return predef("CRuntime_Microsoft");
- case Musl: return predef("CRuntime_Musl");
+ case Musl: return predef("CRuntime_Musl"), predef("DRuntime_Use_Libunwind");
case Newlib: return predef("CRuntime_Newlib");
case UClibc: return predef("CRuntime_UClibc");
case WASI: return predef("CRuntime_WASI");
# Contributor: Mathias LANG <pro.mathias.lang@gmail.com>
# Maintainer: Mathias LANG <pro.mathias.lang@gmail.com>
pkgname=dmd
pkgver=2.096.1
pkgver=2.098.0
pkgrel=0
pkgdesc="D Programming Language reference compiler"
url="https://github.com/dlang/dmd"
......@@ -9,7 +9,7 @@ url="https://github.com/dlang/dmd"
arch="x86_64"
license="BSL-1.0"
depends="llvm-libunwind-dev tzdata"
makedepends="ldc"
makedepends="chrpath ldc"
checkdepends="bash diffutils gdb grep"
source="dmd-$pkgver.tar.gz::https://github.com/dlang/dmd/archive/v$pkgver.tar.gz
druntime-$pkgver.tar.gz::https://github.com/dlang/druntime/archive/v$pkgver.tar.gz
......@@ -41,9 +41,17 @@ build() {
esac
# Compile with the host compiler
make -C "$srcdir/dmd/" -f posix.mak HOST_DMD=ldmd2 ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/install" install
make -C "$srcdir/dmd/" -f posix.mak HOST_DMD=ldmd2 ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/stage1" install
make -C "$srcdir/druntime/" -f posix.mak ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/stage1" install
make -C "$srcdir/phobos/" -f posix.mak ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/stage1" install
# Stage 2: Self-compile - Avoid depending on the exact LDC version used to compile this
make -C "$srcdir/dmd/" -f posix.mak HOST_DMD="$srcdir/stage1/linux/bin64/dmd" ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/install" install
make -C "$srcdir/druntime/" -f posix.mak ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/install" install
make -C "$srcdir/phobos/" -f posix.mak ENABLE_RELEASE=1 INSTALL_DIR="$srcdir/install" install
# Strip redundant rpath to avoid warnings in the builder
chrpath -d "$srcdir/install/linux/bin64/dmd"
}
check() {
......@@ -67,9 +75,11 @@ package() {
chmod +x "$pkgdir"/usr/bin/dmd
}
sha512sums="ccd1bd4674f36231b57e05bc7763062395d6a6c6a995c55869149a25b3a70ab01997357e38dbeb1df1c81c8e6f5c6073ebb9626bef83b7ed0611b6b1cdc5e370 dmd-2.096.1.tar.gz
d253ec716b9a6e81188773dbe67afcdbdb7606d8dbcf821c4ddde285d57915fff99a5295a26a67c5d7a2a5e6ea0cab753fe7c362b565c1e89e1aaecafa6e99b2 druntime-2.096.1.tar.gz
3312502f87548faf85d5d2c3169043d4732d879798379ba36de7582ddd880c03402594ac71c95a0ba3bc8f1a327a5eeb833dd886606b38d39cb5331405af4d93 phobos-2.096.1.tar.gz
sha512sums="
9d232e2b7b006c6ac20c16aeef95658301bec76a93f82bb8555235b8d4911bc1947b0d57709739c1945dc7a3921e11a0fbe7970b455bd84add9245906058b4fc dmd-2.098.0.tar.gz
183f95eb972e43f52b39d3f51fcdbf8a20006244ecb213a09886a18e9b3dd658625f5d0fc95cc86e7a343ab5d96298de4ff11320715879da01af203199c1749f druntime-2.098.0.tar.gz
fd59f4214ab4100726b22192b8b5a68a0438f0d8f39c1ad4c27419efb3e6f660dfd0751d414572f198eec94781e4ea30769aeb47a27e9577942537ff3201ff1f phobos-2.098.0.tar.gz
123ec0f256a73030a5e5b4b87a7f2e0752320777b7fcd175a221807ec2917f5d6d88776c3448eab077eb7a2211dd4a3d64e3a556053b0f183eb058da437bc5da dmd-install-config.conf
1b43a0db48576064d3de0b6500a076bd3c30731be998a478da6ac515699513e2647c912428c8a37364e3ea665c3f92bb4e8d7df5dbaf51f09d21a03d3cd14127 10-dmd-musl.patch
b18186ff5eec446709f9824cdf7094d751afdfa0d14c099e8369ec84eeabd7358c13ef5bcb5aa8aa5c8bf97fa658867d446eaf34d48403c3495f36d6a488b677 0008-Remove-failing-tests-with-llvm-libunwind.patch"
3e0c33114c27b570a992fb6a9cbab8a4b4acf394a6fb9012c66d5bb9573e1d20c97f76ccfc1eda9cb750ed27372c71b40a7b4247eaa51f8a24b59a1b9f06e37c 10-dmd-musl.patch
54246e757487244a7131072d484fbf4c31ca76546f867124466b98f2c3b4d2c82dff1ce53a0fbd94614d1ccac4be4903d14d461f9b267cf8060fcb08ddd675a9 0008-Remove-failing-tests-with-llvm-libunwind.patch
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment