diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/rte.sdkinstall.mk | 36 | ||||
-rw-r--r-- | mk/rte.sdkroot.mk | 4 | ||||
-rw-r--r-- | mk/rte.sdktest.mk | 32 | ||||
-rw-r--r-- | mk/toolchain/gcc/rte.toolchain-compat.mk | 5 | ||||
-rw-r--r-- | mk/toolchain/gcc/rte.vars.mk | 9 |
5 files changed, 61 insertions, 25 deletions
diff --git a/mk/rte.sdkinstall.mk b/mk/rte.sdkinstall.mk index 4e97feff..99c4eacb 100644 --- a/mk/rte.sdkinstall.mk +++ b/mk/rte.sdkinstall.mk @@ -113,18 +113,22 @@ else @echo Installation in $(DESTDIR)$(prefix)/ complete endif +# when installing we want recursive copies preserving timestamps only, no +# preservation of user/group ids or permissions +CP_FLAGS=-dR --preserve=timestamps +TAR_X_FLAGS=--strip-components=1 --keep-newer-files --no-same-owner --no-same-permissions + install-runtime: $(Q)$(call rte_mkdir, $(DESTDIR)$(libdir)) - $(Q)cp -a $O/lib/* $(DESTDIR)$(libdir) + $(Q)cp $(CP_FLAGS) $O/lib/* $(DESTDIR)$(libdir) $(Q)$(call rte_mkdir, $(DESTDIR)$(bindir)) $(Q)tar -cf - -C $O --exclude 'app/*.map' \ --exclude app/dpdk-pmdinfogen \ --exclude 'app/cmdline*' --exclude app/test \ --exclude app/testacl --exclude app/testpipeline app | \ - tar -xf - -C $(DESTDIR)$(bindir) --strip-components=1 \ - --keep-newer-files + tar -xf - -C $(DESTDIR)$(bindir) $(TAR_X_FLAGS) $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) - $(Q)cp -a $(RTE_SDK)/usertools $(DESTDIR)$(datadir) + $(Q)cp $(CP_FLAGS) $(RTE_SDK)/usertools $(DESTDIR)$(datadir) $(Q)$(call rte_mkdir, $(DESTDIR)$(sbindir)) $(Q)$(call rte_symlink, $(DESTDIR)$(datadir)/usertools/dpdk-devbind.py, \ $(DESTDIR)$(sbindir)/dpdk-devbind) @@ -132,30 +136,29 @@ install-runtime: $(DESTDIR)$(bindir)/dpdk-pmdinfo) ifneq ($(wildcard $O/doc/man/*/*.1),) $(Q)$(call rte_mkdir, $(DESTDIR)$(mandir)/man1) - $(Q)cp -a $O/doc/man/*/*.1 $(DESTDIR)$(mandir)/man1 + $(Q)cp $(CP_FLAGS) $O/doc/man/*/*.1 $(DESTDIR)$(mandir)/man1 endif ifneq ($(wildcard $O/doc/man/*/*.8),) $(Q)$(call rte_mkdir, $(DESTDIR)$(mandir)/man8) - $(Q)cp -a $O/doc/man/*/*.8 $(DESTDIR)$(mandir)/man8 + $(Q)cp $(CP_FLAGS) $O/doc/man/*/*.8 $(DESTDIR)$(mandir)/man8 endif install-kmod: ifneq ($(wildcard $O/kmod/*),) $(Q)$(call rte_mkdir, $(DESTDIR)$(kerneldir)) - $(Q)cp -a $O/kmod/* $(DESTDIR)$(kerneldir) + $(Q)cp $(CP_FLAGS) $O/kmod/* $(DESTDIR)$(kerneldir) endif install-sdk: $(Q)$(call rte_mkdir, $(DESTDIR)$(includedir)) $(Q)tar -chf - -C $O include | \ - tar -xf - -C $(DESTDIR)$(includedir) --strip-components=1 \ - --keep-newer-files + tar -xf - -C $(DESTDIR)$(includedir) $(TAR_X_FLAGS) $(Q)$(call rte_mkdir, $(DESTDIR)$(sdkdir)) - $(Q)cp -a $(RTE_SDK)/mk $(DESTDIR)$(sdkdir) - $(Q)cp -a $(RTE_SDK)/buildtools $(DESTDIR)$(sdkdir) + $(Q)cp $(CP_FLAGS) $(RTE_SDK)/mk $(DESTDIR)$(sdkdir) + $(Q)cp $(CP_FLAGS) $(RTE_SDK)/buildtools $(DESTDIR)$(sdkdir) $(Q)$(call rte_mkdir, $(DESTDIR)$(targetdir)/app) - $(Q)cp -a $O/.config $(DESTDIR)$(targetdir) - $(Q)cp -a $O/app/dpdk-pmdinfogen $(DESTDIR)$(targetdir)/app + $(Q)cp $(CP_FLAGS) $O/.config $(DESTDIR)$(targetdir) + $(Q)cp $(CP_FLAGS) $O/app/dpdk-pmdinfogen $(DESTDIR)$(targetdir)/app $(Q)$(call rte_symlink, $(DESTDIR)$(includedir), $(DESTDIR)$(targetdir)/include) $(Q)$(call rte_symlink, $(DESTDIR)$(libdir), $(DESTDIR)$(targetdir)/lib) @@ -163,12 +166,11 @@ install-doc: ifneq ($(wildcard $O/doc/html),) $(Q)$(call rte_mkdir, $(DESTDIR)$(docdir)) $(Q)tar -cf - -C $O/doc --exclude 'html/guides/.*' html | \ - tar -xf - -C $(DESTDIR)$(docdir) --strip-components=1 \ - --keep-newer-files + tar -xf - -C $(DESTDIR)$(docdir) $(TAR_X_FLAGS) endif ifneq ($(wildcard $O/doc/*/*/*pdf),) $(Q)$(call rte_mkdir, $(DESTDIR)$(docdir)/guides) - $(Q)cp -a $O/doc/*/*/*pdf $(DESTDIR)$(docdir)/guides + $(Q)cp $(CP_FLAGS) $O/doc/*/*/*pdf $(DESTDIR)$(docdir)/guides endif $(Q)$(call rte_mkdir, $(DESTDIR)$(datadir)) - $(Q)cp -a $(RTE_SDK)/examples $(DESTDIR)$(datadir) + $(Q)cp $(CP_FLAGS) $(RTE_SDK)/examples $(DESTDIR)$(datadir) diff --git a/mk/rte.sdkroot.mk b/mk/rte.sdkroot.mk index e2e3effa..2fcf8de8 100644 --- a/mk/rte.sdkroot.mk +++ b/mk/rte.sdkroot.mk @@ -96,8 +96,8 @@ config defconfig showconfigs showversion showversionum: cscope gtags tags etags: $(Q)$(RTE_SDK)/devtools/build-tags.sh $@ $T -.PHONY: test test-basic test-fast test-ring test-mempool test-perf coverage -test test-basic test-fast test-ring test-mempool test-perf coverage: +.PHONY: test test-fast test-perf coverage test-drivers test-dump +test test-fast test-perf coverage test-drivers test-dump: $(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdktest.mk $@ test: test-build diff --git a/mk/rte.sdktest.mk b/mk/rte.sdktest.mk index daeea90f..18e03d6e 100644 --- a/mk/rte.sdktest.mk +++ b/mk/rte.sdktest.mk @@ -46,14 +46,34 @@ DIR := $(shell basename $(RTE_OUTPUT)) # # test: launch auto-tests, very simple for now. # -.PHONY: test test-basic test-fast test-perf coverage +.PHONY: test test-fast test-perf test-drivers test-dump coverage -PERFLIST=ring_perf,mempool_perf,memcpy_perf,hash_perf,timer_perf -coverage: BLACKLIST=-$(PERFLIST) -test-fast: BLACKLIST=-$(PERFLIST) -test-perf: WHITELIST=$(PERFLIST) +PERFLIST=ring_perf,mempool_perf,memcpy_perf,hash_perf,timer_perf,\ + reciprocal_division,reciprocal_division_perf,lpm_perf,red_all,\ + barrier,hash_multiwriter,timer_racecond,efd,hash_functions,\ + eventdev_selftest_sw,member_perf,efd_perf,lpm6_perf,red_perf,\ + distributor_perf,ring_pmd_perf,pmd_perf,ring_perf +DRIVERSLIST=link_bonding,link_bonding_mode4,link_bonding_rssconf,\ + cryptodev_sw_mrvl,cryptodev_dpaa2_sec,cryptodev_dpaa_sec,\ + cryptodev_qat,cryptodev_aesni_mb,cryptodev_openssl,\ + cryptodev_scheduler,cryptodev_aesni_gcm,cryptodev_null,\ + cryptodev_sw_snow3g,cryptodev_sw_kasumi,cryptodev_sw_zuc +DUMPLIST=dump_struct_sizes,dump_mempool,dump_malloc_stats,dump_devargs,\ + dump_log_types,dump_ring,dump_physmem,dump_memzone -test test-basic test-fast test-perf: +SPACESTR:= +SPACESTR+= +STRIPPED_PERFLIST=$(subst $(SPACESTR),,$(PERFLIST)) +STRIPPED_DRIVERSLIST=$(subst $(SPACESTR),,$(DRIVERSLIST)) +STRIPPED_DUMPLIST=$(subst $(SPACESTR),,$(DUMPLIST)) + +coverage: BLACKLIST=-$(STRIPPED_PERFLIST) +test-fast: BLACKLIST=-$(STRIPPED_PERFLIST),$(STRIPPED_DRIVERSLIST),$(STRIPPED_DUMPLIST) +test-perf: WHITELIST=$(STRIPPED_PERFLIST) +test-drivers: WHITELIST=$(STRIPPED_DRIVERSLIST) +test-dump: WHITELIST=$(STRIPPED_DUMPLIST) + +test test-fast test-perf test-drivers test-dump: @mkdir -p $(AUTOTEST_DIR) ; \ cd $(AUTOTEST_DIR) ; \ if [ -f $(RTE_OUTPUT)/app/test ]; then \ diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk index 01ac7e23..8dbd4417 100644 --- a/mk/toolchain/gcc/rte.toolchain-compat.mk +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk @@ -42,6 +42,11 @@ GCC_MAJOR = $(shell echo __GNUC__ | $(CC) -E -x c - | tail -n 1) GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(CC) -E -x c - | tail -n 1) GCC_VERSION = $(GCC_MAJOR)$(GCC_MINOR) +HOST_GCC_MAJOR = $(shell echo __GNUC__ | $(HOSTCC) -E -x c - | tail -n 1) +HOST_GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(HOSTCC) -E -x c - | tail -n 1) +HOST_GCC_PATCHLEVEL = $(shell echo __GNUC_PATCHLEVEL__ | $(HOSTCC) -E -x c - | tail -n 1) +HOST_GCC_VERSION = $(HOST_GCC_MAJOR)$(HOST_GCC_MINOR) + # if GCC is older than 4.x ifeq ($(shell test $(GCC_VERSION) -lt 40 && echo 1), 1) MACHINE_CFLAGS = diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index 3b907e20..e7008c05 100644 --- a/mk/toolchain/gcc/rte.vars.mk +++ b/mk/toolchain/gcc/rte.vars.mk @@ -99,6 +99,15 @@ ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1) WERROR_FLAGS += -Wno-uninitialized endif +HOST_WERROR_FLAGS := $(WERROR_FLAGS) + +ifeq ($(shell test $(HOST_GCC_VERSION) -gt 70 && echo 1), 1) +# Tell GCC only to error for switch fallthroughs without a suitable comment +HOST_WERROR_FLAGS += -Wimplicit-fallthrough=2 +# Ignore errors for snprintf truncation +HOST_WERROR_FLAGS += -Wno-format-truncation +endif + ifeq ($(shell test $(GCC_VERSION) -gt 70 && echo 1), 1) # Tell GCC only to error for switch fallthroughs without a suitable comment WERROR_FLAGS += -Wimplicit-fallthrough=2 |