View | Details | Raw Unified | Return to bug 237427 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-39 / +79 lines)
Lines 1-64 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	ldc
3
PORTNAME=		ldc
4
PORTVERSION=	1.14.0
4
PORTVERSION=		1.15.0
5
DISTVERSIONPREFIX=	v
5
DISTVERSIONPREFIX=	v
6
CATEGORIES=	lang
6
CATEGORIES=		lang
7
7
8
MAINTAINER=	acm@FreeBSD.org
8
MAINTAINER=		acm@FreeBSD.org
9
COMMENT=	The LLVM-based D compiler
9
COMMENT=		The LLVM-based D compiler
10
LICENSE=		BSD3CLAUSE
11
USES= 			ninja cmake:insource compiler
12
CONFLICTS_INSTALL=	ldc
10
13
11
LICENSE=	BSD3CLAUSE
14
FLAVORS=		llvm70 llvm80
15
FLAVOR?=		${FLAVORS[0]}
12
16
13
BUILD_DEPENDS=	llvm70>0:devel/llvm70
17
OPTIONS_GROUP=		BOOTSTRAP
14
RUN_DEPENDS=	llvm70>0:devel/llvm70
18
BOOTSTRAP_DESC=		Force using ltsmaster to bootstrap
15
LIB_DEPENDS=	libconfig.so:devel/libconfig
19
OPTIONS_GROUP_BOOTSTRAP=LTSMASTER
16
20
17
BROKEN_aarch64=		fails to compile: Error: undefined identifier _jmp_buf, did you mean alias jmp_buf?
21
llvm70_PKGNAMEPREFIX=	llvm70-
22
llvm70_BUILD_DEPENDS=	llvm70>0:devel/llvm70
23
llvm70_RUN_DEPENDS=	llvm70>0:devel/llvm70
24
25
llvm80_PKGNAMEPREFIX=	llvm80-
26
llvm80_BUILD_DEPENDS=	llvm80>0:devel/llvm80
27
llvm80_RUN_DEPENDS=	llvm80>0:devel/llvm80
28
29
PREFIX?=		${LOCALBASE}/${PKGNAMEPREFIX}${PORTNAME}
30
PLIST_SUB=		LOCALBASE=${LOCALBASE}
31
18
BROKEN_armv6=		fails to compile: Error: undefined identifier _jmp_buf, did you mean alias jmp_buf?
32
BROKEN_armv6=		fails to compile: Error: undefined identifier _jmp_buf, did you mean alias jmp_buf?
19
BROKEN_armv7=		fails to compile: Error: undefined identifier _jmp_buf, did you mean alias jmp_buf?
33
BROKEN_armv7=		fails to compile: Error: undefined identifier _jmp_buf, did you mean alias jmp_buf?
20
BROKEN_i386=		function core.bitop.bsf (uint v) is not callable using argument types (ulong)
34
BROKEN_i386=		function core.bitop.bsf (uint v) is not callable using argument types (ulong)
21
BROKEN_powerpc64=	fails to compile: cc1plus: error: unrecognized command line option "-std=c++11"
35
BROKEN_powerpc64=	fails to compile: cc1plus: error: unrecognized command line option "-std=c++11"
22
36
23
USES=		cmake:insource
37
USE_GITHUB=		yes
24
USE_GITHUB=     yes
38
GH_ACCOUNT=		ldc-developers
25
GH_ACCOUNT=     ldc-developers
39
GH_PROJECT=		ldc
26
GH_PROJECT=     ldc
40
GH_TUPLE=		ldc-developers:druntime:8a85f37:druntime/runtime/druntime \
27
GH_TUPLE=       ldc-developers:ldc:911589c:tree/ltsmaster \
41
			ldc-developers:phobos:981412b:phobos/runtime/phobos
28
		ldc-developers:druntime:694089c:druntimelts/ltsmaster/runtime/druntime \
29
		ldc-developers:phobos:1d758b2:phoboslts/ltsmaster/runtime/phobos \
30
		ldc-developers:druntime:54cb25c:druntime/runtime/druntime \
31
		ldc-developers:phobos:71cf74f:phobos/runtime/phobos
32
42
33
CMAKE_ARGS+=	-DD_COMPILER:STRING="${WRKSRC}/ltsmaster/bin/ldmd2" \
43
CC=			${LOCALBASE}/bin/clang${LLVMVER}
34
		-DBUILD_SHARED_LIBS:STRING="BOTH"
44
CXX=			${LOCALBASE}/bin/clang++${LLVMVER}
45
LLVM_CONFIG=		${LOCALBASE}/bin/llvm-config${LLVMVER}
46
LDCVER=			${PORTVERSION}
35
47
36
CC=		clang70
48
.include <bsd.port.pre.mk>
37
CXX=		clang++70
38
49
39
BOOTVER=	0.17.6
50
.if ${FLAVOR} == "llvm70"
40
LLVM_CONFIG=	llvm-config70
51
LLVMVER=		70
41
LDCVER=		${PORTVERSION}
52
.else
53
LLVMVER=		80
54
.endif
42
55
43
.include <bsd.port.pre.mk>
56
.if ${ARCH} == "amd64" || ${ARCH} == "aarch64"
57
CFLAGS+=		-fPIC
58
.endif
44
59
45
.if ${ARCH} == "amd64"
60
# Search for a usable bootstrap compiler or fall back to building ltsmaster
46
CFLAGS+=	-fPIC
61
DRUNTIME_MINVER=	20680
62
DRUNTIME_MAXVER=	20841
63
64
DCOMPILERS=		ldmd2 gdmd dmd
65
66
.if empty(PORT_OPTIONS:MLTSMASTER)
67
.for DC_TRY in ${DCOMPILERS}
68
.if !defined(DC_HOST)
69
VERSION!=		`which ${DC_TRY}` --version | ${SED} -n 's!^.*DMD.*v\([0-9]\).\([0-9][0-9][0-9]\).\([0-9]\).*!\1\2\3!p'
70
.if ${VERSION} > ${DRUNTIME_MINVER} && ${VERSION} <= ${DRUNTIME_MAXVER}
71
DC_HOST!=		which ${DC_TRY}
72
BUILD_BOOTSTRAP=	no
47
.endif
73
.endif
74
.endif
75
.endfor
76
.endif
48
77
49
.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1200029
78
# falling back to creating bootstrap d-compiler 
50
EXTRA_PATCHES=	${PATCHDIR}/fbsd12-*
79
.if !defined (DC_HOST)
80
BUILD_BOOTSTRAP=        yes
81
BOOTSTRAP_DIR=		${WRKDIRPREFIX}${.CURDIR}/work-bootstrap
82
DC_HOST=		${BOOTSTRAP_DIR}/ltsmaster/bin/ldmd2
83
BUILD_BOOTSTRAP=	yes
51
.endif
84
.endif
52
85
53
post-patch:
86
CMAKE_ARGS+=		-DLDC_INSTALL_PREFIX="${PREFIX}" \
54
	${REINPLACE_CMD} -e 's|$${llvm_config_names}|${LLVM_CONFIG}|g' \
87
			-DD_COMPILER:STRING="${DC_HOST}" \
55
		${WRKSRC}/ltsmaster/cmake/Modules/FindLLVM.cmake \
88
			-DCMAKE_C_COMPILER:STRING="${CC}" \
56
		${WRKSRC}/cmake/Modules/FindLLVM.cmake
89
			-DCMAKE_CXX_COMPILER:STRING="${CXX}" \
90
			-DLLVM_CONFIG:PATH=${LLVM_CONFIG} \
91
			-DBUILD_SHARED_LIBS:STRING="BOTH"
57
92
93
pre-build:
94
	@echo "DEBUG: bootstrap:${BUILD_BOOTSTRAP} dmd:${DC_HOST} ver:${VERSION} options:${PORT_OPTIONS} flavor:${FLAVOR}"
95
96
.if ${BUILD_BOOTSTRAP} == "yes"
58
pre-configure:
97
pre-configure:
59
	@cd ${WRKSRC}/ltsmaster && \
98
	@echo "Building Bootstrap d-compiler..."
60
	    ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} .
99
	${MAKE} -f Makefile.bootstrap FLAVOR=bootstrap
61
	@cd ${WRKSRC}/ltsmaster && \
100
.else
62
	    ${SETENV} ${MAKE_ENV} ${MAKE}
101
	@echo "Reusing pre-existing d-compiler..."
102
.endif
63
103
64
.include <bsd.port.post.mk>
104
.include <bsd.port.post.mk>
(-)Makefile.bootstrap (+59 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=		ldc
4
PORTVERSION=		0.17.6
5
DISTVERSIONPREFIX=	v
6
CATEGORIES=		lang
7
8
PATCHDIR=       	${MASTERDIR}/files.bootstrap
9
DISTINFO_FILE=  	${MASTERDIR}/distinfo.bootstrap
10
11
MAINTAINER=		acm@FreeBSD.org
12
COMMENT=		The LLVM-based D compiler
13
LICENSE=		BSD3CLAUSE
14
USES= 			ninja cmake:insource compiler
15
16
BUILD_DEPENDS=		llvm70>0:devel/llvm70
17
LLVMVER=		70
18
19
# fake flavor support in bootstrap (as it is being passed down)
20
FLAVORS=		bootstrap
21
FLAVOR?=		${FLAVORS[0]}
22
23
BROKEN_armv6=		fails to compile: Error: undefined identifier _jmp_buf, did you mean alias jmp_buf?
24
BROKEN_armv7=		fails to compile: Error: undefined identifier _jmp_buf, did you mean alias jmp_buf?
25
BROKEN_i386=		function core.bitop.bsf (uint v) is not callable using argument types (ulong)
26
BROKEN_powerpc64=	fails to compile: cc1plus: error: unrecognized command line option "-std=c++11"
27
28
USE_GITHUB=		yes
29
GH_ACCOUNT=		ldc-developers
30
GH_PROJECT=		ldc
31
GH_TUPLE=		ldc-developers:druntime:13b1ccf:druntimelts/runtime/druntime \
32
			ldc-developers:phobos:1d758b2:phoboslts/runtime/phobos
33
34
CC=			${LOCALBASE}/bin/clang${LLVMVER}
35
CXX=			${LOCALBASE}/bin/clang++${LLVMVER}
36
LLVM_CONFIG=		${LOCALBASE}/bin/llvm-config${LLVMVER}
37
LDCVER=			${PORTVERSION}
38
39
.include <bsd.port.pre.mk>
40
41
.if ${ARCH} == "amd64" || ${ARCH} == "aarch64"
42
CFLAGS+=		-fPIC
43
.endif
44
45
CMAKE_ARGS+=		-DCMAKE_C_COMPILER:STRING="${CC}" \
46
			-DCMAKE_CXX_COMPILER:STRING="${CXX}" \
47
			-DLLVM_CONFIG:PATH=${LLVM_CONFIG} \
48
			-DBUILD_SHARED_LIBS:STRING="BOTH"
49
50
.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1200029
51
EXTRA_PATCHES=		${PATCHDIR}/fbsd12-*
52
.endif
53
54
post-patch:
55
	${LN} -sf ${WRKSRC} ${WRKDIR}/ltsmaster
56
	${REINPLACE_CMD} -e 's|$${llvm_config_names}|${LLVM_CONFIG}|g' \
57
		${WRKSRC}/cmake/Modules/FindLLVM.cmake 
58
59
.include <bsd.port.post.mk>
(-)distinfo (-11 / +11 lines)
Lines 1-13 Link Here
1
TIMESTAMP = 1551800863
1
TIMESTAMP = 1555631456
2
SHA256 (ldc-developers-ldc-v1.14.0_GH0.tar.gz) = daa7876ce846861cd9feb92f35dc0ca537a845492ca8a3eebecc9d166bc324b3
2
SHA256 (ldc-developers-ldc-v1.15.0_GH0.tar.gz) = ccf4f11b1c841b48abf39d6160cdf42424ad30ed18d51e5114080d82cdca8c94
3
SIZE (ldc-developers-ldc-v1.14.0_GH0.tar.gz) = 1664660
3
SIZE (ldc-developers-ldc-v1.15.0_GH0.tar.gz) = 1701470
4
SHA256 (ldc-developers-ldc-911589c_GH0.tar.gz) = c10ee47d857358ea97eccd14b49b4152c7b2621c0129eee1e8f98988f1d13f5e
4
SHA256 (ldc-developers-ldc-d442f9f_GH0.tar.gz) = a74e55ef567209600fd5fe54f927df2db1540037ba2612ead55862bdf408ed79
5
SIZE (ldc-developers-ldc-911589c_GH0.tar.gz) = 1231073
5
SIZE (ldc-developers-ldc-d442f9f_GH0.tar.gz) = 1231193
6
SHA256 (ldc-developers-druntime-694089c_GH0.tar.gz) = 29b1a27f767ac9c8a0c30926991d9abcda119aaf923b05caa686a6c396ac0a83
6
SHA256 (ldc-developers-druntime-13b1ccf_GH0.tar.gz) = 0be26cb90b540e972eae3660e1b865f97d5b1cb6c7ffe76e2ec4eae89ed63f4a
7
SIZE (ldc-developers-druntime-694089c_GH0.tar.gz) = 953726
7
SIZE (ldc-developers-druntime-13b1ccf_GH0.tar.gz) = 953762
8
SHA256 (ldc-developers-phobos-1d758b2_GH0.tar.gz) = af70f2d4b09e0062ba986e215677f484c1cec2977a74ca1a73d3534a120992e9
8
SHA256 (ldc-developers-phobos-1d758b2_GH0.tar.gz) = af70f2d4b09e0062ba986e215677f484c1cec2977a74ca1a73d3534a120992e9
9
SIZE (ldc-developers-phobos-1d758b2_GH0.tar.gz) = 1923043
9
SIZE (ldc-developers-phobos-1d758b2_GH0.tar.gz) = 1923043
10
SHA256 (ldc-developers-druntime-54cb25c_GH0.tar.gz) = 47a71942f9f6d4c36d867eb2526a72aece36fb959cf99619e525cacb4951e864
10
SHA256 (ldc-developers-druntime-8a85f37_GH0.tar.gz) = 966c0ea5b99e56e834eed00f038bd77040898b23dc19e978189deaabe41a8ea7
11
SIZE (ldc-developers-druntime-54cb25c_GH0.tar.gz) = 1665530
11
SIZE (ldc-developers-druntime-8a85f37_GH0.tar.gz) = 1699161
12
SHA256 (ldc-developers-phobos-71cf74f_GH0.tar.gz) = fe01cb3decccde3c5aa0defcba715c283a1f11bf2bed6aedd0e33e43030c9c72
12
SHA256 (ldc-developers-phobos-981412b_GH0.tar.gz) = 2bafb346226e68a9739bd0e65f20f1c176fa51b800b738469b73599e2f3c68b7
13
SIZE (ldc-developers-phobos-71cf74f_GH0.tar.gz) = 2355367
13
SIZE (ldc-developers-phobos-981412b_GH0.tar.gz) = 2358879
(-)distinfo.bootstrap (+7 lines)
Line 0 Link Here
1
TIMESTAMP = 1555631456
2
SHA256 (ldc-developers-ldc-v0.17.6_GH0.tar.gz) = 95aad1cdab93914ef051d79d13de255b7cf271fbdb4d1d93d1b2ea21f546f2c6
3
SIZE (ldc-developers-ldc-v0.17.6_GH0.tar.gz) = 1230980
4
SHA256 (ldc-developers-druntime-13b1ccf_GH0.tar.gz) = 0be26cb90b540e972eae3660e1b865f97d5b1cb6c7ffe76e2ec4eae89ed63f4a
5
SIZE (ldc-developers-druntime-13b1ccf_GH0.tar.gz) = 953762
6
SHA256 (ldc-developers-phobos-1d758b2_GH0.tar.gz) = af70f2d4b09e0062ba986e215677f484c1cec2977a74ca1a73d3534a120992e9
7
SIZE (ldc-developers-phobos-1d758b2_GH0.tar.gz) = 1923043
(-)files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-freebsd-sys_event.d (-14 lines)
Lines 1-14 Link Here
1
--- ltsmaster/runtime/druntime/src/core/sys/freebsd/sys/event.d	2018-08-21 18:55:47.000000000 +0000
2
+++ ltsmaster/runtime/druntime/src/core/sys/freebsd/sys/event.d	2019-03-06 04:06:16.750660000 +0000
3
@@ -46,8 +46,9 @@
4
     short       filter; /* filter for event */
5
     ushort       flags;
6
     uint        fflags;
7
-    intptr_t      data;
8
-    void        *udata; /* opaque user data identifier */
9
+    long      data;
10
+    void*        udata; /* opaque user data identifier */
11
+    ulong[4]        ext;
12
 }
13
 
14
 enum
(-)files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix-sys_stat.d (-59 lines)
Lines 1-59 Link Here
1
--- ltsmaster/runtime/druntime/src/core/sys/posix/sys/stat.d	2018-08-21 18:55:47.000000000 +0000
2
+++ ltsmaster/runtime/druntime/src/core/sys/posix/sys/stat.d	2019-03-06 04:13:18.999142000 +0000
3
@@ -714,32 +714,42 @@
4
 {
5
     struct stat_t
6
     {
7
-        dev_t       st_dev;
8
-        ino_t       st_ino;
9
-        mode_t      st_mode;
10
-        nlink_t     st_nlink;
11
-        uid_t       st_uid;
12
-        gid_t       st_gid;
13
-        dev_t       st_rdev;
14
+        dev_t     st_dev;
15
+        ino_t     st_ino;
16
+        nlink_t   st_nlink;
17
+        mode_t    st_mode;
18
+        short st_padding0;
19
+        uid_t     st_uid;
20
+        gid_t     st_gid;
21
+        int st_padding1;
22
+        dev_t     st_rdev;
23
 
24
+        version(X86) int st_atim_ext;
25
+
26
         time_t      st_atime;
27
         c_long      __st_atimensec;
28
+
29
+        version(X86) int st_mtim_ext;
30
+
31
         time_t      st_mtime;
32
         c_long      __st_mtimensec;
33
+
34
+        version(X86) int st_ctim_ext;
35
+
36
         time_t      st_ctime;
37
         c_long      __st_ctimensec;
38
 
39
-        off_t       st_size;
40
-        blkcnt_t    st_blocks;
41
-        blksize_t   st_blksize;
42
-        fflags_t    st_flags;
43
-        uint        st_gen;
44
-        int         st_lspare;
45
+        version(X86) int st_btim_ext;
46
 
47
         time_t      st_birthtime;
48
         c_long      st_birthtimensec;
49
 
50
-        ubyte[16 - timespec.sizeof] padding;
51
+	off_t     st_size;
52
+        blkcnt_t st_blocks;
53
+        blksize_t st_blksize;
54
+        fflags_t  st_flags;
55
+        ulong st_gen;
56
+        ulong[10] st_spare;
57
     }
58
 
59
     enum S_IRUSR    = 0x100; // octal 0000400
(-)files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix-sys_types.d (-19 lines)
Lines 1-19 Link Here
1
--- ltsmaster/runtime/druntime/src/core/sys/posix/sys/types.d	2019-03-06 04:17:35.909692000 +0000
2
+++ ltsmaster/runtime/druntime/src/core/sys/posix/sys/types.d	2019-03-06 04:18:41.162430000 +0000
3
@@ -124,12 +124,12 @@
4
 else version( FreeBSD )
5
 {
6
     alias long      blkcnt_t;
7
-    alias uint      blksize_t;
8
-    alias uint      dev_t;
9
+    alias ulong      blksize_t;
10
+    alias ulong      dev_t;
11
     alias uint      gid_t;
12
-    alias uint      ino_t;
13
+    alias ulong      ino_t;
14
     alias ushort    mode_t;
15
-    alias ushort    nlink_t;
16
+    alias ulong    nlink_t;
17
     alias long      off_t;
18
     alias int       pid_t;
19
     //size_t (defined in core.stdc.stddef)
(-)files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix_dirent.d (-17 lines)
Lines 1-17 Link Here
1
--- ltsmaster/runtime/druntime/src/core/sys/posix/dirent.d	2019-03-06 04:07:06.836421000 +0000
2
+++ ltsmaster/runtime/druntime/src/core/sys/posix/dirent.d	2019-03-06 04:08:34.306001000 +0000
3
@@ -131,10 +131,12 @@
4
     align(4)
5
     struct dirent
6
     {
7
-        uint      d_fileno;
8
+        ino_t     d_fileno;
9
+        off_t     d_off;
10
         ushort    d_reclen;
11
         ubyte     d_type;
12
-        ubyte     d_namlen;
13
+        ushort    d_namlen;
14
+        ushort    d_pad1;
15
         char[256] d_name;
16
     }
17
 
(-)files/fbsd12-runtime-druntime-src-core-sys-posix_dirent.d (-12 / +10 lines)
Lines 1-21 Link Here
1
--- runtime/druntime/src/core/sys/posix/dirent.d	2019-03-05 17:39:54.822687000 +0000
1
--- runtime/druntime/src/core/sys/posix/dirent.d.orig	2019-04-06 12:24:12.000000000 +0000
2
+++ runtime/druntime/src/core/sys/posix/dirent.d	2019-03-05 17:41:19.267583000 +0000
2
+++ runtime/druntime/src/core/sys/posix/dirent.d	2019-04-21 14:13:39.676998000 +0000
3
@@ -152,11 +152,13 @@
3
@@ -152,11 +152,13 @@
4
     align(4)
4
     align(4)
5
     struct dirent
5
     struct dirent
6
     {
6
     {
7
-        uint      d_fileno;
7
-        uint      d_fileno;
8
-        ushort    d_reclen;
8
+        ino_t     d_fileno;
9
-        ubyte     d_type;
9
+        off_t     d_off;
10
         ushort    d_reclen;
11
         ubyte     d_type;
10
-        ubyte     d_namlen;
12
-        ubyte     d_namlen;
11
-        char[256] d_name;
13
-        char[256] d_name = 0;
12
+         ino_t     d_fileno;
14
+        ushort    d_namlen;
13
+         off_t     d_off;
15
+        ushort    d_pad1;
14
+         ushort    d_reclen;
16
+        char[256] d_name;
15
+         ubyte     d_type;
16
+         ushort    d_namlen;
17
+         ushort    d_pad1;
18
+         char[256] d_name;
19
     }
17
     }
20
 
18
 
21
     alias void* DIR;
19
     alias void* DIR;
(-)files.bootstrap/fbsd12-ltsmaster-cmakelists.txt (+12 lines)
Line 0 Link Here
1
--- CMakeLists.txt	2019-02-02 15:57:45.000000000 +0100
2
+++ CMakeLists.txt	2019-06-16 00:33:00.317055000 +0200
3
@@ -163,6 +163,9 @@
4
     endforeach()
5
 endif()
6
 
7
+append("-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING" LLVM_CFLAGS)
8
+append("-DLLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING" LLVM_CXXFLAGS)
9
+
10
 # Append -mminimal-toc for gcc 4.0.x - 4.5.x on ppc64
11
 if( CMAKE_COMPILER_IS_GNUCXX
12
     AND CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64"
(-)files.bootstrap/fbsd12-ltsmaster-runtime-druntime-src-core-sys-freebsd-sys_event.d (+14 lines)
Line 0 Link Here
1
--- runtime/druntime/src/core/sys/freebsd/sys/event.d	2018-08-21 18:55:47.000000000 +0000
2
+++ runtime/druntime/src/core/sys/freebsd/sys/event.d	2019-03-06 04:06:16.750660000 +0000
3
@@ -46,8 +46,9 @@
4
     short       filter; /* filter for event */
5
     ushort       flags;
6
     uint        fflags;
7
-    intptr_t      data;
8
-    void        *udata; /* opaque user data identifier */
9
+    long      data;
10
+    void*        udata; /* opaque user data identifier */
11
+    ulong[4]        ext;
12
 }
13
 
14
 enum
(-)files.bootstrap/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix-sys_stat.d (+59 lines)
Line 0 Link Here
1
--- runtime/druntime/src/core/sys/posix/sys/stat.d	2018-08-21 18:55:47.000000000 +0000
2
+++ runtime/druntime/src/core/sys/posix/sys/stat.d	2019-03-06 04:13:18.999142000 +0000
3
@@ -714,32 +714,42 @@
4
 {
5
     struct stat_t
6
     {
7
-        dev_t       st_dev;
8
-        ino_t       st_ino;
9
-        mode_t      st_mode;
10
-        nlink_t     st_nlink;
11
-        uid_t       st_uid;
12
-        gid_t       st_gid;
13
-        dev_t       st_rdev;
14
+        dev_t     st_dev;
15
+        ino_t     st_ino;
16
+        nlink_t   st_nlink;
17
+        mode_t    st_mode;
18
+        short st_padding0;
19
+        uid_t     st_uid;
20
+        gid_t     st_gid;
21
+        int st_padding1;
22
+        dev_t     st_rdev;
23
 
24
+        version(X86) int st_atim_ext;
25
+
26
         time_t      st_atime;
27
         c_long      __st_atimensec;
28
+
29
+        version(X86) int st_mtim_ext;
30
+
31
         time_t      st_mtime;
32
         c_long      __st_mtimensec;
33
+
34
+        version(X86) int st_ctim_ext;
35
+
36
         time_t      st_ctime;
37
         c_long      __st_ctimensec;
38
 
39
-        off_t       st_size;
40
-        blkcnt_t    st_blocks;
41
-        blksize_t   st_blksize;
42
-        fflags_t    st_flags;
43
-        uint        st_gen;
44
-        int         st_lspare;
45
+        version(X86) int st_btim_ext;
46
 
47
         time_t      st_birthtime;
48
         c_long      st_birthtimensec;
49
 
50
-        ubyte[16 - timespec.sizeof] padding;
51
+	off_t     st_size;
52
+        blkcnt_t st_blocks;
53
+        blksize_t st_blksize;
54
+        fflags_t  st_flags;
55
+        ulong st_gen;
56
+        ulong[10] st_spare;
57
     }
58
 
59
     enum S_IRUSR    = 0x100; // octal 0000400
(-)files.bootstrap/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix-sys_types.d (+19 lines)
Line 0 Link Here
1
--- runtime/druntime/src/core/sys/posix/sys/types.d	2019-03-06 04:17:35.909692000 +0000
2
+++ runtime/druntime/src/core/sys/posix/sys/types.d	2019-03-06 04:18:41.162430000 +0000
3
@@ -124,12 +124,12 @@
4
 else version( FreeBSD )
5
 {
6
     alias long      blkcnt_t;
7
-    alias uint      blksize_t;
8
-    alias uint      dev_t;
9
+    alias ulong      blksize_t;
10
+    alias ulong      dev_t;
11
     alias uint      gid_t;
12
-    alias uint      ino_t;
13
+    alias ulong      ino_t;
14
     alias ushort    mode_t;
15
-    alias ushort    nlink_t;
16
+    alias ulong    nlink_t;
17
     alias long      off_t;
18
     alias int       pid_t;
19
     //size_t (defined in core.stdc.stddef)
(-)files.bootstrap/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix_dirent.d (+17 lines)
Line 0 Link Here
1
--- runtime/druntime/src/core/sys/posix/dirent.d	2019-03-06 04:07:06.836421000 +0000
2
+++ runtime/druntime/src/core/sys/posix/dirent.d	2019-03-06 04:08:34.306001000 +0000
3
@@ -131,10 +131,12 @@
4
     align(4)
5
     struct dirent
6
     {
7
-        uint      d_fileno;
8
+        ino_t     d_fileno;
9
+        off_t     d_off;
10
         ushort    d_reclen;
11
         ubyte     d_type;
12
-        ubyte     d_namlen;
13
+        ushort    d_namlen;
14
+        ushort    d_pad1;
15
         char[256] d_name;
16
     }
17
 
(-)files.bootstrap/ltsmaster-patch-aarch64 (+82 lines)
Line 0 Link Here
1
- Upstreamed aarch64 support patch (but not merged into ldc's fork):
2
  https://github.com/dlang/druntime/pull/2269
3
- Remove failing (on aarch64) static assert in bootstrap compiler's math function
4
5
--- runtime/druntime/src/core/sys/posix/setjmp.d.orig	2018-12-15 16:48:11 UTC
6
+++ runtime/druntime/src/core/sys/posix/setjmp.d
7
@@ -163,6 +163,12 @@ else version( FreeBSD )
8
         enum _JBLEN = 5;
9
         struct _jmp_buf { c_long[_JBLEN + 1] _jb; }
10
     }
11
+    else version( AArch64 )
12
+    {
13
+        enum _JBLEN = 31;
14
+        // __int128_t
15
+        struct _jmp_buf { long[2][_JBLEN + 1] _jb; };
16
+    }
17
     else
18
         static assert(0);
19
     alias _jmp_buf[1] jmp_buf;
20
@@ -249,6 +255,11 @@ else version( FreeBSD )
21
         enum _JB_SIGMASK    = 3;
22
         enum _JB_SIGFLAG    = 5;
23
         struct _sigjmp_buf { c_long[_JBLEN + 1] _sjb; }
24
+    }
25
+    else version( AArch64 )
26
+    {
27
+        // __int128_t
28
+        struct _sigjmp_buf { long[2][_JBLEN + 1] _jb; };
29
     }
30
     else
31
         static assert(0);
32
--- runtime/druntime/src/core/sys/posix/ucontext.d.orig	2018-12-15 16:48:11 UTC
33
+++ runtime/druntime/src/core/sys/posix/ucontext.d
34
@@ -686,6 +686,38 @@ else version( FreeBSD )
35
             int[6]          mc_spare2;
36
         }
37
     }
38
+    else version( AArch64 )
39
+    {
40
+        alias __register_t = long;
41
+
42
+        struct gpregs
43
+        {
44
+            __register_t[30] gp_x;
45
+            __register_t     gp_lr;
46
+            __register_t     gp_sp;
47
+            __register_t     gp_elr;
48
+            uint             gp_spsr;
49
+            int              gp_pad;
50
+        }
51
+
52
+        struct fpregs
53
+        {
54
+            ulong[2][32]    fp_q; // __uint128_t
55
+            uint            fp_sr;
56
+            uint            fp_cr;
57
+            int             fp_flags;
58
+            int             fp_pad;
59
+        }
60
+
61
+        struct mcontext_t
62
+        {
63
+            gpregs          mc_gpregs;
64
+            fpregs          mc_fpregs;
65
+            int             mc_flags;
66
+            int             mc_pad;
67
+            ulong[8]        mc_spare;
68
+        }
69
+    }
70
 
71
     // <ucontext.h>
72
     enum UCF_SWAPPED = 0x00000001;
73
--- runtime/phobos/std/internal/math/gammafunction.d.orig	2019-04-20 23:21:36 UTC
74
+++ runtime/phobos/std/internal/math/gammafunction.d
75
@@ -1654,7 +1654,6 @@ real logmdigammaInverse(real y)
76
 {
77
     import std.numeric: findRoot;
78
     enum maxY = logmdigamma(real.min_normal);
79
-    static assert(maxY > 0 && maxY <= real.max);
80
 
81
     if (y >= maxY)
82
     {
(-)pkg-plist (-10 / +21 lines)
Lines 14-19 Link Here
14
include/d/core/internal/abort.d
14
include/d/core/internal/abort.d
15
include/d/core/internal/arrayop.d
15
include/d/core/internal/arrayop.d
16
include/d/core/internal/convert.d
16
include/d/core/internal/convert.d
17
include/d/core/internal/dassert.d
17
include/d/core/internal/hash.d
18
include/d/core/internal/hash.d
18
include/d/core/internal/parseoptions.d
19
include/d/core/internal/parseoptions.d
19
include/d/core/internal/spinlock.d
20
include/d/core/internal/spinlock.d
Lines 20-25 Link Here
20
include/d/core/internal/string.d
21
include/d/core/internal/string.d
21
include/d/core/internal/traits.d
22
include/d/core/internal/traits.d
22
include/d/core/internal/utf.d
23
include/d/core/internal/utf.d
24
include/d/core/lifetime.d
23
include/d/core/math.d
25
include/d/core/math.d
24
include/d/core/memory.d
26
include/d/core/memory.d
25
include/d/core/runtime.d
27
include/d/core/runtime.d
Lines 46-54 Link Here
46
include/d/core/stdc/time.d
48
include/d/core/stdc/time.d
47
include/d/core/stdc/wchar_.d
49
include/d/core/stdc/wchar_.d
48
include/d/core/stdc/wctype.d
50
include/d/core/stdc/wctype.d
51
include/d/core/stdcpp/allocator.d
49
include/d/core/stdcpp/array.d
52
include/d/core/stdcpp/array.d
50
include/d/core/stdcpp/exception.d
53
include/d/core/stdcpp/exception.d
54
include/d/core/stdcpp/new_.d
51
include/d/core/stdcpp/string_view.d
55
include/d/core/stdcpp/string_view.d
56
include/d/core/stdcpp/type_traits.d
52
include/d/core/stdcpp/typeinfo.d
57
include/d/core/stdcpp/typeinfo.d
53
include/d/core/stdcpp/xutility.d
58
include/d/core/stdcpp/xutility.d
54
include/d/core/sync/barrier.d
59
include/d/core/sync/barrier.d
Lines 554-576 Link Here
554
include/d/std/zip.d
559
include/d/std/zip.d
555
include/d/std/zlib.d
560
include/d/std/zlib.d
556
lib/libdruntime-ldc-debug-shared.so
561
lib/libdruntime-ldc-debug-shared.so
557
lib/libdruntime-ldc-debug-shared.so.2.0.84
562
lib/libdruntime-ldc-debug-shared.so.2.0.85
558
lib/libdruntime-ldc-debug-shared.so.84
563
lib/libdruntime-ldc-debug-shared.so.85
559
lib/libdruntime-ldc-debug.a
564
lib/libdruntime-ldc-debug.a
560
lib/libdruntime-ldc-shared.so
565
lib/libdruntime-ldc-shared.so
561
lib/libdruntime-ldc-shared.so.2.0.84
566
lib/libdruntime-ldc-shared.so.2.0.85
562
lib/libdruntime-ldc-shared.so.84
567
lib/libdruntime-ldc-shared.so.85
563
lib/libdruntime-ldc.a
568
lib/libdruntime-ldc.a
564
lib/libldc-jit-rt.a
569
lib/libldc-jit-rt.a
565
lib/libldc-jit.so
570
lib/libldc-jit.so
566
lib/libldc-jit.so.2.0.84
571
lib/libldc-jit.so.2.0.85
567
lib/libldc-jit.so.84
572
lib/libldc-jit.so.85
568
lib/libphobos2-ldc-debug-shared.so
573
lib/libphobos2-ldc-debug-shared.so
569
lib/libphobos2-ldc-debug-shared.so.2.0.84
574
lib/libphobos2-ldc-debug-shared.so.2.0.85
570
lib/libphobos2-ldc-debug-shared.so.84
575
lib/libphobos2-ldc-debug-shared.so.85
571
lib/libphobos2-ldc-debug.a
576
lib/libphobos2-ldc-debug.a
572
lib/libphobos2-ldc-shared.so
577
lib/libphobos2-ldc-shared.so
573
lib/libphobos2-ldc-shared.so.2.0.84
578
lib/libphobos2-ldc-shared.so.2.0.85
574
lib/libphobos2-ldc-shared.so.84
579
lib/libphobos2-ldc-shared.so.85
575
lib/libphobos2-ldc.a
580
lib/libphobos2-ldc.a
576
@dir include/d/etc/c/zlib
581
@dir include/d/etc/c/zlib
582
@postexec if [ ! -f %%LOCALBASE%%/bin/ldc2 ]; then ln -s %%PREFIX%%/bin/ldc2 %%LOCALBASE%%/bin/ldc2 && touch %%PREFIX%%/.ldc2-alt-linked ;fi
583
@postexec if [ ! -f %%LOCALBASE%%/bin/ldmd2 ]; then ln -s %%PREFIX%%/bin/ldmd2 %%LOCALBASE%%/bin/ldmd2 && touch %%PREFIX%%/.ldmd2-alt-linked ;fi
584
@postexec if [ ! -f %%LOCALBASE%%/etc/ldc2.conf ]; then ln -s %%PREFIX%%/etc/ldc2.conf %%LOCALBASE%%/etc/ldc2.conf && touch %%PREFIX%%/.ldc2.conf-alt-linked ;fi
585
@postunexec if [ -f %%PREFIX%%/.ldc2-alt-linked ]; then rm %%LOCALBASE%%/bin/ldc2 ;fi
586
@postunexec if [ -f %%PREFIX%%/.ldmd2-alt-linked ]; then rm %%LOCALBASE%%/bin/ldmd2 ;fi
587
@postunexec if [ -f %%PREFIX%%/.ldc2.conf-alt-linked ]; then rm %%LOCALBASE%%/etc/ldc2.conf ;fi

Return to bug 237427