Skip to content

Commit

Permalink
bpf: Fix space hack in Makefile
Browse files Browse the repository at this point in the history
Fix the space hack which stopped working with make v4.3 (works with
v4.2 though):

    [..]
    " [-DENABLE_HOST_REDIRECT-DENABLE_IPV4-DENABLE_IPV6-DENABLE_NAT46]";
    clang -DENABLE_HOST_REDIRECT-DENABLE_IPV4-DENABLE_IPV6-DENABLE_NAT46
    -I/home/brb/sandbox/gopath/src/github.com/cilium/cilium/bpf/include
    -I/home/brb/sandbox/gopath/src/github.com/cilium/cilium/bpf
    -D__NR_CPUS__=8 -O2 -g -target bpf -emit-llvm -Wall -Werror
    -Wno-address-of-packed-member -Wno-unknown-warning-option -c bpf_lxc.c
    -o bpf_lxc.ll; llc -march=bpf -mcpu=probe -mattr=dwarfris -o /dev/null
    bpf_lxc.ll;  \
    fi
    In file included from <built-in>:323:
    <command line>:1:20: error: ISO C99 requires whitespace after the macro
    name [-Werror,-Wc99-extensions]
    #define ENABLE_IPV4-DHAVE_LPM_MAP_TYPE 1

Signed-off-by: Martynas Pumputis <m@lambda.lt>
  • Loading branch information
brb authored and aanm committed Feb 13, 2020
1 parent c95f93b commit 4630078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ $(BPF_SIMPLE): %.o: %.ll
$(QUIET) ${LLC} ${LLC_FLAGS} -filetype=obj -o $@ $(patsubst %.o,%.ll,$@)

# Hack to get make to replace : with a space
space :=
space +=
null :=
space := ${null} ${null}

# The following option combinations are compile tested
LB_OPTIONS = \
Expand Down

0 comments on commit 4630078

Please sign in to comment.