Skip to content

Commit

Permalink
Move Makefile fix into flake.nix patch
Browse files Browse the repository at this point in the history
  • Loading branch information
be32826 committed Dec 19, 2023
1 parent 7153151 commit be17e66
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ newtoobig=$(shell oldrp="$(rppart)" ; oldrplen=`expr $${$(number_sign)oldrp} - 6
endif

install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir
ifeq ($(newtoobig), false)
ifneq ($(TOOLS),)
$(call install-prog,$(subst qemu-ga,qemu-ga$(EXESUF),$(TOOLS)),$(DESTDIR)$(bindir))
endif
Expand Down Expand Up @@ -683,6 +684,9 @@ endif
for d in $(TARGET_DIRS); do \
$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
done
else
$(error new RPATH too long - cannot adjust .so files for installation)
endif

# various test targets
test speed: all
Expand Down
26 changes: 26 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,32 @@
++ (with pkgs.python3Packages; [ pycparser libfdt ]);
nativeBuildInputs = [ pkgs.rustPlatform.cargoSetupHook ];
enableParallelBuilding = true;
patches = [
(pkgs.writeText "fix-rpath-error.patch" ''
diff --git a/Makefile b/Makefile
index cc2064de42..8b357e9a9a 100644
--- a/Makefile
+++ b/Makefile
@@ -653,7 +653,6 @@ newtoobig=$(shell oldrp="$(rppart)" ; oldrplen=`expr $''${$(number_sign)oldrp} - 6
endif
install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir
-ifeq ($(newtoobig), false)
ifneq ($(TOOLS),)
$(call install-prog,$(subst qemu-ga,qemu-ga$(EXESUF),$(TOOLS)),$(DESTDIR)$(bindir))
endif
@@ -684,9 +683,6 @@ endif
for d in $(TARGET_DIRS); do \
$(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=$$d/ -C $$d $@ || exit 1 ; \
done
-else
- $(error new RPATH too long - cannot adjust .so files for installation)
-endif
# various test targets
test speed: all
'')
];
postPatch = ''
patchShebangs .
substituteInPlace rules.mak \
Expand Down

0 comments on commit be17e66

Please sign in to comment.