aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/401-dlang-32bits.patch
diff options
context:
space:
mode:
authorGeod24 <pro.mathias.lang@gmail.com>2019-10-28 03:07:44 +0900
committerNatanael Copa <ncopa@alpinelinux.org>2019-12-26 10:16:00 +0000
commit5bbe16ae7b8eec705cb27a5ab84914130c077d65 (patch)
treec5f7dfbc6662960c337b5fb261eec407c6d75493 /main/gcc/401-dlang-32bits.patch
parentae019b5c972f11cdbd4d827ab7676ad1ef364f0c (diff)
downloadaports-5bbe16ae7b8eec705cb27a5ab84914130c077d65.tar.bz2
aports-5bbe16ae7b8eec705cb27a5ab84914130c077d65.tar.xz
main/gcc: Add support for the D programming language
GDC, the GCC-based D compiler, is part of GCC since GCC9. Upstream support for Musl was added progressively (D relies heavily on libc), and some key components were missing as of GCC 9.2.0 release (2019-08-12). The final patches to support Musl have been submitted to the gcc-patches mailing list on the 2019-08-21. This includes a smaller version of those patches, tailored to only include the changes necessary to Musl. Most of the patch could be removed after/if GCC 9.3.0 is released.
Diffstat (limited to 'main/gcc/401-dlang-32bits.patch')
-rw-r--r--main/gcc/401-dlang-32bits.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/gcc/401-dlang-32bits.patch b/main/gcc/401-dlang-32bits.patch
new file mode 100644
index 0000000000..6072546f7b
--- /dev/null
+++ b/main/gcc/401-dlang-32bits.patch
@@ -0,0 +1,25 @@
+--- a/libphobos/libdruntime/core/sys/posix/config.d 2019-10-29 15:54:05.000000000 +0900
++++ b/libphobos/libdruntime/core/sys/posix/config.d 2019-10-29 15:54:08.000000000 +0900
+@@ -67,15 +67,21 @@ version (CRuntime_Glibc)
+ }
+ else version (CRuntime_Musl)
+ {
++ // off_t is always 64 bits on Musl
+ enum _FILE_OFFSET_BITS = 64;
+
++ // Not present in Musl sources
+ enum __REDIRECT = false;
+
++ // Those three are irrelevant for Musl as it always uses 64 bits off_t
+ enum __USE_FILE_OFFSET64 = _FILE_OFFSET_BITS == 64;
+ enum __USE_LARGEFILE = __USE_FILE_OFFSET64 && !__REDIRECT;
+ enum __USE_LARGEFILE64 = __USE_FILE_OFFSET64 && !__REDIRECT;
+
+- enum __WORDSIZE=64;
++ version (D_LP64)
++ enum __WORDSIZE = 64;
++ else
++ enum __WORDSIZE = 32;
+ }
+ else version (CRuntime_UClibc)
+ {