mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 04:02:55 +03:00
linux-perf: Fix build (unportable shell hack broke).
This commit is contained in:
parent
3718a90806
commit
28f0ec6540
18
pkgs/os-specific/linux/kernel/perf.diff
Normal file
18
pkgs/os-specific/linux/kernel/perf.diff
Normal file
@ -0,0 +1,18 @@
|
||||
--- perf/config/utilities.mak.orig 2014-01-25 14:55:32.573320370 +0000
|
||||
+++ perf/config/utilities.mak 2014-01-25 15:13:34.174337760 +0000
|
||||
@@ -186,9 +186,14 @@
|
||||
endif
|
||||
TRY_CC_MSG=echo " CHK $(3)" 1>&2;
|
||||
|
||||
+define newline
|
||||
+
|
||||
+
|
||||
+endef
|
||||
+
|
||||
try-cc = $(shell sh -c \
|
||||
'TMP="$(OUTPUT)$(TMPOUT).$$$$"; \
|
||||
$(TRY_CC_MSG) \
|
||||
- echo "$(1)" | \
|
||||
+ echo -e "$(subst $(newline),\\n,$(1))" | tee _test.c | \
|
||||
$(CC) -x c - $(2) -o "$$TMP" $(TRY_CC_OUTPUT) && echo y; \
|
||||
rm -f "$$TMP"')
|
@ -12,6 +12,7 @@ stdenv.mkDerivation {
|
||||
preConfigure = ''
|
||||
cd tools/perf
|
||||
sed -i s,/usr/include/elfutils,$elfutils/include/elfutils, Makefile
|
||||
patch -p1 < ${./perf.diff}
|
||||
[ -f bash_completion ] && sed -i 's,^have perf,_have perf,' bash_completion
|
||||
export makeFlags="DESTDIR=$out $makeFlags"
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user