chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Don't add LIBDIR to rpath by default


From: Sören Tempel
Subject: [PATCH] Don't add LIBDIR to rpath by default
Date: Sun, 23 Jan 2022 12:54:58 +0100

Hello,

I maintain a CHICKEN package for Alpine Linux. At Alpine, have a custom
tool called abuild for packaging software based on package recipes. As
part of our build process, we perform various sanity checks. One of these
sanity checks is ensuring that the packaged software doesn't contain any
redundant rpath entries [1].

I recently started working on Alpine packages for Scheme software which
I compiled with CHICKEN. While doing so, I noticed that csc(1)
unconditionally adds $(LIBDIR) as an rpath entry by adding
-Wl,-rpath=$(LIBDIR) to the linker flags. I find this surprising as (in
the common case) LIBDIR should already be part of the default rpath on
(hopefully) all systems (otherwise it doesn't make sense to install .so
files to it). Since this rpath entry is redundant it causes a warning on
Alpine.

I was wondering if it would be possible to only add additional rpath
entries if -deployed is given or non-host-mode is used. The attached
git-format-patch(1) implements this. Would it be possible to integrate
it upstream?

Discussion: Some of the existing Makefiles also use
-Wl,-rpath=$(LIBDIR). I am wondering if that should/could be removed as
well? Furthermore, in regards to codestyle the attached patch could use
cond instead of nesting if expressions, not sure what is preferred in
this case here.

Please CC me, I am not subscribed to the list.

Greetings,
Sören

[1]: 
https://gitlab.alpinelinux.org/alpine/abuild/-/blob/681ef9dfcf6e57bdda767efed7e50ce8e9de0563/abuild.in#L1178-L1194

Attachment: txtISHo7ntvyB.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]