FreeBSD Bugzilla – Attachment 237082 Details for
Bug 266828
lang/ldc: Update to 1.30.0 (WIP)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for ldc
ldc1300-v3.patch (text/plain), 35.36 KB, created by
Daniel Engberg
on 2022-10-04 22:52:01 UTC
(
hide
)
Description:
Patch for ldc
Filename:
MIME Type:
Creator:
Daniel Engberg
Created:
2022-10-04 22:52:01 UTC
Size:
35.36 KB
patch
obsolete
>diff --git a/lang/ldc/Makefile b/lang/ldc/Makefile >index 2c8c4aa742a6..a845722400b3 100644 >--- a/lang/ldc/Makefile >+++ b/lang/ldc/Makefile >@@ -1,8 +1,8 @@ > PORTNAME= ldc >-PORTVERSION= 1.23.0 >-DISTVERSIONPREFIX= v >-PORTREVISION= 1 >+DISTVERSION= 1.30.0 > CATEGORIES= lang >+MASTER_SITES= https://github.com/ldc-developers/${PORTNAME}/releases/download/v${DISTVERSION}/ >+DISTVERSIONSUFFIX= -src > > MAINTAINER= acm@FreeBSD.org > COMMENT= LLVM-based D compiler >@@ -15,52 +15,44 @@ BROKEN_armv7= fails to compile: Error: undefined identifier _jmp_buf, did you me > BROKEN_i386= function core.bitop.bsf (uint v) is not callable using argument types (ulong) > BROKEN_riscv64= fails to compile: unable to get target for 'riscv64-portbld-freebsd13.0', see -version and -mtriple. > >-LLVM_VERSION= 10 >-BUILD_DEPENDS= llvm70>0:devel/llvm70 \ >- llvm${LLVM_VERSION}>0:devel/llvm${LLVM_VERSION} >-RUN_DEPENDS= llvm70>0:devel/llvm70 \ >- llvm${LLVM_VERSION}>0:devel/llvm${LLVM_VERSION} >-LIB_DEPENDS= libconfig.so:devel/libconfig >- >-USES= ninja cmake:insource >- >-USE_GITHUB= yes >-GH_ACCOUNT= ldc-developers >-GH_PROJECT= ldc >-GH_TUPLE= ldc-developers:ldc:911589c:tree/ltsmaster \ >- ldc-developers:druntime:13b1ccf:druntimelts/ltsmaster/runtime/druntime \ >- ldc-developers:phobos:1d758b2:phoboslts/ltsmaster/runtime/phobos \ >- ldc-developers:druntime:cc97ccd:druntime/runtime/druntime \ >- ldc-developers:phobos:8ae121c:phobos/runtime/phobos >+BUILD_DEPENDS= gdmd>0:devel/gdmd >+LIB_DEPENDS= libgphobos.so:lang/gcc${_GCC_VER} \ >+ libLLVM-${_LLVM_VER}.so:devel/llvm${_LLVM_VER} > >+USES= cmake pkgconfig > USE_LDCONFIG= yes > >-CC= ${LOCALBASE}/bin/clang${LLVM_VERSION} >-CXX= ${LOCALBASE}/bin/clang++${LLVM_VERSION} >-LLVM_CONFIG= ${LOCALBASE}/bin/llvm-config${LLVM_VERSION} >-LDCVER= ${PORTVERSION} >- >-.include <bsd.port.pre.mk> >- >-.if ${ARCH} == "aarch64" || ${ARCH} == "amd64" >-CFLAGS+= -fPIC >-.endif >- >-.if ${OPSYS} == FreeBSD >-EXTRA_PATCHES= ${PATCHDIR}/fbsd12-* >-.endif >- >-CMAKE_ARGS+= -DLDC_INSTALL_PREFIX="${PREFIX}" \ >- -DD_COMPILER:STRING="${WRKSRC}/ltsmaster/bin/ldmd2" \ >- -DCMAKE_C_COMPILER:STRING="${CC}" \ >- -DCMAKE_CXX_COMPILER:STRING="${CXX}" \ >- -DLLVM_CONFIG:PATH=${LLVM_CONFIG} \ >- -DBUILD_SHARED_LIBS:STRING="BOTH" >- >-pre-configure: >- @cd ${WRKSRC}/ltsmaster && \ >- ${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} -GNinja . >- @cd ${WRKSRC}/ltsmaster && \ >- ${SETENV} ${MAKE_ENV} ninja >- >-.include <bsd.port.post.mk> >+# GCC 11 is the last version that can build a compiler for d(lang) without >+# needing bootstrapping of itself much like go and rust. >+# While LLVM 14 is supported 13 is much more common dependency in tree so >+# lets go with that for now to avoid unnecessary time spent on compiling. >+ >+_GCC_VER= 11 >+_LLVM_VER= 13 >+ >+# This is various settings I found looking at other repos, not sure >+# if any of these makes sense >+#CMAKE_ARGS+= -DC_SYSTEM_LIBS="unwind;m;pthread;rt;dl" \ >+# -DADDITIONAL_DEFAULT_LDC_SWITCHES=' "-linker=bfd", "-link-defaultlib-shared", "-L--export-dynamic", "-L--eh-frame-hdr"' \ >+# -DLLVM_ROOT_DIR="/usr/lib/llvm$_llvmver" \ >+# -DINCLUDE_INSTALL_DIR=/usr/include/dlang/ldc \ >+# -DLDC_WITH_LLD=OFF \ >+# -DD_COMPILER_FLAGS="-link-defaultlib-shared=false -linker=gold --flto=thin" \ >+# -DADDITIONAL_DEFAULT_LDC_SWITCHES="\"-link-defaultlib-shared\"" \ >+ >+CMAKE_ARGS= -DCMAKE_C_COMPILER="${LOCALBASE}/bin/clang${_LLVM_VER}" \ >+ -DCMAKE_CXX_COMPILER="${LOCALBASE}/bin/clang++${_LLVM_VER}" \ >+ -DLLVM_CONFIG:PATH="${LOCALBASE}/bin/llvm-config${_LLVM_VER}" \ >+ -DBUILD_SHARED_LIBS=BOTH >+# https://github.com/ldc-developers/ldc/issues/3795 >+#CMAKE_OFF= LDC_LINK_MANUALLY >+CMAKE_ON= BUILD_LTO_LIBS >+ >+post-install: >+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ldc-build-runtime >+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ldc-profdata >+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ldc-prune-cache >+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ldc2 >+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/ldmd2 >+ >+.include <bsd.port.mk> >diff --git a/lang/ldc/distinfo b/lang/ldc/distinfo >index 3ca30bc46b7b..6c2f15d38ca7 100644 >--- a/lang/ldc/distinfo >+++ b/lang/ldc/distinfo >@@ -1,13 +1,3 @@ >-TIMESTAMP = 1597912509 >-SHA256 (ldc-developers-ldc-v1.23.0_GH0.tar.gz) = 09e78bab1281609aec2dc50d73f14acd9e32b45231701bddf075a7f6910f725c >-SIZE (ldc-developers-ldc-v1.23.0_GH0.tar.gz) = 1869981 >-SHA256 (ldc-developers-ldc-911589c_GH0.tar.gz) = c10ee47d857358ea97eccd14b49b4152c7b2621c0129eee1e8f98988f1d13f5e >-SIZE (ldc-developers-ldc-911589c_GH0.tar.gz) = 1231073 >-SHA256 (ldc-developers-druntime-13b1ccf_GH0.tar.gz) = 0be26cb90b540e972eae3660e1b865f97d5b1cb6c7ffe76e2ec4eae89ed63f4a >-SIZE (ldc-developers-druntime-13b1ccf_GH0.tar.gz) = 953762 >-SHA256 (ldc-developers-phobos-1d758b2_GH0.tar.gz) = af70f2d4b09e0062ba986e215677f484c1cec2977a74ca1a73d3534a120992e9 >-SIZE (ldc-developers-phobos-1d758b2_GH0.tar.gz) = 1923043 >-SHA256 (ldc-developers-druntime-cc97ccd_GH0.tar.gz) = 3ab1e2560c640bb0e77f0a5f91a84c9b464bdc461b8bcf84827b5644e505d64e >-SIZE (ldc-developers-druntime-cc97ccd_GH0.tar.gz) = 1829988 >-SHA256 (ldc-developers-phobos-8ae121c_GH0.tar.gz) = 32aaaf8c8f6578840a7c802962eba1cfb0814c94a6bce854c0b6cd82cb466f43 >-SIZE (ldc-developers-phobos-8ae121c_GH0.tar.gz) = 2415254 >+TIMESTAMP = 1664648295 >+SHA256 (ldc-1.30.0-src.tar.gz) = fdbb376f08242d917922a6a22a773980217fafa310046fc5d6459490af23dacd >+SIZE (ldc-1.30.0-src.tar.gz) = 8292548 >diff --git a/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-freebsd-sys_event.d b/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-freebsd-sys_event.d >deleted file mode 100644 >index 761a66631ae9..000000000000 >--- a/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-freebsd-sys_event.d >+++ /dev/null >@@ -1,14 +0,0 @@ >---- ltsmaster/runtime/druntime/src/core/sys/freebsd/sys/event.d 2018-08-21 18:55:47.000000000 +0000 >-+++ ltsmaster/runtime/druntime/src/core/sys/freebsd/sys/event.d 2019-03-06 04:06:16.750660000 +0000 >-@@ -46,8 +46,9 @@ >- short filter; /* filter for event */ >- ushort flags; >- uint fflags; >-- intptr_t data; >-- void *udata; /* opaque user data identifier */ >-+ long data; >-+ void* udata; /* opaque user data identifier */ >-+ ulong[4] ext; >- } >- >- enum >diff --git a/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix-sys_stat.d b/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix-sys_stat.d >deleted file mode 100644 >index 03fb304eabda..000000000000 >--- a/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix-sys_stat.d >+++ /dev/null >@@ -1,59 +0,0 @@ >---- ltsmaster/runtime/druntime/src/core/sys/posix/sys/stat.d 2018-08-21 18:55:47.000000000 +0000 >-+++ ltsmaster/runtime/druntime/src/core/sys/posix/sys/stat.d 2019-03-06 04:13:18.999142000 +0000 >-@@ -714,32 +714,42 @@ >- { >- struct stat_t >- { >-- dev_t st_dev; >-- ino_t st_ino; >-- mode_t st_mode; >-- nlink_t st_nlink; >-- uid_t st_uid; >-- gid_t st_gid; >-- dev_t st_rdev; >-+ dev_t st_dev; >-+ ino_t st_ino; >-+ nlink_t st_nlink; >-+ mode_t st_mode; >-+ short st_padding0; >-+ uid_t st_uid; >-+ gid_t st_gid; >-+ int st_padding1; >-+ dev_t st_rdev; >- >-+ version(X86) int st_atim_ext; >-+ >- time_t st_atime; >- c_long __st_atimensec; >-+ >-+ version(X86) int st_mtim_ext; >-+ >- time_t st_mtime; >- c_long __st_mtimensec; >-+ >-+ version(X86) int st_ctim_ext; >-+ >- time_t st_ctime; >- c_long __st_ctimensec; >- >-- off_t st_size; >-- blkcnt_t st_blocks; >-- blksize_t st_blksize; >-- fflags_t st_flags; >-- uint st_gen; >-- int st_lspare; >-+ version(X86) int st_btim_ext; >- >- time_t st_birthtime; >- c_long st_birthtimensec; >- >-- ubyte[16 - timespec.sizeof] padding; >-+ off_t st_size; >-+ blkcnt_t st_blocks; >-+ blksize_t st_blksize; >-+ fflags_t st_flags; >-+ ulong st_gen; >-+ ulong[10] st_spare; >- } >- >- enum S_IRUSR = 0x100; // octal 0000400 >diff --git a/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix-sys_types.d b/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix-sys_types.d >deleted file mode 100644 >index e4036fc44b5c..000000000000 >--- a/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix-sys_types.d >+++ /dev/null >@@ -1,19 +0,0 @@ >---- ltsmaster/runtime/druntime/src/core/sys/posix/sys/types.d 2019-03-06 04:17:35.909692000 +0000 >-+++ ltsmaster/runtime/druntime/src/core/sys/posix/sys/types.d 2019-03-06 04:18:41.162430000 +0000 >-@@ -124,12 +124,12 @@ >- else version( FreeBSD ) >- { >- alias long blkcnt_t; >-- alias uint blksize_t; >-- alias uint dev_t; >-+ alias ulong blksize_t; >-+ alias ulong dev_t; >- alias uint gid_t; >-- alias uint ino_t; >-+ alias ulong ino_t; >- alias ushort mode_t; >-- alias ushort nlink_t; >-+ alias ulong nlink_t; >- alias long off_t; >- alias int pid_t; >- //size_t (defined in core.stdc.stddef) >diff --git a/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix_dirent.d b/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix_dirent.d >deleted file mode 100644 >index 8387f06a18d2..000000000000 >--- a/lang/ldc/files/fbsd12-ltsmaster-runtime-druntime-src-core-sys-posix_dirent.d >+++ /dev/null >@@ -1,17 +0,0 @@ >---- ltsmaster/runtime/druntime/src/core/sys/posix/dirent.d 2019-03-06 04:07:06.836421000 +0000 >-+++ ltsmaster/runtime/druntime/src/core/sys/posix/dirent.d 2019-03-06 04:08:34.306001000 +0000 >-@@ -131,10 +131,12 @@ >- align(4) >- struct dirent >- { >-- uint d_fileno; >-+ ino_t d_fileno; >-+ off_t d_off; >- ushort d_reclen; >- ubyte d_type; >-- ubyte d_namlen; >-+ ushort d_namlen; >-+ ushort d_pad1; >- char[256] d_name; >- } >- >diff --git a/lang/ldc/files/patch-cmake_Modules_BuildDExecutable.cmake b/lang/ldc/files/patch-cmake_Modules_BuildDExecutable.cmake >new file mode 100644 >index 000000000000..031ed6c1cc06 >--- /dev/null >+++ b/lang/ldc/files/patch-cmake_Modules_BuildDExecutable.cmake >@@ -0,0 +1,11 @@ >+--- cmake/Modules/BuildDExecutable.cmake.orig 2022-07-20 17:05:27 UTC >++++ cmake/Modules/BuildDExecutable.cmake >+@@ -74,7 +74,7 @@ function(build_d_executable target_name output_exe d_s >+ RUNTIME_OUTPUT_DIRECTORY ${output_dir} >+ LINKER_LANGUAGE CXX >+ ) >+- target_link_libraries(${target_name} ${link_deps} ${linker_args} ${D_LINKER_ARGS}) >++ target_link_libraries(${target_name} ${link_deps} ${linker_args} ${D_LINKER_ARGS} "-lz") >+ else() >+ # Use a response file on Windows when compiling separately, in order not to >+ # exceed the max command-line length. >diff --git a/lang/ldc/files/patch-cmake_Modules_FindLLVM.cmake b/lang/ldc/files/patch-cmake_Modules_FindLLVM.cmake >deleted file mode 100644 >index 2bb6e4eb3ef3..000000000000 >--- a/lang/ldc/files/patch-cmake_Modules_FindLLVM.cmake >+++ /dev/null >@@ -1,11 +0,0 @@ >---- cmake/Modules/FindLLVM.cmake.orig 2020-07-15 20:25:23 UTC >-+++ cmake/Modules/FindLLVM.cmake >-@@ -30,7 +30,7 @@ >- # We also want an user-specified LLVM_ROOT_DIR to take precedence over the >- # system default locations such as /usr/local/bin. Executing find_program() >- # multiples times is the approach recommended in the docs. >--set(llvm_config_names llvm-config-10.0 llvm-config100 llvm-config-10 >-+set(llvm_config_names llvm-config-10.0 llvm-config100 llvm-config-10 llvm-config10 >- llvm-config-9.0 llvm-config90 llvm-config-9 >- llvm-config-8.0 llvm-config80 llvm-config-8 >- llvm-config-7.0 llvm-config70 llvm-config-7 >diff --git a/lang/ldc/files/patch-driver_linker-gcc.cpp b/lang/ldc/files/patch-driver_linker-gcc.cpp >deleted file mode 100644 >index 2a0e64d83526..000000000000 >--- a/lang/ldc/files/patch-driver_linker-gcc.cpp >+++ /dev/null >@@ -1,11 +0,0 @@ >---- driver/linker-gcc.cpp.orig 2020-06-16 16:15:55 UTC >-+++ driver/linker-gcc.cpp >-@@ -647,6 +647,8 @@ void ArgsBuilder::addDefaultPlatformLibs() { >- args.push_back("-ldl"); >- // fallthrough >- case llvm::Triple::FreeBSD: >-+ args.push_back("-lexecinfo"); // for static druntime >-+ // fallthrough >- case llvm::Triple::NetBSD: >- case llvm::Triple::OpenBSD: >- case llvm::Triple::DragonFly: >diff --git a/lang/ldc/files/patch-driver_targetmachine.cpp b/lang/ldc/files/patch-driver_targetmachine.cpp >deleted file mode 100644 >index 1ef456ed1715..000000000000 >--- a/lang/ldc/files/patch-driver_targetmachine.cpp >+++ /dev/null >@@ -1,13 +0,0 @@ >---- driver/targetmachine.cpp.orig 2020-06-16 18:15:55 UTC >-+++ driver/targetmachine.cpp >-@@ -444,6 +444,10 @@ createTargetMachine(const std::string targetTriple, co >- // these OSes. >- // On Android, PIC is default as well. >- relocModel = llvm::Reloc::PIC_; >-+ } else if (triple.isOSFreeBSD()) { >-+ // We default to PIC code to avoid linking issues on FreeBSD, especially >-+ // on aarch64. >-+ relocModel = llvm::Reloc::PIC_; >- } else { >- // ARM for other than Darwin or Android defaults to static >- switch (triple.getArch()) { >diff --git a/lang/ldc/files/patch-ltsmaster_cmake_Modules_FindLLVM.cmake b/lang/ldc/files/patch-ltsmaster_cmake_Modules_FindLLVM.cmake >deleted file mode 100644 >index 879d88cf16c5..000000000000 >--- a/lang/ldc/files/patch-ltsmaster_cmake_Modules_FindLLVM.cmake >+++ /dev/null >@@ -1,12 +0,0 @@ >---- ltsmaster/cmake/Modules/FindLLVM.cmake.orig 2020-07-13 18:03:33 UTC >-+++ ltsmaster/cmake/Modules/FindLLVM.cmake >-@@ -27,7 +27,8 @@ >- # We also want an user-specified LLVM_ROOT_DIR to take precedence over the >- # system default locations such as /usr/local/bin. Executing find_program() >- # multiples times is the approach recommended in the docs. >--set(llvm_config_names llvm-config-6.0 llvm-config60 >-+set(llvm_config_names llvm-config-7.0 llvm-config70 >-+ llvm-config-6.0 llvm-config60 >- llvm-config-5.0 llvm-config50 >- llvm-config-4.0 llvm-config40 >- llvm-config-3.9 llvm-config39 >diff --git a/lang/ldc/files/patch-ltsmaster_driver_targetmachine.cpp b/lang/ldc/files/patch-ltsmaster_driver_targetmachine.cpp >deleted file mode 100644 >index 411937b81102..000000000000 >--- a/lang/ldc/files/patch-ltsmaster_driver_targetmachine.cpp >+++ /dev/null >@@ -1,27 +0,0 @@ >---- ltsmaster/driver/targetmachine.cpp 2018-08-24 00:55:46 UTC >-+++ ltsmaster/driver/targetmachine.cpp >-@@ -587,6 +587,23 @@ >- break; >- } >- >-+ // Taken from clang's lib/Driver/ToolChains/Gnu.cpp >-+ if (triple.getArch() == llvm::Triple::aarch64 || >-+ triple.getArch() == llvm::Triple::aarch64_be || >-+ (triple.getOS() == llvm::Triple::FreeBSD && >-+ triple.getOSMajorVersion() >= 12) || >-+ triple.getOS() == llvm::Triple::NaCl || >-+ (triple.getVendor() == llvm::Triple::MipsTechnologies && >-+ !triple.hasEnvironment()) || >-+ triple.getOS() == llvm::Triple::Solaris >-+#if LDC_LLVM_VER >= 400 >-+ || triple.getArch() == llvm::Triple::riscv32 >-+ || triple.getArch() == llvm::Triple::riscv64 >-+#endif >-+ ) { >-+ targetOptions.UseInitArray = true; >-+ } >-+ >- // Right now, we only support linker-level dead code elimination on Linux >- // using the GNU toolchain (based on ld's --gc-sections flag). The Apple ld >- // on OS X supports a similar flag (-dead_strip) that doesn't require >- >diff --git a/lang/ldc/files/patch-ltsmaster_runtime_druntime_src_core_sys_posix_setjmp.d b/lang/ldc/files/patch-ltsmaster_runtime_druntime_src_core_sys_posix_setjmp.d >deleted file mode 100644 >index 6fb3a8e8aeb0..000000000000 >--- a/lang/ldc/files/patch-ltsmaster_runtime_druntime_src_core_sys_posix_setjmp.d >+++ /dev/null >@@ -1,27 +0,0 @@ >---- ltsmaster/runtime/druntime/src/core/sys/posix/setjmp.d.orig 2020-11-14 19:34:19 UTC >-+++ ltsmaster/runtime/druntime/src/core/sys/posix/setjmp.d >-@@ -163,6 +163,12 @@ else version( FreeBSD ) >- enum _JBLEN = 5; >- struct _jmp_buf { c_long[_JBLEN + 1] _jb; } >- } >-+ else version( AArch64 ) >-+ { >-+ enum _JBLEN = 31; >-+ // __int128_t >-+ struct _jmp_buf { long[2][_JBLEN + 1] _jb; }; >-+ } >- else >- static assert(0); >- alias _jmp_buf[1] jmp_buf; >-@@ -250,6 +256,11 @@ else version( FreeBSD ) >- enum _JB_SIGFLAG = 5; >- struct _sigjmp_buf { c_long[_JBLEN + 1] _sjb; } >- } >-+ else version( AArch64 ) >-+ { >-+ // __int128_t >-+ struct _sigjmp_buf { long[2][_JBLEN + 1] _jb; }; >-+ } >- else >- static assert(0); >- alias _sigjmp_buf[1] sigjmp_buf; >diff --git a/lang/ldc/files/patch-ltsmaster_runtime_druntime_src_core_sys_posix_ucontext.d b/lang/ldc/files/patch-ltsmaster_runtime_druntime_src_core_sys_posix_ucontext.d >deleted file mode 100644 >index 25263385e821..000000000000 >--- a/lang/ldc/files/patch-ltsmaster_runtime_druntime_src_core_sys_posix_ucontext.d >+++ /dev/null >@@ -1,41 +0,0 @@ >---- ltsmaster/runtime/druntime/src/core/sys/posix/ucontext.d.orig 2020-11-14 19:35:48 UTC >-+++ ltsmaster/runtime/druntime/src/core/sys/posix/ucontext.d >-@@ -686,6 +686,38 @@ else version( FreeBSD ) >- int[6] mc_spare2; >- } >- } >-+ else version( AArch64 ) >-+ { >-+ alias __register_t = long; >-+ >-+ struct gpregs >-+ { >-+ __register_t[30] gp_x; >-+ __register_t gp_lr; >-+ __register_t gp_sp; >-+ __register_t gp_elr; >-+ uint gp_spsr; >-+ int gp_pad; >-+ } >-+ >-+ struct fpregs >-+ { >-+ ulong[2][32] fp_q; // __uint128_t >-+ uint fp_sr; >-+ uint fp_cr; >-+ int fp_flags; >-+ int fp_pad; >-+ } >-+ >-+ struct mcontext_t >-+ { >-+ gpregs mc_gpregs; >-+ fpregs mc_fpregs; >-+ int mc_flags; >-+ int mc_pad; >-+ ulong[8] mc_spare; >-+ } >-+ } >- >- // <ucontext.h> >- enum UCF_SWAPPED = 0x00000001; >diff --git a/lang/ldc/files/patch-ltsmaster_runtime_phobos_std_internal_math_gammafunction.d b/lang/ldc/files/patch-ltsmaster_runtime_phobos_std_internal_math_gammafunction.d >deleted file mode 100644 >index 36d264443380..000000000000 >--- a/lang/ldc/files/patch-ltsmaster_runtime_phobos_std_internal_math_gammafunction.d >+++ /dev/null >@@ -1,22 +0,0 @@ >-https://github.com/ldc-developers/phobos/commit/65b103fc08c5a58f3b0c2b56ac8650ca8e678109.patch >- >-From 65b103fc08c5a58f3b0c2b56ac8650ca8e678109 Mon Sep 17 00:00:00 2001 >-From: Iain Buclaw <ibuclaw@gdcproject.org> >-Date: Sat, 23 May 2015 14:05:03 +0200 >-Subject: [PATCH] Relax compile-time assertion in gammafunction to runtime >- >---- ltsmaster/runtime/phobos/std/internal/math/gammafunction.d.orig 2020-11-14 19:44:53 UTC >-+++ ltsmaster/runtime/phobos/std/internal/math/gammafunction.d >-@@ -1653,8 +1653,10 @@ unittest { >- real logmdigammaInverse(real y) >- { >- import std.numeric: findRoot; >-- enum maxY = logmdigamma(real.min_normal); >-- static assert(maxY > 0 && maxY <= real.max); >-+ // FIXME: should be returned back to enum. >-+ // Fix requires CTFEable `log` on non-x86 targets (check both LDC and GDC). >-+ immutable maxY = logmdigamma(real.min_normal); >-+ assert(maxY > 0 && maxY <= real.max); >- >- if (y >= maxY) >- { >diff --git a/lang/ldc/files/patch-runtime_CMakeLists.txt b/lang/ldc/files/patch-runtime_CMakeLists.txt >index d8268414ad69..72306d4a2967 100644 >--- a/lang/ldc/files/patch-runtime_CMakeLists.txt >+++ b/lang/ldc/files/patch-runtime_CMakeLists.txt >@@ -1,11 +1,55 @@ >---- runtime/CMakeLists.txt.orig 2020-07-13 17:43:03 UTC >+--- runtime/CMakeLists.txt.orig 2022-07-20 17:05:27 UTC > +++ runtime/CMakeLists.txt >-@@ -134,6 +134,8 @@ if("${C_SYSTEM_LIBS}" STREQUAL "AUTO") >- set(C_SYSTEM_LIBS m c) >- elseif("${TARGET_SYSTEM}" MATCHES "Linux") >- set(C_SYSTEM_LIBS m pthread rt dl) >-+ elseif("${TARGET_SYSTEM}" MATCHES "FreeBSD") >-+ set(C_SYSTEM_LIBS m pthread execinfo) >- else() >- set(C_SYSTEM_LIBS m pthread) >+@@ -42,7 +42,7 @@ set(D_FLAGS_RELEASE -O3;-release >+ set(COMPILE_ALL_D_FILES_AT_ONCE ON CACHE BOOL "Compile all D files for the runtime libs in a single command line instead of separately. Disabling this is useful for many CPU cores and/or iterative development.") >+ set(RT_ARCHIVE_WITH_LDC ON CACHE STRING "Whether to archive the static runtime libs via LDC instead of CMake archiver") >+ set(RT_CFLAGS "" CACHE STRING "Runtime extra C compiler flags, separated by ' '") >+-set(LD_FLAGS "" CACHE STRING "Runtime extra C linker flags, separated by ' '") >++set(LD_FLAGS "-lz" CACHE STRING "Runtime extra C linker flags, separated by ' '") >+ set(C_SYSTEM_LIBS AUTO CACHE STRING "C system libraries for linking shared libraries and test runners, separated by ';'") >+ set(TARGET_SYSTEM AUTO CACHE STRING "Target OS/toolchain for cross-compilation (e.g., 'Linux;UNIX', 'Darwin;APPLE;UNIX', 'Windows;MSVC')") >+ set(RT_SUPPORT_SANITIZERS OFF CACHE BOOL "Build runtime libraries with sanitizer support (e.g. for AddressSanitizer)") >+@@ -122,9 +122,9 @@ if("${C_SYSTEM_LIBS}" STREQUAL "AUTO") >+ if("${TARGET_SYSTEM}" MATCHES "Android") >+ set(C_SYSTEM_LIBS m c) >+ elseif("${TARGET_SYSTEM}" MATCHES "Linux") >+- set(C_SYSTEM_LIBS m pthread rt dl) >++ set(C_SYSTEM_LIBS m pthread rt dl z) >+ else() >+- set(C_SYSTEM_LIBS m pthread) >++ set(C_SYSTEM_LIBS m pthread z) >+ endif() >+ set(C_SYSTEM_LIBS_SHARED ${C_SYSTEM_LIBS}) > endif() >+@@ -234,6 +234,13 @@ if(PHOBOS2_DIR) >+ ${PHOBOS2_DIR}/etc/c/zlib/test/infcover.c >+ ${PHOBOS2_DIR}/etc/c/zlib/test/minigzip.c >+ ) >++ >++ # don't embed zlib >++ foreach(item ${PHOBOS2_C}) >++ if(${item} MATCHES ".*/c/zlib/.*.c") >++ list(REMOVE_ITEM PHOBOS2_C ${item}) >++ endif() >++ endforeach() >+ endif() >+ >+ # >+@@ -592,7 +599,7 @@ macro(build_runtime_libs druntime_o druntime_bc phobos >+ ${druntime_o} ${DRUNTIME_C} ${DRUNTIME_ASM}) >+ set_common_library_properties(druntime-ldc${target_suffix} >+ druntime-ldc${lib_suffix} ${output_path} >+- "${c_flags}" "${ld_flags}" ${is_shared} >++ "${c_flags}" "${ld_flags} -lz" ${is_shared} >+ ) >+ >+ # When building a shared library, we need to link in all the default >+@@ -609,7 +616,7 @@ macro(build_runtime_libs druntime_o druntime_bc phobos >+ ${phobos2_o} ${PHOBOS2_C}) >+ set_common_library_properties(phobos2-ldc${target_suffix} >+ phobos2-ldc${lib_suffix} ${output_path} >+- "${c_flags}" "${ld_flags}" ${is_shared} >++ "${c_flags}" "${ld_flags} -lz" ${is_shared} >+ ) >+ >+ if("${is_shared}" STREQUAL "ON") >diff --git a/lang/ldc/pkg-plist b/lang/ldc/pkg-plist >index 654f4dbfe5e6..a7cdf9d821ba 100644 >--- a/lang/ldc/pkg-plist >+++ b/lang/ldc/pkg-plist >@@ -4,9 +4,11 @@ bin/ldc-prune-cache > bin/ldc2 > bin/ldmd2 > etc/ldc2.conf >+include/d/__builtins.di > include/d/core/atomic.d > include/d/core/attribute.d > include/d/core/bitop.d >+include/d/core/builtins.d > include/d/core/checkedint.d > include/d/core/cpuid.d > include/d/core/demangle.d >@@ -14,6 +16,7 @@ include/d/core/exception.d > include/d/core/gc/config.d > include/d/core/gc/gcinterface.d > include/d/core/gc/registry.d >+include/d/core/int128.d > include/d/core/internal/abort.d > include/d/core/internal/array/appending.d > include/d/core/internal/array/capacity.d >@@ -26,6 +29,16 @@ include/d/core/internal/array/operations.d > include/d/core/internal/array/utils.d > include/d/core/internal/atomic.d > include/d/core/internal/attributes.d >+include/d/core/internal/backtrace/dwarf.d >+include/d/core/internal/backtrace/elf.d >+include/d/core/internal/backtrace/handler.d >+include/d/core/internal/backtrace/libunwind.d >+include/d/core/internal/backtrace/macho.d >+include/d/core/internal/backtrace/unwind.d >+include/d/core/internal/container/array.d >+include/d/core/internal/container/common.d >+include/d/core/internal/container/hashtab.d >+include/d/core/internal/container/treap.d > include/d/core/internal/convert.d > include/d/core/internal/dassert.d > include/d/core/internal/destruction.d >@@ -33,17 +46,26 @@ include/d/core/internal/elf/dl.d > include/d/core/internal/elf/io.d > include/d/core/internal/entrypoint.d > include/d/core/internal/execinfo.d >+include/d/core/internal/gc/bits.d >+include/d/core/internal/gc/impl/conservative/gc.d >+include/d/core/internal/gc/impl/manual/gc.d >+include/d/core/internal/gc/impl/proto/gc.d >+include/d/core/internal/gc/os.d >+include/d/core/internal/gc/pooltable.d >+include/d/core/internal/gc/proxy.d > include/d/core/internal/hash.d > include/d/core/internal/lifetime.d > include/d/core/internal/moving.d > include/d/core/internal/parseoptions.d > include/d/core/internal/postblit.d >+include/d/core/internal/qsort.d > include/d/core/internal/spinlock.d > include/d/core/internal/string.d > include/d/core/internal/switch_.d > include/d/core/internal/traits.d > include/d/core/internal/utf.d > include/d/core/internal/util/array.d >+include/d/core/internal/util/math.d > include/d/core/internal/vararg/aarch64.d > include/d/core/internal/vararg/sysv_x64.d > include/d/core/lifetime.d >@@ -82,6 +104,7 @@ include/d/core/stdcpp/string.d > include/d/core/stdcpp/string_view.d > include/d/core/stdcpp/type_traits.d > include/d/core/stdcpp/typeinfo.d >+include/d/core/stdcpp/utility.d > include/d/core/stdcpp/vector.d > include/d/core/stdcpp/xutility.d > include/d/core/sync/barrier.d >@@ -94,30 +117,39 @@ include/d/core/sync/rwmutex.d > include/d/core/sync/semaphore.d > include/d/core/sys/bionic/err.d > include/d/core/sys/bionic/fcntl.d >+include/d/core/sys/bionic/stdlib.d > include/d/core/sys/bionic/string.d > include/d/core/sys/bionic/unistd.d > include/d/core/sys/darwin/crt_externs.d > include/d/core/sys/darwin/dlfcn.d > include/d/core/sys/darwin/err.d > include/d/core/sys/darwin/execinfo.d >+include/d/core/sys/darwin/fcntl.d >+include/d/core/sys/darwin/ifaddrs.d > include/d/core/sys/darwin/mach/dyld.d > include/d/core/sys/darwin/mach/getsect.d > include/d/core/sys/darwin/mach/kern_return.d > include/d/core/sys/darwin/mach/loader.d >+include/d/core/sys/darwin/mach/nlist.d > include/d/core/sys/darwin/mach/port.d > include/d/core/sys/darwin/mach/semaphore.d >+include/d/core/sys/darwin/mach/stab.d > include/d/core/sys/darwin/mach/thread_act.d > include/d/core/sys/darwin/netinet/in_.d > include/d/core/sys/darwin/pthread.d >+include/d/core/sys/darwin/stdlib.d > include/d/core/sys/darwin/string.d >+include/d/core/sys/darwin/sys/attr.d > include/d/core/sys/darwin/sys/cdefs.d > include/d/core/sys/darwin/sys/event.d > include/d/core/sys/darwin/sys/mman.d >+include/d/core/sys/darwin/sys/sysctl.d > include/d/core/sys/dragonflybsd/dlfcn.d > include/d/core/sys/dragonflybsd/err.d > include/d/core/sys/dragonflybsd/execinfo.d > include/d/core/sys/dragonflybsd/netinet/in_.d > include/d/core/sys/dragonflybsd/pthread_np.d >+include/d/core/sys/dragonflybsd/stdlib.d > include/d/core/sys/dragonflybsd/string.d > include/d/core/sys/dragonflybsd/sys/_bitset.d > include/d/core/sys/dragonflybsd/sys/_cpuset.d >@@ -130,12 +162,15 @@ include/d/core/sys/dragonflybsd/sys/event.d > include/d/core/sys/dragonflybsd/sys/link_elf.d > include/d/core/sys/dragonflybsd/sys/mman.d > include/d/core/sys/dragonflybsd/sys/socket.d >+include/d/core/sys/dragonflybsd/sys/sysctl.d > include/d/core/sys/dragonflybsd/time.d >+include/d/core/sys/freebsd/config.d > include/d/core/sys/freebsd/dlfcn.d > include/d/core/sys/freebsd/err.d > include/d/core/sys/freebsd/execinfo.d > include/d/core/sys/freebsd/netinet/in_.d > include/d/core/sys/freebsd/pthread_np.d >+include/d/core/sys/freebsd/stdlib.d > include/d/core/sys/freebsd/string.d > include/d/core/sys/freebsd/sys/_bitset.d > include/d/core/sys/freebsd/sys/_cpuset.d >@@ -148,6 +183,7 @@ include/d/core/sys/freebsd/sys/event.d > include/d/core/sys/freebsd/sys/link_elf.d > include/d/core/sys/freebsd/sys/mman.d > include/d/core/sys/freebsd/sys/mount.d >+include/d/core/sys/freebsd/sys/sysctl.d > include/d/core/sys/freebsd/time.d > include/d/core/sys/freebsd/unistd.d > include/d/core/sys/linux/config.d >@@ -158,10 +194,13 @@ include/d/core/sys/linux/err.d > include/d/core/sys/linux/errno.d > include/d/core/sys/linux/execinfo.d > include/d/core/sys/linux/fcntl.d >+include/d/core/sys/linux/fs.d > include/d/core/sys/linux/ifaddrs.d >+include/d/core/sys/linux/io_uring.d > include/d/core/sys/linux/link.d > include/d/core/sys/linux/netinet/in_.d > include/d/core/sys/linux/netinet/tcp.d >+include/d/core/sys/linux/perf_event.d > include/d/core/sys/linux/sched.d > include/d/core/sys/linux/stdio.d > include/d/core/sys/linux/string.d >@@ -171,6 +210,7 @@ include/d/core/sys/linux/sys/file.d > include/d/core/sys/linux/sys/inotify.d > include/d/core/sys/linux/sys/mman.d > include/d/core/sys/linux/sys/prctl.d >+include/d/core/sys/linux/sys/procfs.d > include/d/core/sys/linux/sys/signalfd.d > include/d/core/sys/linux/sys/socket.d > include/d/core/sys/linux/sys/sysinfo.d >@@ -184,6 +224,7 @@ include/d/core/sys/linux/unistd.d > include/d/core/sys/netbsd/dlfcn.d > include/d/core/sys/netbsd/err.d > include/d/core/sys/netbsd/execinfo.d >+include/d/core/sys/netbsd/stdlib.d > include/d/core/sys/netbsd/string.d > include/d/core/sys/netbsd/sys/elf.d > include/d/core/sys/netbsd/sys/elf32.d >@@ -193,9 +234,14 @@ include/d/core/sys/netbsd/sys/event.d > include/d/core/sys/netbsd/sys/featuretest.d > include/d/core/sys/netbsd/sys/link_elf.d > include/d/core/sys/netbsd/sys/mman.d >+include/d/core/sys/netbsd/sys/sysctl.d > include/d/core/sys/netbsd/time.d > include/d/core/sys/openbsd/dlfcn.d > include/d/core/sys/openbsd/err.d >+include/d/core/sys/openbsd/execinfo.d >+include/d/core/sys/openbsd/pthread_np.d >+include/d/core/sys/openbsd/pwd.d >+include/d/core/sys/openbsd/stdlib.d > include/d/core/sys/openbsd/string.d > include/d/core/sys/openbsd/sys/cdefs.d > include/d/core/sys/openbsd/sys/elf.d >@@ -204,7 +250,9 @@ include/d/core/sys/openbsd/sys/elf64.d > include/d/core/sys/openbsd/sys/elf_common.d > include/d/core/sys/openbsd/sys/link_elf.d > include/d/core/sys/openbsd/sys/mman.d >+include/d/core/sys/openbsd/sys/sysctl.d > include/d/core/sys/openbsd/time.d >+include/d/core/sys/openbsd/unistd.d > include/d/core/sys/posix/aio.d > include/d/core/sys/posix/arpa/inet.d > include/d/core/sys/posix/config.d >@@ -229,6 +277,7 @@ include/d/core/sys/posix/semaphore.d > include/d/core/sys/posix/setjmp.d > include/d/core/sys/posix/signal.d > include/d/core/sys/posix/spawn.d >+include/d/core/sys/posix/stdc/time.d > include/d/core/sys/posix/stdio.d > include/d/core/sys/posix/stdlib.d > include/d/core/sys/posix/string.d >@@ -264,6 +313,7 @@ include/d/core/sys/solaris/err.d > include/d/core/sys/solaris/execinfo.d > include/d/core/sys/solaris/libelf.d > include/d/core/sys/solaris/link.d >+include/d/core/sys/solaris/stdlib.d > include/d/core/sys/solaris/sys/elf.d > include/d/core/sys/solaris/sys/elf_386.d > include/d/core/sys/solaris/sys/elf_SPARC.d >@@ -409,6 +459,8 @@ include/d/core/sys/windows/sqlucode.d > include/d/core/sys/windows/sspi.d > include/d/core/sys/windows/stacktrace.d > include/d/core/sys/windows/stat.d >+include/d/core/sys/windows/stdc/malloc.d >+include/d/core/sys/windows/stdc/time.d > include/d/core/sys/windows/subauth.d > include/d/core/sys/windows/threadaux.d > include/d/core/sys/windows/tlhelp32.d >@@ -441,9 +493,13 @@ include/d/core/sys/windows/winuser.d > include/d/core/sys/windows/winver.d > include/d/core/sys/windows/wtsapi32.d > include/d/core/sys/windows/wtypes.d >+include/d/core/thread/context.d > include/d/core/thread/fiber.d > include/d/core/thread/osthread.d > include/d/core/thread/package.d >+include/d/core/thread/threadbase.d >+include/d/core/thread/threadgroup.d >+include/d/core/thread/types.d > include/d/core/time.d > include/d/core/vararg.d > include/d/core/volatile.d >@@ -455,10 +511,10 @@ include/d/etc/c/odbc/sqlucode.d > include/d/etc/c/sqlite3.d > include/d/etc/c/zlib.d > include/d/etc/linux/memoryerror.d >+include/d/importc.h > include/d/ldc/asan.d > include/d/ldc/attributes.d > include/d/ldc/dcompute.d >-include/d/ldc/dynamic_compile.d > include/d/ldc/eh_msvc.d > include/d/ldc/gccbuiltins_aarch64.di > include/d/ldc/gccbuiltins_amdgcn.di >@@ -471,6 +527,7 @@ include/d/ldc/gccbuiltins_x86.di > include/d/ldc/intrinsics.di > include/d/ldc/libfuzzer.di > include/d/ldc/llvmasm.di >+include/d/ldc/opencl.di > include/d/ldc/profile.di > include/d/ldc/sanitizer_common.d > include/d/ldc/sanitizers_optionally_linked.d >@@ -489,6 +546,7 @@ include/d/std/ascii.d > include/d/std/base64.d > include/d/std/bigint.d > include/d/std/bitmanip.d >+include/d/std/checkedint.d > include/d/std/compiler.d > include/d/std/complex.d > include/d/std/concurrency.d >@@ -550,9 +608,16 @@ include/d/std/experimental/logger/nulllogger.d > include/d/std/experimental/logger/package.d > include/d/std/experimental/typecons.d > include/d/std/file.d >-include/d/std/format.d >+include/d/std/format/internal/floats.d >+include/d/std/format/internal/read.d >+include/d/std/format/internal/write.d >+include/d/std/format/package.d >+include/d/std/format/read.d >+include/d/std/format/spec.d >+include/d/std/format/write.d > include/d/std/functional.d > include/d/std/getopt.d >+include/d/std/int128.d > include/d/std/internal/attributes.d > include/d/std/internal/cstring.d > include/d/std/internal/digest/sha_SSSE3.d >@@ -574,7 +639,16 @@ include/d/std/internal/unicode_norm.d > include/d/std/internal/unicode_tables.d > include/d/std/internal/windows/advapi32.d > include/d/std/json.d >-include/d/std/math.d >+include/d/std/math/algebraic.d >+include/d/std/math/constants.d >+include/d/std/math/exponential.d >+include/d/std/math/hardware.d >+include/d/std/math/operations.d >+include/d/std/math/package.d >+include/d/std/math/remainder.d >+include/d/std/math/rounding.d >+include/d/std/math/traits.d >+include/d/std/math/trigonometry.d > include/d/std/mathspecial.d > include/d/std/meta.d > include/d/std/mmfile.d >@@ -604,11 +678,12 @@ include/d/std/socket.d > include/d/std/stdint.d > include/d/std/stdio.d > include/d/std/string.d >+include/d/std/sumtype.d > include/d/std/system.d > include/d/std/traits.d > include/d/std/typecons.d > include/d/std/typetuple.d >-include/d/std/uni.d >+include/d/std/uni/package.d > include/d/std/uri.d > include/d/std/utf.d > include/d/std/uuid.d >@@ -619,24 +694,25 @@ include/d/std/windows/syserror.d > include/d/std/xml.d > include/d/std/zip.d > include/d/std/zlib.d >+lib/ldc_rt.dso.o > lib/libdruntime-ldc-debug-shared.so >-lib/libdruntime-ldc-debug-shared.so.2.0.93 >-lib/libdruntime-ldc-debug-shared.so.93 >+lib/libdruntime-ldc-debug-shared.so.100 >+lib/libdruntime-ldc-debug-shared.so.100.1 > lib/libdruntime-ldc-debug.a >+lib/libdruntime-ldc-lto.a > lib/libdruntime-ldc-shared.so >-lib/libdruntime-ldc-shared.so.2.0.93 >-lib/libdruntime-ldc-shared.so.93 >+lib/libdruntime-ldc-shared.so.100 >+lib/libdruntime-ldc-shared.so.100.1 > lib/libdruntime-ldc.a >-lib/libldc-jit-rt.a >-lib/libldc-jit.so >-lib/libldc-jit.so.2.0.93 >-lib/libldc-jit.so.93 > lib/libphobos2-ldc-debug-shared.so >-lib/libphobos2-ldc-debug-shared.so.2.0.93 >-lib/libphobos2-ldc-debug-shared.so.93 >+lib/libphobos2-ldc-debug-shared.so.100 >+lib/libphobos2-ldc-debug-shared.so.100.1 > lib/libphobos2-ldc-debug.a >+lib/libphobos2-ldc-lto.a > lib/libphobos2-ldc-shared.so >-lib/libphobos2-ldc-shared.so.2.0.93 >-lib/libphobos2-ldc-shared.so.93 >+lib/libphobos2-ldc-shared.so.100 >+lib/libphobos2-ldc-shared.so.100.1 > lib/libphobos2-ldc.a > @dir include/d/etc/c/zlib >+@dir include/d/etc/c/zlib/doc >+@dir include/d/etc/c/zlib/test
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 266828
:
237080
| 237082