Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Bronnikov via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org,
	Sergey Kaplun <skaplun@tarantool.org>,
	e.temirgaleev@tarantool.org
Cc: Sergey Bronnikov <segreyb@tarantool.org>
Subject: [Tarantool-patches] [PATCH luajit 1/3] cmake: omit -ldl for OpenBSD in SetTargetFlags()
Date: Mon, 26 Oct 2026 16:24:57 +0300	[thread overview]
Message-ID: <e8be88049fd877a4a4ead0eddfaba0eccee04f36.1793019660.git.estetus@gmail.com> (raw)
In-Reply-To: <cover.1793019660.git.estetus@gmail.com>

From: Sergey Bronnikov <segreyb@tarantool.org>

LuaJIT links with -ldl, which does not exist on OpenBSD (dlopen()
is in libc). The patch fixes that.

Needed for the OpenBSD port.
---
 cmake/SetTargetFlags.cmake | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmake/SetTargetFlags.cmake b/cmake/SetTargetFlags.cmake
index a0f9d45a..67cb6231 100644
--- a/cmake/SetTargetFlags.cmake
+++ b/cmake/SetTargetFlags.cmake
@@ -48,6 +48,9 @@ endif()
 
 if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
   AppendFlags(TARGET_SHARED_FLAGS -undefined dynamic_lookup)
+elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
+  # OpenBSD has no libdl, its functionality lives in libc.
+  AppendFlags(TARGET_BIN_FLAGS -Wl,-E)
 else() # Linux and FreeBSD.
   AppendFlags(TARGET_BIN_FLAGS -Wl,-E)
   list(APPEND TARGET_LIBS dl)
-- 
2.56.0


  reply	other threads:[~2026-10-26 13:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 13:24 [Tarantool-patches] [PATCH luajit 0/3] OpenBSD support in a build system Sergey Bronnikov via Tarantool-patches
2026-10-26 13:24 ` Sergey Bronnikov via Tarantool-patches [this message]
2026-10-26 13:25 ` [Tarantool-patches] [PATCH luajit 2/3] cmake: allow using CMake build system in OpenBSD Sergey Bronnikov via Tarantool-patches
2026-10-26 13:25 ` [Tarantool-patches] [PATCH luajit 3/3] cmake: make Git optional in SetVersion() Sergey Bronnikov via Tarantool-patches
2026-10-29 14:58 ` [Tarantool-patches] [PATCH luajit 0/3] OpenBSD support in a build system Sergey Kaplun via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e8be88049fd877a4a4ead0eddfaba0eccee04f36.1793019660.git.estetus@gmail.com \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=e.temirgaleev@tarantool.org \
    --cc=estetus@gmail.com \
    --cc=segreyb@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 1/3] cmake: omit -ldl for OpenBSD in SetTargetFlags()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox