[PATCH] tools: bpftool: do not force gcc as CC

Subsystems: bpf [general] (safe dynamic programs and tools), bpf [tooling] (bpftool), the rest

STALE2812d

2 messages, 2 authors, 2018-12-19 · open the first message on its own page

[PATCH] tools: bpftool: do not force gcc as CC

From: Ivan Babrou <hidden>
Date: 2018-12-19 20:08:15

This allows transparent cross-compilation with CROSS_COMPILE.

Signed-off-by: Ivan Babrou <redacted>
---
 tools/bpf/bpftool/Makefile | 2 --
 1 file changed, 2 deletions(-)
diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
index dac7eff4c7e5..ee906f597f21 100644
--- a/tools/bpf/bpftool/Makefile
+++ b/tools/bpf/bpftool/Makefile
@@ -35,8 +35,6 @@ $(LIBBPF)-clean:
 prefix ?= /usr/local
 bash_compdir ?= /usr/share/bash-completion/completions

-CC = gcc
-
 CFLAGS += -O2
 CFLAGS += -W -Wall -Wextra -Wno-unused-parameter -Wshadow
-Wno-missing-field-initializers
 CFLAGS += -DPACKAGE='"bpftool"' -D__EXPORTED_HEADERS__ \

Re: [PATCH] tools: bpftool: do not force gcc as CC

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2018-12-19 21:04:24

On 12/19/2018 09:08 PM, Ivan Babrou wrote:
This allows transparent cross-compilation with CROSS_COMPILE.

Signed-off-by: Ivan Babrou <redacted>
Looks good, applied! So we basically piggy back on 7ed1c1901fe5 ("tools:
fix cross-compile var clobbering") which moved everything to the
tools/scripts/Makefile.include which bpftool includes. Could we
then also reduce tools/lib/bpf/Makefile as well for cross-compilation?
Looks like this has bunch of duplicate logic and yet we pull in the
Makefile.include as well there.

Thanks,
Daniel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help