Skip to content

Commit

Permalink
Merge pull request #12 from vjardin/Werror
Browse files Browse the repository at this point in the history
make: CFLAGS with Werror
  • Loading branch information
acassen authored Feb 13, 2024
2 parents 5d1b9b5 + e0d2d6e commit 2f95582
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

CC ?= gcc
INCLUDES = -Iinclude -I../lib -I../libbpf/src -I../libbpf/src/uapi
CFLAGS = -g -O2 -ggdb $(INCLUDES) -Wall -Wunused -Wstrict-prototypes -D_GNU_SOURCE
CFLAGS = -g -O2 -ggdb $(INCLUDES) -Werror -Wall -Wunused -Wstrict-prototypes -D_GNU_SOURCE
#DEFS = -D_DEBUG_
DEFS =
COMPILE = $(CC) $(CFLAGS) $(DEFS)
Expand Down
4 changes: 2 additions & 2 deletions src/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ TARGETS := gtp_fwd.bpf gtp_route.bpf gtp_mirror.bpf
# make samples/bpf/ LLC=~/git/llvm/build/bin/llc CLANG=~/git/llvm/build/bin/clang
LLC ?= llc
CLANG ?= clang
CFLAGS := -g -O2 -Wall
CFLAGS := -g -O2 -Wall -Werror

# Include for BPF are pointing to libbpf
LIBBPF = ../../libbpf
Expand Down Expand Up @@ -64,7 +64,7 @@ verify_target_bpf: verify_cmds
# useless for BPF samples.
$(TARGETS): %.bpf: %.c
@echo " CLANG-bpf" $@
@$(CLANG) -S $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
@$(CLANG) $(CFLAGS) -S $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
-D__KERNEL__ -D__ASM_SYSREG_H \
-D__BPF_TRACING__ \
-Wall \
Expand Down

0 comments on commit 2f95582

Please sign in to comment.