Bug#955338: sbcl: Please backport patch to fix build on kfreebsd-*

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.debian.ports.bsd
Message-ID <158555483345.2843807.3932300637996308102.reportbug__12168.5505657055$1585555048$gmane$org@z6.physik.fu-berlin.de>
Source: sbcl
Severity: normal
Tags: patch
User: [email protected]
Usertags: kfreebsd-amd64

Hi!

sbcl fails to build from source on kfreebsd-amd64 [1] the same way it did on
powerpc, so I sent a patch upstream which was merged to fix the issue the
same way as on powerpc [2].

Can you include the attached patch for the next upload to fix the build on
kfreebsd-*?

Thanks,
Adrian

> [1] https://buildd.debian.org/status/fetch.php?pkg=sbcl&arch=kfreebsd-amd64&ver=2%3A2.0.2-2&stamp=1584178866&raw=0
> [2] https://github.com/sbcl/sbcl/commit/d85d2f8c39e7fc6feca3ebf6f494c961dc5226d8

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - [email protected]
`. `'   Freie Universitaet Berlin - [email protected]
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
0001-kfreebsd-Add-no-as-needed-to-OS_LIBS.patch (text/plain, 1.4 KB)
>From d85d2f8c39e7fc6feca3ebf6f494c961dc5226d8 Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <[email protected]>
Date: Mon, 30 Mar 2020 01:04:48 +0200
Subject: [PATCH] kfreebsd: Add -no-as-needed to OS_LIBS

---
 src/runtime/Config.x86-64-gnu-kfreebsd | 2 +-
 src/runtime/Config.x86-gnu-kfreebsd    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/runtime/Config.x86-64-gnu-kfreebsd b/src/runtime/Config.x86-64-gnu-kfreebsd
index 89975c48f..6fd4cdd05 100644
--- a/src/runtime/Config.x86-64-gnu-kfreebsd
+++ b/src/runtime/Config.x86-64-gnu-kfreebsd
@@ -15,7 +15,7 @@ include Config.x86-64-bsd
 # worked fine for most things, but LOAD-FOREIGN & friends require
 # dlopen() etc., which in turn depend on dynamic linking of the
 # runtime.
-OS_LIBS += -lutil -ldl
+OS_LIBS += -lutil -ldl -Wl,-no-as-needed
 
 # use libthr (1:1 threading).  libpthread (m:n threading) does not work.
 ifdef LISP_FEATURE_SB_THREAD
diff --git a/src/runtime/Config.x86-gnu-kfreebsd b/src/runtime/Config.x86-gnu-kfreebsd
index 385209023..e49dde4a6 100644
--- a/src/runtime/Config.x86-gnu-kfreebsd
+++ b/src/runtime/Config.x86-gnu-kfreebsd
@@ -17,7 +17,7 @@ include Config.x86-bsd
 # runtime.
 LINKFLAGS += -dynamic -Wl,--export-dynamic -m32
 
-OS_LIBS += -lutil -ldl
+OS_LIBS += -lutil -ldl -Wl,-no-as-needed
 
 # use libthr (1:1 threading).  libpthread (m:n threading) does not work.
 ifdef LISP_FEATURE_SB_THREAD
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.