spdk: Fix RPATH in build
This commit is contained in:
parent
4af984b1fd
commit
a28c46933e
@ -33,6 +33,10 @@ stdenv.mkDerivation rec {
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
./revert-patchelf.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3
|
||||
python3.pkgs.pip
|
||||
@ -83,10 +87,6 @@ stdenv.mkDerivation rec {
|
||||
wrapPythonPrograms
|
||||
'';
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile.
|
||||
# otherwise does not find strncpy when compiling
|
||||
env.NIX_LDFLAGS = "-lbsd";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Set of libraries for fast user-mode storage";
|
||||
homepage = "https://spdk.io/";
|
||||
|
24
pkgs/by-name/sp/spdk/revert-patchelf.patch
Normal file
24
pkgs/by-name/sp/spdk/revert-patchelf.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk
|
||||
index 19f0192c2..90a40c86f 100644
|
||||
--- a/mk/spdk.common.mk
|
||||
+++ b/mk/spdk.common.mk
|
||||
@@ -501,8 +501,7 @@ UNINSTALL_SHARED_LIB=\
|
||||
INSTALL_APP=\
|
||||
$(Q)echo " INSTALL $(DESTDIR)$(bindir)/$(notdir $<)"; \
|
||||
install -d -m 755 "$(DESTDIR)$(bindir)"; \
|
||||
- install -m 755 "$<" "$(DESTDIR)$(bindir)/"; \
|
||||
- patchelf --remove-rpath "$(DESTDIR)$(bindir)/$(notdir $<)" || true
|
||||
+ install -m 755 "$<" "$(DESTDIR)$(bindir)/";
|
||||
|
||||
# Uninstall an app binary
|
||||
UNINSTALL_APP=\
|
||||
@@ -513,8 +512,7 @@ UNINSTALL_APP=\
|
||||
INSTALL_EXAMPLE=\
|
||||
$(Q)echo " INSTALL $(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))"; \
|
||||
install -d -m 755 "$(DESTDIR)$(bindir)"; \
|
||||
- install -m 755 "$<" "$(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))"; \
|
||||
- patchelf --remove-rpath "$(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))/$(notdir $<)" || true
|
||||
+ install -m 755 "$<" "$(DESTDIR)$(bindir)/spdk_$(strip $(subst /,_,$(subst $(SPDK_ROOT_DIR)/examples/, ,$(CURDIR))))";
|
||||
|
||||
# Uninstall an example binary
|
||||
UNINSTALL_EXAMPLE=\
|
Loading…
Reference in New Issue
Block a user