Message ID | CABWYdi2TYyK57rg9uyEN2YhQgFzm1ryKY64VdNH6Nq2zNPz72g@mail.gmail.com |
---|---|
State | Accepted, archived |
Delegated to: | BPF Maintainers |
Headers | show |
Series | tools: bpftool: do not force gcc as CC | expand |
On 12/19/2018 09:08 PM, Ivan Babrou wrote: > This allows transparent cross-compilation with CROSS_COMPILE. > > Signed-off-by: Ivan Babrou <ivan@cloudflare.com> 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
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__ \
This allows transparent cross-compilation with CROSS_COMPILE. Signed-off-by: Ivan Babrou <ivan@cloudflare.com> --- tools/bpf/bpftool/Makefile | 2 -- 1 file changed, 2 deletions(-) -- 2.20.1