aboutgitcodebugslistschat
path: root/Makefile
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-21 04:26:08 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-21 04:26:08 +0200
commitdd942eaa480a0744fd64844f34233900a0da6893 (patch)
tree42f048af444890506e208d0058c5cd3e03718667 /Makefile
parent6257a2752e39c55bfb03d6db94af0c6033feb8df (diff)
downloadpasst-dd942eaa480a0744fd64844f34233900a0da6893.tar
passt-dd942eaa480a0744fd64844f34233900a0da6893.tar.gz
passt-dd942eaa480a0744fd64844f34233900a0da6893.tar.bz2
passt-dd942eaa480a0744fd64844f34233900a0da6893.tar.lz
passt-dd942eaa480a0744fd64844f34233900a0da6893.tar.xz
passt-dd942eaa480a0744fd64844f34233900a0da6893.tar.zst
passt-dd942eaa480a0744fd64844f34233900a0da6893.zip
passt: Fix build with gcc 7, use std=c99, enable some more Clang checkers
Unions and structs, you all have names now. Take the chance to enable bugprone-reserved-identifier, cert-dcl37-c, and cert-dcl51-cpp checkers in clang-tidy. Provide a ffsl() weak declaration using gcc built-in. Start reordering includes, but that's not enough for the llvm-include-order checker yet. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 1 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 83140ad..9e7651b 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@
# Copyright (c) 2021 Red Hat GmbH
# Author: Stefano Brivio <sbrivio@redhat.com>
-CFLAGS += -Wall -Wextra -pedantic
+CFLAGS += -Wall -Wextra -pedantic -std=c99 -D_XOPEN_SOURCE=700 -D_GNU_SOURCE
CFLAGS += -DRLIMIT_STACK_VAL=$(shell ulimit -s)
CFLAGS += -DPAGE_SIZE=$(shell getconf PAGE_SIZE)
CFLAGS += -DNETNS_RUN_DIR=\"/run/netns\"
@@ -120,9 +120,6 @@ pkgs:
# - hicpp-signed-bitwise
# Those are needed for syscalls, epoll_wait flags, etc.
#
-# - bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp
-# This flags _GNU_SOURCE, currently needed
-#
# - llvm-include-order
# TODO: not really important, but nice to fix eventually
#
@@ -155,7 +152,6 @@ clang-tidy: $(wildcard *.c)
-readability-magic-numbers,\
-llvmlibc-restrict-system-libc-headers,\
-hicpp-signed-bitwise,\
- -bugprone-reserved-identifier,-cert-dcl37-c,-cert-dcl51-cpp,\
-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling,\
-llvm-include-order,\
-cppcoreguidelines-avoid-magic-numbers,\