From 443317bedfd8dcadbc23f33c1cf4c77f445baac5 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 23 Jan 2024 21:03:10 +0300 Subject: [PATCH] wscript: fix RPATH under OpenBSD --- wscript | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wscript b/wscript index fbbae3d6..b459b9f9 100644 --- a/wscript +++ b/wscript @@ -357,6 +357,10 @@ def configure(conf): conf.env.DEFAULT_RPATH = '/usr/share/su.xash.Engine/lib' elif conf.env.DEST_OS == 'darwin': conf.env.DEFAULT_RPATH = '@loader_path' + elif conf.env.DEST_OS == 'openbsd': + # OpenBSD requires -z origin to enable $ORIGIN expansion in RPATH + conf.env.RPATH_ST = '-Wl,-z,origin,-rpath,%s' + conf.env.DEFAULT_RPATH = '$ORIGIN' else: conf.env.DEFAULT_RPATH = '$ORIGIN'