~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/net/bpf.mk

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/testing/selftests/net/bpf.mk (Architecture m68k) and /tools/testing/selftests/net/bpf.mk (Architecture i386)


  1 # SPDX-License-Identifier: GPL-2.0                  1 # SPDX-License-Identifier: GPL-2.0
  2 # Rules to generate bpf objs                        2 # Rules to generate bpf objs
  3 CLANG ?= clang                                      3 CLANG ?= clang
  4 SCRATCH_DIR := $(OUTPUT)/tools                      4 SCRATCH_DIR := $(OUTPUT)/tools
  5 BUILD_DIR := $(SCRATCH_DIR)/build                   5 BUILD_DIR := $(SCRATCH_DIR)/build
  6 BPFDIR := $(top_srcdir)/tools/lib/bpf               6 BPFDIR := $(top_srcdir)/tools/lib/bpf
  7 APIDIR := $(top_srcdir)/tools/include/uapi          7 APIDIR := $(top_srcdir)/tools/include/uapi
  8                                                     8 
  9 CCINCLUDE += -I$(selfdir)/bpf                       9 CCINCLUDE += -I$(selfdir)/bpf
 10 CCINCLUDE += -I$(top_srcdir)/usr/include/          10 CCINCLUDE += -I$(top_srcdir)/usr/include/
 11 CCINCLUDE += -I$(SCRATCH_DIR)/include              11 CCINCLUDE += -I$(SCRATCH_DIR)/include
 12                                                    12 
 13 BPFOBJ := $(BUILD_DIR)/libbpf/libbpf.a             13 BPFOBJ := $(BUILD_DIR)/libbpf/libbpf.a
 14                                                    14 
 15 MAKE_DIRS := $(BUILD_DIR)/libbpf                   15 MAKE_DIRS := $(BUILD_DIR)/libbpf
 16 $(MAKE_DIRS):                                      16 $(MAKE_DIRS):
 17         $(call msg,MKDIR,,$@)                      17         $(call msg,MKDIR,,$@)
 18         $(Q)mkdir -p $@                            18         $(Q)mkdir -p $@
 19                                                    19 
 20 # Get Clang's default includes on this system,     20 # Get Clang's default includes on this system, as opposed to those seen by
 21 # '--target=bpf'. This fixes "missing" files o     21 # '--target=bpf'. This fixes "missing" files on some architectures/distros,
 22 # such as asm/byteorder.h, asm/socket.h, asm/s     22 # such as asm/byteorder.h, asm/socket.h, asm/sockios.h, sys/cdefs.h etc.
 23 #                                                  23 #
 24 # Use '-idirafter': Don't interfere with inclu     24 # Use '-idirafter': Don't interfere with include mechanics except where the
 25 # build would have failed anyways.                 25 # build would have failed anyways.
 26 define get_sys_includes                            26 define get_sys_includes
 27 $(shell $(1) $(2) -v -E - </dev/null 2>&1 \        27 $(shell $(1) $(2) -v -E - </dev/null 2>&1 \
 28         | sed -n '/<...> search starts here:/,     28         | sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }') \
 29 $(shell $(1) $(2) -dM -E - </dev/null | grep '     29 $(shell $(1) $(2) -dM -E - </dev/null | grep '__riscv_xlen ' | awk '{printf("-D__riscv_xlen=%d -D__BITS_PER_LONG=%d", $$3, $$3)}')
 30 endef                                              30 endef
 31                                                    31 
 32 ifneq ($(CROSS_COMPILE),)                          32 ifneq ($(CROSS_COMPILE),)
 33 CLANG_TARGET_ARCH = --target=$(notdir $(CROSS_     33 CLANG_TARGET_ARCH = --target=$(notdir $(CROSS_COMPILE:%-=%))
 34 endif                                              34 endif
 35                                                    35 
 36 CLANG_SYS_INCLUDES = $(call get_sys_includes,$     36 CLANG_SYS_INCLUDES = $(call get_sys_includes,$(CLANG),$(CLANG_TARGET_ARCH))
 37                                                    37 
 38 BPF_PROG_OBJS := $(patsubst %.c,$(OUTPUT)/%.o,     38 BPF_PROG_OBJS := $(patsubst %.c,$(OUTPUT)/%.o,$(wildcard *.bpf.c))
 39                                                    39 
 40 $(BPF_PROG_OBJS): $(OUTPUT)/%.o : %.c $(BPFOBJ     40 $(BPF_PROG_OBJS): $(OUTPUT)/%.o : %.c $(BPFOBJ) | $(MAKE_DIRS)
 41         $(call msg,BPF_PROG,,$@)                   41         $(call msg,BPF_PROG,,$@)
 42         $(Q)$(CLANG) -O2 -g --target=bpf $(CCI     42         $(Q)$(CLANG) -O2 -g --target=bpf $(CCINCLUDE) $(CLANG_SYS_INCLUDES) \
 43         -c $< -o $@                                43         -c $< -o $@
 44                                                    44 
 45 $(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDI     45 $(BPFOBJ): $(wildcard $(BPFDIR)/*.[ch] $(BPFDIR)/Makefile)                     \
 46            $(APIDIR)/linux/bpf.h                   46            $(APIDIR)/linux/bpf.h                                               \
 47            | $(BUILD_DIR)/libbpf                   47            | $(BUILD_DIR)/libbpf
 48         $(call msg,MAKE,,$@)                       48         $(call msg,MAKE,,$@)
 49         $(Q)$(MAKE) $(submake_extras) -C $(BPF     49         $(Q)$(MAKE) $(submake_extras) -C $(BPFDIR) OUTPUT=$(BUILD_DIR)/libbpf/ \
 50                     EXTRA_CFLAGS='-g -O0'          50                     EXTRA_CFLAGS='-g -O0'                                      \
 51                     DESTDIR=$(SCRATCH_DIR) pre     51                     DESTDIR=$(SCRATCH_DIR) prefix= all install_headers
 52                                                    52 
 53 EXTRA_CLEAN += $(SCRATCH_DIR)                      53 EXTRA_CLEAN += $(SCRATCH_DIR)
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php