On 4/14/2022 2:57 PM, Brian Callahan wrote:
> Hi Ryan --
>
> On 4/14/2022 1:58 PM, Ryan Boggs wrote:
>> Hi Brian,
>>
>> On Tue, Apr 12, 2022 at 6:42 PM Brian Callahan <bcal...@posteo.net> wrote:
>>>
>>> Hi ports --
>>>
>>> Here is a diff to update the LDC compiler.
>>> The big changelog is here:
>>> https://github.com/ldc-developers/ldc/releases/tag/v1.29.0
>>>
>>> All is good on my machine, looking for tests/oks.
>> This failed for me during the build of ldc-build-runtime complaining
>> about undefined symbols. Is there something else I need to set for
>> this to build successfully? Please let me know.
>>
>
> Can you send me a build log off-list? That way I can cross-reference
> what I have here.
>
> Thanks.
>
> ~Brian
>
New diff attached to fix a build error if you have the old LDC 1.28.0
installed on your system. Problem found the hard way by Ryan Boggs.
OK?
~Brian
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/ldc/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile 11 Mar 2022 19:29:04 -0000 1.3
+++ Makefile 18 Apr 2022 23:23:21 -0000
@@ -2,12 +2,11 @@
# Can use GDC to create said bootstrap compiler.
ONLY_FOR_ARCHS = amd64
-V = 1.28.0
+V = 1.29.0
COMMENT = LLVM D Compiler
DISTFILES = ldc-${V}-src.tar.gz:0 \
ldc-${V}-bootstrap.tar.gz:1
PKGNAME = ldc-${V}
-REVISION = 0
CATEGORIES = lang
HOMEPAGE = https://wiki.dlang.org/LDC
@@ -18,7 +17,7 @@ MAINTAINER = Brian Callahan <bcallah@ope
# Misc: Apache 2.0 with LLVM exceptions
PERMIT_PACKAGE = Yes
-WANTLIB += ${COMPILER_LIBCXX} c m z
+WANTLIB += ${COMPILER_LIBCXX} c execinfo m z
MASTER_SITES0 =
https://github.com/ldc-developers/ldc/releases/download/v${V}/
MASTER_SITES1 =
https://github.com/ibara/ldc/releases/download/bootstrap-${V}/
@@ -30,8 +29,6 @@ MODULES = devel/cmake
BUILD_DEPENDS = devel/llvm
-RUN_DEPENDS = devel/llvm
-
# COMPILE_D_MODULES_SEPARATELY=ON lets ldc compile with sane memory limits.
CONFIGURE_ARGS = -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DCOMPILE_D_MODULES_SEPARATELY=ON \
@@ -52,17 +49,19 @@ WRKDIST = ${WRKDIR}/ldc-${V}-src
post-patch:
sed -i 's#/usr/local/include/d#${WRKDIR}/ldc-${V}-bootstrap/d#g' \
${WRKDIR}/ldc-${V}-bootstrap/${MACHINE_ARCH}/ldc2.conf
- sed -i
's#"/usr/local/lib",#"/usr/local/lib","${WRKDIR}/ldc-${V}-bootstrap/${MACHINE_ARCH}",#g'
\
+ sed -i
's#"/usr/local/lib",#"${WRKDIR}/ldc-${V}-bootstrap/${MACHINE_ARCH}","/usr/local/lib",#g'
\
${WRKDIR}/ldc-${V}-bootstrap/${MACHINE_ARCH}/ldc2.conf
# Same trick as with flang:
# Replace the shared LLVM.so library with the static libraries.
# Fixes runtime warnings about symbol size mismatches.
-# Revisit on occasion (maybe these warning go away someday?)
+# Revisit on occasion (maybe these warnings go away someday?)
post-configure:
sed -i \
- 's,-lLLVM-11,`${LOCALBASE}/bin/llvm-config --libs all --link-static
--ignore-libllvm` -lz,g' \
- ${WRKBUILD}/build.ninja
+ 's,-lLLVM-13,`${LOCALBASE}/bin/llvm-config --libs all --link-static
--ignore-libllvm` -lz,g' \
+ ${WRKBUILD}/build.ninja
+ sed -i 's#-lz -L/usr/local/lib -Wl,--export-dynamic#-lz
-Wl,--export-dynamic#g' \
+ ${WRKBUILD}/build.ninja
# Move the default ldc2.conf to its proper packaging location.
post-install:
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/ldc/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo 21 Nov 2021 13:51:47 -0000 1.1.1.1
+++ distinfo 18 Apr 2022 23:23:21 -0000
@@ -1,4 +1,4 @@
-SHA256 (ldc-1.28.0-bootstrap.tar.gz) =
poUGzPKLeyBbrEH4Gqak/5OLWK5IQnePezNSt0MHxKA=
-SHA256 (ldc-1.28.0-src.tar.gz) = F/7ou1Nby4zaCkWUdSZVXEbARfMCpzScyHEbJU5Uzwk=
-SIZE (ldc-1.28.0-bootstrap.tar.gz) = 41093692
-SIZE (ldc-1.28.0-src.tar.gz) = 7923347
+SHA256 (ldc-1.29.0-bootstrap.tar.gz) =
s+y1ZElfjx5h+gdCoLgQPK5A6/3qSWAPAZ78mMEw5Vc=
+SHA256 (ldc-1.29.0-src.tar.gz) = 0MBm65ZUZ2JdnF51wAxYNFG5/6NjYB+eNydcqKiuoUA=
+SIZE (ldc-1.29.0-bootstrap.tar.gz) = 44543868
+SIZE (ldc-1.29.0-src.tar.gz) = 8080420
Index: patches/patch-driver_linker-gcc_cpp
===================================================================
RCS file: /cvs/ports/lang/ldc/patches/patch-driver_linker-gcc_cpp,v
retrieving revision 1.2
diff -u -p -r1.2 patch-driver_linker-gcc_cpp
--- patches/patch-driver_linker-gcc_cpp 11 Mar 2022 19:29:04 -0000 1.2
+++ patches/patch-driver_linker-gcc_cpp 18 Apr 2022 23:23:21 -0000
@@ -19,12 +19,13 @@ Index: driver/linker-gcc.cpp
args.push_back("-lc++");
break;
default:
-@@ -663,11 +663,13 @@ void ArgsBuilder::addDefaultPlatformLibs() {
+@@ -661,11 +661,14 @@ void ArgsBuilder::addDefaultPlatformLibs() {
args.push_back("-lrt");
args.push_back("-ldl");
// fallthrough
+ case llvm::Triple::OpenBSD:
+ args.push_back("-lc++abi");
++ args.push_back("-lexecinfo"); // for druntime backtrace
+ // fallthrough
case llvm::Triple::Darwin:
case llvm::Triple::MacOSX:
Index: patches/patch-driver_targetmachine_cpp
===================================================================
RCS file: /cvs/ports/lang/ldc/patches/patch-driver_targetmachine_cpp,v
retrieving revision 1.2
diff -u -p -r1.2 patch-driver_targetmachine_cpp
--- patches/patch-driver_targetmachine_cpp 11 Mar 2022 19:29:04 -0000
1.2
+++ patches/patch-driver_targetmachine_cpp 18 Apr 2022 23:23:21 -0000
@@ -3,7 +3,7 @@ Taken from ports LLVM.
Index: driver/targetmachine.cpp
--- driver/targetmachine.cpp.orig
+++ driver/targetmachine.cpp
-@@ -432,6 +432,8 @@ createTargetMachine(const std::string targetTriple, co
+@@ -440,6 +440,8 @@ createTargetMachine(const std::string targetTriple, co
// these OSes.
// On Android, PIC is default as well.
relocModel = llvm::Reloc::PIC_;
Index: patches/patch-runtime_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/lang/ldc/patches/patch-runtime_CMakeLists_txt,v
retrieving revision 1.2
diff -u -p -r1.2 patch-runtime_CMakeLists_txt
--- patches/patch-runtime_CMakeLists_txt 11 Mar 2022 19:29:04 -0000
1.2
+++ patches/patch-runtime_CMakeLists_txt 18 Apr 2022 23:23:21 -0000
@@ -8,12 +8,12 @@ Index: runtime/CMakeLists.txt
set(BUILD_LTO_LIBS OFF CACHE BOOL
"Also build the runtime as LLVM bitcode libraries for LTO")
set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/d CACHE PATH
"Path to install D modules to")
set(BUILD_SHARED_LIBS AUTO CACHE STRING
"Whether to build the runtime as a shared library (ON|OFF|BOTH)")
--set(D_FLAGS -w;-de;-dip1000;-preview=dtorfields CACHE STRING
"Runtime D compiler flags, separated by ';'")
-+set(D_FLAGS
--relocation-model=pic;-w;-de;-dip1000;-preview=dtorfields CACHE STRING
"Runtime D compiler flags, separated by ';'")
+-set(D_FLAGS
-w;-de;-preview=dip1000;-preview=dtorfields;-preview=fieldwise CACHE STRING
"Runtime D compiler flags, separated by ';'")
++set(D_FLAGS
--relocation-model=pic;-w;-de;-preview=dip1000;-preview=dtorfields;-preview=fieldwise
CACHE STRING "Runtime D compiler flags, separated by ';'")
set(D_EXTRA_FLAGS "" CACHE STRING
"Runtime extra D compiler flags, separated by ';'")
set(D_FLAGS_DEBUG -g;-link-defaultlib-debug;-d-debug CACHE STRING
"Runtime D compiler flags (debug libraries), separated by ';'")
set(D_FLAGS_RELEASE -O3;-release CACHE STRING
"Runtime D compiler flags (release libraries), separated by ';'")
-@@ -620,7 +620,7 @@ function(set_common_library_properties target name out
+@@ -607,7 +607,7 @@ function(set_common_library_properties target name out
# linker default on Ubuntu 16.10 and above. As we might be building on an
# older system (e.g. binary packages), we need to make sure the C parts
are
# built as PIC as well.
Index: patches/patch-runtime_druntime_src_core_sys_posix_sys_filio_d
===================================================================
RCS file: patches/patch-runtime_druntime_src_core_sys_posix_sys_filio_d
diff -N patches/patch-runtime_druntime_src_core_sys_posix_sys_filio_d
--- patches/patch-runtime_druntime_src_core_sys_posix_sys_filio_d 11 Mar
2022 19:29:04 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,19 +0,0 @@
-Index: runtime/druntime/src/core/sys/posix/sys/filio.d
---- runtime/druntime/src/core/sys/posix/sys/filio.d.orig
-+++ runtime/druntime/src/core/sys/posix/sys/filio.d
-@@ -34,3 +34,15 @@ version (Darwin)
- enum uint FIOGETOWN = _IOR!(int)('f', 123); // get owner
- enum uint FIODTYPE = _IOR!(int)('f', 122); // get d_type
- }
-+
-+version (OpenBSD)
-+{
-+ // File-descriptor ioctl's
-+ enum uint FIOCLEX = _IO('f', 1); // set close on exec on fd
-+ enum uint FIONCLEX = _IO('f', 2); // remove close on exec
-+ enum uint FIONREAD = _IOR!(int)('f', 127); // get # bytes to read
-+ enum uint FIONBIO = _IOW!(int)('f', 126); // set/clear non-blocking i/o
-+ enum uint FIOASYNC = _IOW!(int)('f', 125); // set/clear async i/o
-+ enum uint FIOSETOWN = _IOW!(int)('f', 124); // set owner
-+ enum uint FIOGETOWN = _IOR!(int)('f', 123); // get owner
-+}
Index: patches/patch-runtime_druntime_src_core_sys_posix_sys_ioccom_d
===================================================================
RCS file: patches/patch-runtime_druntime_src_core_sys_posix_sys_ioccom_d
diff -N patches/patch-runtime_druntime_src_core_sys_posix_sys_ioccom_d
--- patches/patch-runtime_druntime_src_core_sys_posix_sys_ioccom_d 11 Mar
2022 19:29:04 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,63 +0,0 @@
-Index: runtime/druntime/src/core/sys/posix/sys/ioccom.d
---- runtime/druntime/src/core/sys/posix/sys/ioccom.d.orig
-+++ runtime/druntime/src/core/sys/posix/sys/ioccom.d
-@@ -137,3 +137,59 @@ else version (FreeBSD)
- return _IOC(IOC_INOUT, cast(uint)g, cast(uint)n, T.sizeof);
- }
- }
-+else version (OpenBSD)
-+{
-+ /* OpenBSD ioctl's encode the command in the lower 16-bits
-+ * and the size of any in/out parameters in the lower 13 bits of the upper
-+ * 16-bits of a 32 bit unsigned integer. The high 3 bits of the upper
-+ * 16-bits encode the in/out status of the parameter.
-+ */
-+ enum uint IOCPARM_MASK = 0x1fff; // parameter length mask
-+ uint IOCPARM_LEN(uint x) // to extract the encoded parameter length
-+ {
-+ return ((x >> 16) & IOCPARM_MASK);
-+ }
-+ uint IOCBASECMD(uint x) // to extract the encoded command
-+ {
-+ return (x & ~(IOCPARM_MASK << 16));
-+ }
-+ uint IOCGROUP(uint x) // to extract the encoded group
-+ {
-+ return ((x >> 8) & 0xff);
-+ }
-+
-+ enum uint IOCPARM_MAX = (1 << 12); // max size of ioctl args
-+
-+ enum uint IOC_VOID = 0x20000000; // no parameters
-+ enum uint IOC_OUT = 0x40000000; // copy parameters back
-+ enum uint IOC_IN = 0x80000000; // copy parameters into
-+ enum uint IOC_INOUT = (IOC_IN | IOC_OUT);
-+ enum uint IOC_DIRMASK = 0xe0000000;
-+
-+ // encode the ioctl info into 32 bits
-+ uint _IOC(uint inorout, uint group, uint num, size_t len)
-+ {
-+ return (inorout | ((len & IOCPARM_MASK) << 16) | (group << 8) | num);
-+ }
-+
-+ // encode a command with no parameters
-+ uint _IO(char g, int n)
-+ {
-+ return _IOC(IOC_VOID, cast(uint)g, cast(uint)n, cast(size_t)0);
-+ }
-+ // encode a command that returns info
-+ uint _IOR(T)(char g, int n)
-+ {
-+ return _IOC(IOC_OUT, cast(uint)g, cast(uint)n, T.sizeof);
-+ }
-+ // encode a command that takes info
-+ uint _IOW(T)(char g, int n)
-+ {
-+ return _IOC(IOC_IN, cast(uint)g, cast(uint)n, T.sizeof);
-+ }
-+ // encode a command that takes info and returns info
-+ uint _IOWR(T)(char g, int n)
-+ {
-+ return _IOC(IOC_INOUT, cast(uint)g, cast(uint)n, T.sizeof);
-+ }
-+}
Index: patches/patch-runtime_druntime_src_core_sys_posix_sys_ioctl_d
===================================================================
RCS file: patches/patch-runtime_druntime_src_core_sys_posix_sys_ioctl_d
diff -N patches/patch-runtime_druntime_src_core_sys_posix_sys_ioctl_d
--- patches/patch-runtime_druntime_src_core_sys_posix_sys_ioctl_d 11 Mar
2022 19:29:04 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-Index: runtime/druntime/src/core/sys/posix/sys/ioctl.d
---- runtime/druntime/src/core/sys/posix/sys/ioctl.d.orig
-+++ runtime/druntime/src/core/sys/posix/sys/ioctl.d
-@@ -375,6 +375,11 @@ else version (NetBSD)
- }
- else version (OpenBSD)
- {
-+ import core.sys.posix.termios; // termios
-+ import core.sys.posix.sys.time; // timeval
-+
-+ public import core.sys.posix.sys.ttycom; // Terminal related ioctls
-+
- struct winsize
- {
- ushort ws_row;
-@@ -382,6 +387,8 @@ else version (OpenBSD)
- ushort ws_xpixel;
- ushort ws_ypixel;
- }
-+
-+ public import core.sys.posix.sys.filio; // File related ioctls
-
- int ioctl(int, c_ulong, ...);
- }
Index: patches/patch-runtime_druntime_src_core_sys_posix_sys_mman_d
===================================================================
RCS file: patches/patch-runtime_druntime_src_core_sys_posix_sys_mman_d
diff -N patches/patch-runtime_druntime_src_core_sys_posix_sys_mman_d
--- patches/patch-runtime_druntime_src_core_sys_posix_sys_mman_d 11 Mar
2022 19:29:04 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-Fibers need mmap(2) MAP_STACK.
-
-Index: runtime/druntime/src/core/sys/posix/sys/mman.d
---- runtime/druntime/src/core/sys/posix/sys/mman.d.orig
-+++ runtime/druntime/src/core/sys/posix/sys/mman.d
-@@ -460,6 +460,7 @@ else version (OpenBSD)
- enum MAP_PRIVATE = 0x0002;
- enum MAP_FIXED = 0x0010;
- enum MAP_ANON = 0x1000;
-+ enum MAP_STACK = 0x4000;
-
- enum MAP_FAILED = cast(void*)-1;
-
Index: patches/patch-runtime_druntime_src_core_sys_posix_sys_ttycom_d
===================================================================
RCS file: patches/patch-runtime_druntime_src_core_sys_posix_sys_ttycom_d
diff -N patches/patch-runtime_druntime_src_core_sys_posix_sys_ttycom_d
--- patches/patch-runtime_druntime_src_core_sys_posix_sys_ttycom_d 11 Mar
2022 19:29:04 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,108 +0,0 @@
-Index: runtime/druntime/src/core/sys/posix/sys/ttycom.d
---- runtime/druntime/src/core/sys/posix/sys/ttycom.d.orig
-+++ runtime/druntime/src/core/sys/posix/sys/ttycom.d
-@@ -214,3 +214,104 @@ else version (FreeBSD)
- enum uint NETGRAPHDISC = 6; // Netgraph tty node discipline
- enum uint H4DISC = 7; // Netgraph Blutooth H4 discipline
- }
-+else version (OpenBSD)
-+{
-+ struct winsize {
-+ ushort ws_row; // rows, in characters
-+ ushort ws_col; // columns, in characters
-+ ushort ws_xpixel; // horizontal size, pixels
-+ ushort ws_ypixel; // vertical size, pixels
-+ }
-+
-+ struct tstamps {
-+ int ts_set; // TIOCM_CAR and/or TIOCM_CTS
-+ int ts_clr;
-+ }
-+
-+ // Serial/TTY ioctl's
-+ // 0-2 compat
-+ // 3-7 unused
-+ // 8-10 compat
-+ // 11-12 unused
-+ enum uint TIOCEXCL = _IO('t', 13); // set exclusive use of tty
-+ enum uint TIOCNXCL = _IO('t', 14); // reset exclusive use of tty
-+ enum uint TIOCFLUSH = _IOW!(int)('t', 16); // flush buffers
-+ // 17-18 compat
-+ enum uint TIOCGETA = _IOR!(termios)('t', 19); // get termios struct
-+ enum uint TIOCSETA = _IOW!(termios)('t', 20); // set termios struct
-+ enum uint TIOCSETAW = _IOW!(termios)('t', 21); // drain output, set
-+ enum uint TIOCSETAF = _IOW!(termios)('t', 22); // drn out, fls in, set
-+ // 23-25 unused
-+ enum uint TIOCGETD = _IOR!(int)('t', 26); // get line discipline
-+ enum uint TIOCSETD = _IOW!(int)('t', 27); // set line discipline
-+ enum uint TIOCSETVERAUTH = _IOW!(int)('t', 28); // set verified auth
-+ enum uint TIOCCLRVERAUTH = _IO('t', 29); // clear verified auth
-+ enum uint TIOCCHKVERAUTH = _IO('t', 30); // check verified auth
-+ // 31-89 unused
-+ enum uint TIOCSTSTAMP = _IOW!(tstamps)('t', 90); // timestamp reasons
-+ enum uint TIOCGTSTAMP = _IOR!(timeval)('t', 91); // get timestamp
-+ // 92-93 device flags
-+ enum uint TIOCSFLAGS = _IOW!(int)('t', 92); // set device flags
-+ enum uint TIOCGFLAGS = _IOR!(int)('t', 93); // get device flags
-+ // 94-97 conflicts: tun and tap
-+ enum uint TIOCDRAIN = _IO('t', 94); // wait till output drained
-+ enum uint TIOCSIG = _IOW!(int)('t', 95); // pty: generate signal
-+ enum uint TIOCEXT = _IOW!(int)('t', 96); // pty: external processing
-+ enum uint TIOCSCTTY = _IO('t', 97); // become controlling tty
-+ enum uint TIOCCONS = _IOW!(int)('t', 98); // become virtual console
-+ enum uint TIOCGSID = _IOR!(int)('t', 99); // get session id
-+ // 100 unused
-+ enum uint TIOCSTAT = _IO('t', 101); // simulate ^T status message
-+ enum uint TIOCUCNTL = _IOW!(int)('t', 102); // pty: set/clr usr cntl mode
-+ enum uint UIOCCMD(n) = _IO('u', n); // usr cntl op "n"
-+ enum uint TIOCSWINSZ = _IOW!(winsize)('t', 103); // set window size
-+ enum uint TIOCGWINSZ = _IOR!(winsize)('t', 104); // get window size
-+ enum uint TIOCREMOTE = _IOW!(int)('t', 105); // remote input editing
-+ enum uint TIOCMGET = _IOR!(int)('t', 106); // get all modem bits
-+ enum uint TIOCM_LE = 0x01; // line enable
-+ enum uint TIOCM_DTR = 0x02; // data terminal ready
-+ enum uint TIOCM_RTS = 0x04; // request to send
-+ enum uint TIOCM_ST = 0x08; // secondary transmit
-+ enum uint TIOCM_SR = 0x10; // secondary receive
-+ enum uint TIOCM_CTS = 0x20; // clear to send
-+ enum uint TIOCM_CAR = 0x40; // carrier detect
-+ enum uint TIOCM_RNG = 0x80; // ring
-+ enum uint TIOCM_DSR = 0x100; // data set ready
-+ enum uint TIOCM_CD = TIOCM_CAR;
-+ enum uint TIOCM_RI = TIOCM_RNG;
-+ enum uint TIOCMBIC = _IOW!(int)('t', 107); // bic modem bits
-+ enum uint TIOCMBIS = _IOW!(int)('t', 108); // bis modem bits
-+ enum uint TIOCMSET = _IOW!(int)('t', 109); // set all modem bits
-+ enum uint TIOCSTART = _IO('t', 110); // start output like ^Q
-+ enum uint TIOCSTOP = _IO('t', 111); // stop output like ^S
-+ enum uint TIOCPKT = _IOW!(int)('t', 112); // pty: set/clr packet mode
-+ enum uint TIOCPKT_DATA = 0x00; // data packet
-+ enum uint TIOCPKT_FLUSHREAD = 0x01; // flush packet
-+ enum uint TIOCPKT_FLUSHWRITE = 0x02; // flush packet
-+ enum uint TIOCPKT_STOP = 0x04; // stop output
-+ enum uint TIOCPKT_START = 0x08; // start output
-+ enum uint TIOCPKT_NOSTOP = 0x10; // no more ^S, ^Q
-+ enum uint TIOCPKT_DOSTOP = 0x20; // now do ^S, ^Q
-+ enum uint TIOCPKT_IOCTL = 0x40; // state change of pty driver
-+ enum uint TIOCNOTTY = _IO('t', 113); // void tty association
-+ // 114 unused
-+ enum uint TIOCOUTQ = _IOR!(int)('t', 115); // output queue size
-+ // 116-117 compat
-+ enum uint TIOCSPGRP = _IOW!(int)('t', 118); // set pgrp of tty
-+ enum uint TIOCGPGRP = _IOR!(int)('t', 119); // get pgrp of tty
-+
-+ enum uint TIOCCDTR = _IO('t', 120); // clear data terminal ready
-+ enum uint TIOCSDTR = _IO('t', 121); // set data terminal ready
-+ enum uint TIOCCBRK = _IO('t', 122); // clear break bit
-+ enum uint TIOCSBRK = _IO('t', 123); // set break bit
-+ // 124-127 compat
-+
-+ enum uint TTYDISC = 0; // termios tty line discipline
-+ enum uint TABLDISC = 3; // tablet description
-+ enum uint SLIPDISC = 4; // serial IP discipline
-+ enum uint PPPDISC = 5; // PPP discipline
-+ enum uint STRIPDISC = 6; // metricom wireless IP discipline
-+ enum uint NMEADISC = 7; // NMEA0183 discipline
-+ enum uint MSTSDISC = 8; // Meinberg time string discipline
-+ enum uint ENDRUNDISC = 9; // Endrun time format discipline
-+}
Index: patches/patch-runtime_druntime_src_core_thread_fiber_d
===================================================================
RCS file: patches/patch-runtime_druntime_src_core_thread_fiber_d
diff -N patches/patch-runtime_druntime_src_core_thread_fiber_d
--- patches/patch-runtime_druntime_src_core_thread_fiber_d 11 Mar 2022
19:29:04 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,20 +0,0 @@
-Fibers need mmap(2) MAP_STACK.
-
-Index: runtime/druntime/src/core/thread/fiber.d
---- runtime/druntime/src/core/thread/fiber.d.orig
-+++ runtime/druntime/src/core/thread/fiber.d
-@@ -1254,10 +1254,13 @@ class Fiber (private)
- // Allocate more for the memory guard
- sz += guardPageSize;
-
-+ int mmap_flags = MAP_PRIVATE | MAP_ANON;
-+ version (OpenBSD)
-+ mmap_flags |= MAP_STACK;
- m_pmem = mmap( null,
- sz,
- PROT_READ | PROT_WRITE,
-- MAP_PRIVATE | MAP_ANON,
-+ mmap_flags,
- -1,
- 0 );
- if ( m_pmem == MAP_FAILED )
Index: patches/patch-runtime_druntime_src_rt_sections_elf_shared_d
===================================================================
RCS file:
/cvs/ports/lang/ldc/patches/patch-runtime_druntime_src_rt_sections_elf_shared_d,v
retrieving revision 1.2
diff -u -p -r1.2 patch-runtime_druntime_src_rt_sections_elf_shared_d
--- patches/patch-runtime_druntime_src_rt_sections_elf_shared_d 11 Mar 2022
19:29:04 -0000 1.2
+++ patches/patch-runtime_druntime_src_rt_sections_elf_shared_d 18 Apr 2022
23:23:21 -0000
@@ -22,7 +22,7 @@ Index: runtime/druntime/src/rt/sections_
else version (DragonFlyBSD)
{
import core.sys.dragonflybsd.dlfcn;
-@@ -212,6 +219,7 @@ __gshared bool _isRuntimeInitialized;
+@@ -217,6 +224,7 @@ __gshared bool _isRuntimeInitialized;
version (FreeBSD) private __gshared void* dummy_ref;
version (DragonFlyBSD) private __gshared void* dummy_ref;
version (NetBSD) private __gshared void* dummy_ref;
@@ -30,7 +30,7 @@ Index: runtime/druntime/src/rt/sections_
/****
* Gets called on program startup just before GC is initialized.
-@@ -223,6 +231,7 @@ void initSections() nothrow @nogc
+@@ -228,6 +236,7 @@ void initSections() nothrow @nogc
version (FreeBSD) dummy_ref = &_d_dso_registry;
version (DragonFlyBSD) dummy_ref = &_d_dso_registry;
version (NetBSD) dummy_ref = &_d_dso_registry;
@@ -38,7 +38,7 @@ Index: runtime/druntime/src/rt/sections_
}
-@@ -397,6 +406,7 @@ else (private)
+@@ -402,6 +411,7 @@ else (private)
version (FreeBSD) deprecated extern (C) __gshared void* _Dmodule_ref;
version (DragonFlyBSD) deprecated extern (C) __gshared void* _Dmodule_ref;
version (NetBSD) deprecated extern (C) __gshared void* _Dmodule_ref;
@@ -46,7 +46,7 @@ Index: runtime/druntime/src/rt/sections_
version (Shared)
{
-@@ -933,6 +943,8 @@ version (Shared)
+@@ -938,6 +948,8 @@ version (Shared)
enum relocate = true;
else version (NetBSD)
enum relocate = true;
@@ -78,7 +78,7 @@ Index: runtime/druntime/src/rt/sections_
/* The dynamic thread vector (DTV) pointers may point 0x8000 past the start of
* each TLS block. This is at least true for PowerPC and Mips platforms.
-@@ -1234,7 +1246,7 @@ void[] getTLSRange(size_t mod, size_t sz) nothrow @nog
+@@ -1251,7 +1263,7 @@ void[] getTLSRange(size_t mod, size_t sz, size_t align
// base offset
auto ti = tls_index(mod, 0);
Index: patches/patch-runtime_druntime_src_rt_sections_ldc_d
===================================================================
RCS file: patches/patch-runtime_druntime_src_rt_sections_ldc_d
diff -N patches/patch-runtime_druntime_src_rt_sections_ldc_d
--- patches/patch-runtime_druntime_src_rt_sections_ldc_d 11 Mar 2022
19:29:04 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-Add OpenBSD.
-
-Index: runtime/druntime/src/rt/sections_ldc.d
---- runtime/druntime/src/rt/sections_ldc.d.orig
-+++ runtime/druntime/src/rt/sections_ldc.d
-@@ -30,6 +30,7 @@ else version (Darwin) {}
- else version (FreeBSD) {}
- else version (DragonFlyBSD) {}
- else version (NetBSD) {}
-+else version (OpenBSD) {}
- else version (Windows) {}
- else version (LDC):
-
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/lang/ldc/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 11 Mar 2022 19:29:04 -0000 1.2
+++ pkg/PLIST 18 Apr 2022 23:23:21 -0000
@@ -4,6 +4,7 @@
@bin bin/ldc2
@bin bin/ldmd2
include/d/
+include/d/__builtins.di
include/d/core/
include/d/core/atomic.d
include/d/core/attribute.d
@@ -17,6 +18,7 @@ include/d/core/gc/
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/
include/d/core/internal/abort.d
include/d/core/internal/array/
@@ -229,6 +231,7 @@ include/d/core/sys/linux/link.d
include/d/core/sys/linux/netinet/
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
@@ -271,6 +274,8 @@ include/d/core/sys/openbsd/
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/
@@ -556,8 +561,11 @@ include/d/etc/c/odbc/sqlucode.d
include/d/etc/c/sqlite3.d
include/d/etc/c/zlib/
include/d/etc/c/zlib.d
+include/d/etc/c/zlib/doc/
+include/d/etc/c/zlib/test/
include/d/etc/linux/
include/d/etc/linux/memoryerror.d
+include/d/importc.h
include/d/ldc/
include/d/ldc/asan.d
include/d/ldc/attributes.d
@@ -595,6 +603,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