summary refs log tree commit diff
path: root/tools/lib
diff options
context:
space:
mode:
authorGeorgi Valkov <gvalkov@abv.bg>2021-03-08 10:30:38 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2021-03-08 19:43:27 +0100
commite7fb6465d4c8e767e39cbee72464e0060ab3d20c (patch)
tree0960dc119f8157c8ec02fb5d7b6d10a49a2c5257 /tools/lib
parent769c18b254ca191b45047e1fcb3b2ce56fada0b6 (diff)
downloadlinux-e7fb6465d4c8e767e39cbee72464e0060ab3d20c.tar.gz
libbpf: Fix INSTALL flag order
It was reported ([0]) that having optional -m flag between source and
destination arguments in install command breaks bpftools cross-build
on MacOS. Move -m to the front to fix this issue.

  [0] https://github.com/openwrt/openwrt/pull/3959

Fixes: 7110d80d53f4 ("libbpf: Makefile set specified permission mode")
Signed-off-by: Georgi Valkov <gvalkov@abv.bg>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210308183038.613432-1-andrii@kernel.org
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/bpf/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index 887a494ad5fc..e9eb6a6e80d2 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -215,7 +215,7 @@ define do_install
 	if [ ! -d '$(DESTDIR_SQ)$2' ]; then		\
 		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2';	\
 	fi;						\
-	$(INSTALL) $1 $(if $3,-m $3,) '$(DESTDIR_SQ)$2'
+	$(INSTALL) $(if $3,-m $3,) $1 '$(DESTDIR_SQ)$2'
 endef
 
 install_lib: all_cmd