]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
make: revert adding -rpath by default
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 2 Aug 2017 14:23:19 +0000 (16:23 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 2 Aug 2017 14:25:43 +0000 (16:25 +0200)
This reverts commits 89ebf5293 and 1d8b5706cd.
I didn't realize that setting rpath is considered bad practice by most
distributions.  I'm really "spoiled" by nix(pkgs/os).

doc/build.rst
platform.mk

index 6ba6f531419e2f4a9adc983c1bf2b5af7ba3b7d5..9b47b7ee5eb9b376a3371b3fcf48554c792d5d11 100644 (file)
@@ -125,6 +125,12 @@ When you have all the dependencies ready, you can build and install.
     Production code should be compiled with ``-DNDEBUG``.
     If you build the binary with ``-DNOVERBOSELOG``, it won't be possible to turn on verbose logging; we advise packagers against using that flag.
 
+.. note:: If you build with ``PREFIX``, you may need to also set the ``LDFLAGS`` for the libraries:
+
+.. code-block:: bash
+
+   make LDFLAGS="-Wl,-rpath=/usr/local/lib" PREFIX="/usr/local"
+
 Alternatively you can build only specific parts of the project, i.e. ``library``.
 
 .. code-block:: bash
index b56be022661b04e2f5113df59498d7885b70199e..ad3367c18303fb6c95ce929bfb0f93ef8fc8c8cc 100644 (file)
@@ -43,7 +43,7 @@ else
                SOVER = $(if $(1), -compatibility_version $(2) -current_version $(1),)
        else
                PLATFORM := POSIX
-               LDFLAGS += -pthread -lm -Wl,-E "-Wl,-rpath=$(LIBDIR)"
+               LDFLAGS += -pthread -lm -Wl,-E
                 # ELF hardening options
                ifneq ($(HARDENING),no)
                        BINFLAGS += -pie