|
|
@@ -84,7 +84,17 @@ else
|
|
|
CPU ?= generic
|
|
|
endif
|
|
|
|
|
|
+# Get Clang's default includes on this system, as opposed to those seen by
|
|
|
+# '-target bpf'. This fixes "missing" files on some architectures/distros,
|
|
|
+# such as asm/byteorder.h, asm/socket.h, asm/sockios.h, sys/cdefs.h etc.
|
|
|
+#
|
|
|
+# Use '-idirafter': Don't interfere with include mechanics except where the
|
|
|
+# build would have failed anyways.
|
|
|
+CLANG_SYS_INCLUDES := $(shell $(CLANG) -v -E - </dev/null 2>&1 \
|
|
|
+ | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }')
|
|
|
+
|
|
|
CLANG_FLAGS = -I. -I./include/uapi -I../../../include/uapi \
|
|
|
+ $(CLANG_SYS_INCLUDES) \
|
|
|
-Wno-compare-distinct-pointer-types
|
|
|
|
|
|
$(OUTPUT)/test_l4lb_noinline.o: CLANG_FLAGS += -fno-inline
|