diff --git a/app/pdump/Makefile b/app/pdump/Makefile index e6b9eea91b..bd3c208195 100644 --- a/app/pdump/Makefile +++ b/app/pdump/Makefile @@ -7,6 +7,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_PDUMP),y) APP = dpdk-pdump +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += $(WERROR_FLAGS) # all source are stored in SRCS-y diff --git a/app/proc_info/Makefile b/app/proc_info/Makefile index 214f3f54a1..9e87f524dd 100644 --- a/app/proc_info/Makefile +++ b/app/proc_info/Makefile @@ -5,6 +5,7 @@ include $(RTE_SDK)/mk/rte.vars.mk APP = dpdk-procinfo +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += $(WERROR_FLAGS) # all source are stored in SRCS-y diff --git a/app/test-bbdev/Makefile b/app/test-bbdev/Makefile index 5a6e36aee7..9aedd77659 100644 --- a/app/test-bbdev/Makefile +++ b/app/test-bbdev/Makefile @@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk # APP = testbbdev +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/app/test-eventdev/Makefile b/app/test-eventdev/Makefile index e600e21c41..cb659110e5 100644 --- a/app/test-eventdev/Makefile +++ b/app/test-eventdev/Makefile @@ -6,6 +6,7 @@ include $(RTE_SDK)/mk/rte.vars.mk APP = dpdk-test-eventdev +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index 34125e5612..ed588ab6d9 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -10,6 +10,7 @@ ifeq ($(CONFIG_RTE_TEST_PMD),y) # APP = testpmd +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/drivers/bbdev/null/Makefile b/drivers/bbdev/null/Makefile index 6d8469df92..f885a97bb3 100644 --- a/drivers/bbdev/null/Makefile +++ b/drivers/bbdev/null/Makefile @@ -6,6 +6,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_pmd_bbdev_null.a # build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring -lrte_kvargs diff --git a/drivers/bbdev/turbo_sw/Makefile b/drivers/bbdev/turbo_sw/Makefile index 08f24b0e74..79eb554772 100644 --- a/drivers/bbdev/turbo_sw/Makefile +++ b/drivers/bbdev/turbo_sw/Makefile @@ -11,6 +11,7 @@ endif LIB = librte_pmd_bbdev_turbo_sw.a # build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring -lrte_kvargs diff --git a/drivers/bus/dpaa/Makefile b/drivers/bus/dpaa/Makefile index 4eec0ef2ba..bffaa9d92c 100644 --- a/drivers/bus/dpaa/Makefile +++ b/drivers/bus/dpaa/Makefile @@ -9,6 +9,7 @@ RTE_BUS_DPAA=$(RTE_SDK)/drivers/bus/dpaa # LIB = librte_bus_dpaa.a +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS := -I$(SRCDIR) $(CFLAGS) CFLAGS += -O3 $(WERROR_FLAGS) CFLAGS += -Wno-pointer-arith diff --git a/drivers/bus/fslmc/Makefile b/drivers/bus/fslmc/Makefile index 45f76d4655..de237f0f75 100644 --- a/drivers/bus/fslmc/Makefile +++ b/drivers/bus/fslmc/Makefile @@ -13,6 +13,7 @@ ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_PMD),y) CONFIG_RTE_LIBRTE_FSLMC_BUS = $(CONFIG_RTE_LIBRTE_DPAA2_PMD) endif +CFLAGS += -DALLOW_EXPERIMENTAL_API ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT),y) CFLAGS += -O0 -g CFLAGS += "-Wno-error" diff --git a/drivers/crypto/dpaa2_sec/Makefile b/drivers/crypto/dpaa2_sec/Makefile index 564840e20b..cb6c63e698 100644 --- a/drivers/crypto/dpaa2_sec/Makefile +++ b/drivers/crypto/dpaa2_sec/Makefile @@ -17,6 +17,7 @@ endif LIB = librte_pmd_dpaa2_sec.a # build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT),y) CFLAGS += -O0 -g CFLAGS += "-Wno-error" diff --git a/drivers/crypto/dpaa_sec/Makefile b/drivers/crypto/dpaa_sec/Makefile index c0b02eded0..fe2c593283 100644 --- a/drivers/crypto/dpaa_sec/Makefile +++ b/drivers/crypto/dpaa_sec/Makefile @@ -10,6 +10,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_pmd_dpaa_sec.a # build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -D _GNU_SOURCE ifeq ($(CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_INIT),y) CFLAGS += -O0 -g diff --git a/drivers/event/dpaa/Makefile b/drivers/event/dpaa/Makefile index bd0b6c9a24..ddd855227a 100644 --- a/drivers/event/dpaa/Makefile +++ b/drivers/event/dpaa/Makefile @@ -10,6 +10,7 @@ RTE_SDK_DPAA=$(RTE_SDK)/drivers/net/dpaa # LIB = librte_pmd_dpaa_event.a +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS := -I$(SRCDIR) $(CFLAGS) CFLAGS += -O3 $(WERROR_FLAGS) CFLAGS += -Wno-pointer-arith diff --git a/drivers/event/sw/Makefile b/drivers/event/sw/Makefile index c6600e8367..81236a392a 100644 --- a/drivers/event/sw/Makefile +++ b/drivers/event/sw/Makefile @@ -7,6 +7,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_pmd_sw_event.a # build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) # for older GCC versions, allow us to initialize an event using diff --git a/drivers/net/failsafe/Makefile b/drivers/net/failsafe/Makefile index ea2a8fe466..a3b8173aa7 100644 --- a/drivers/net/failsafe/Makefile +++ b/drivers/net/failsafe/Makefile @@ -50,6 +50,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PMD_FAILSAFE) += failsafe_flow.c # No exported include files # Basic CFLAGS: +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -std=gnu99 -Wextra CFLAGS += -O3 CFLAGS += -I. diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile index 9efa5a40cd..d0804fc5bc 100644 --- a/drivers/net/ixgbe/Makefile +++ b/drivers/net/ixgbe/Makefile @@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk # LIB = librte_pmd_ixgbe.a +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/drivers/net/sfc/Makefile b/drivers/net/sfc/Makefile index 2b17e3b178..cc4e4e5105 100644 --- a/drivers/net/sfc/Makefile +++ b/drivers/net/sfc/Makefile @@ -13,6 +13,7 @@ include $(RTE_SDK)/mk/rte.vars.mk # LIB = librte_pmd_sfc_efx.a +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -I$(SRCDIR)/base/ CFLAGS += -I$(SRCDIR) CFLAGS += -O3 diff --git a/drivers/net/vdev_netvsc/Makefile b/drivers/net/vdev_netvsc/Makefile index 45351b8c43..7be1713755 100644 --- a/drivers/net/vdev_netvsc/Makefile +++ b/drivers/net/vdev_netvsc/Makefile @@ -10,6 +10,7 @@ LIBABIVER := 1 EXPORT_MAP := rte_pmd_vdev_netvsc_version.map # Additional compilation flags. +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += -g CFLAGS += -Wall -Wextra diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile index b215ada975..6c2c9967bf 100644 --- a/drivers/net/virtio/Makefile +++ b/drivers/net/virtio/Makefile @@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk # LIB = librte_pmd_virtio.a +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring diff --git a/examples/bbdev_app/Makefile b/examples/bbdev_app/Makefile index 1b7ec63e02..cdd4a12eaa 100644 --- a/examples/bbdev_app/Makefile +++ b/examples/bbdev_app/Makefile @@ -16,6 +16,7 @@ APP = bbdev # all source are stored in SRCS-y SRCS-y := main.c +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/eventdev_pipeline/Makefile b/examples/eventdev_pipeline/Makefile index 94b4c86fd6..5cdb076b56 100644 --- a/examples/eventdev_pipeline/Makefile +++ b/examples/eventdev_pipeline/Makefile @@ -18,6 +18,7 @@ SRCS-y := main.c SRCS-y += pipeline_worker_generic.c SRCS-y += pipeline_worker_tx.c +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/flow_classify/Makefile b/examples/flow_classify/Makefile index 56062486fa..a00b75effb 100644 --- a/examples/flow_classify/Makefile +++ b/examples/flow_classify/Makefile @@ -17,6 +17,7 @@ APP = flow_classify # all source are stored in SRCS-y SRCS-y := flow_classify.c +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/ipsec-secgw/Makefile b/examples/ipsec-secgw/Makefile index 9b7bacb3e6..c4d07cc9de 100644 --- a/examples/ipsec-secgw/Makefile +++ b/examples/ipsec-secgw/Makefile @@ -18,6 +18,7 @@ endif APP = ipsec-secgw +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 -gdwarf-2 CFLAGS += $(WERROR_FLAGS) ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y) diff --git a/examples/service_cores/Makefile b/examples/service_cores/Makefile index 2dc36134b9..4f79c9776a 100644 --- a/examples/service_cores/Makefile +++ b/examples/service_cores/Makefile @@ -16,6 +16,7 @@ APP = service_cores # all source are stored in SRCS-y SRCS-y := main.c +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += $(WERROR_FLAGS) # workaround for a gcc bug with noreturn attribute diff --git a/lib/librte_bbdev/Makefile b/lib/librte_bbdev/Makefile index f9bf960b49..1451adb25d 100644 --- a/lib/librte_bbdev/Makefile +++ b/lib/librte_bbdev/Makefile @@ -10,6 +10,7 @@ LIB = librte_bbdev.a LIBABIVER := 1 # build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lrte_eal -lrte_mempool -lrte_mbuf diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile index 028e81dd8e..dd455e671b 100644 --- a/lib/librte_eal/bsdapp/eal/Makefile +++ b/lib/librte_eal/bsdapp/eal/Makefile @@ -9,6 +9,7 @@ ARCH_DIR ?= $(RTE_ARCH) VPATH += $(RTE_SDK)/lib/librte_eal/common VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR) +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -I$(SRCDIR)/include CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include diff --git a/lib/librte_eal/linuxapp/Makefile b/lib/librte_eal/linuxapp/Makefile index 7e94e914a0..aa52a01ee8 100644 --- a/lib/librte_eal/linuxapp/Makefile +++ b/lib/librte_eal/linuxapp/Makefile @@ -8,4 +8,6 @@ DIRS-$(CONFIG_RTE_EAL_IGB_UIO) += igb_uio DIRS-$(CONFIG_RTE_KNI_KMOD) += kni DEPDIRS-kni := eal +CFLAGS += -DALLOW_EXPERIMENTAL_API + include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile index e50b73a69c..7e5bbe8898 100644 --- a/lib/librte_eal/linuxapp/eal/Makefile +++ b/lib/librte_eal/linuxapp/eal/Makefile @@ -6,6 +6,7 @@ include $(RTE_SDK)/mk/rte.vars.mk LIB = librte_eal.a ARCH_DIR ?= $(RTE_ARCH) + EXPORT_MAP := ../../rte_eal_version.map VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR) @@ -13,6 +14,7 @@ LIBABIVER := 6 VPATH += $(RTE_SDK)/lib/librte_eal/common +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -I$(SRCDIR)/include CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile index 34d014e718..3ca5782bb1 100644 --- a/lib/librte_ether/Makefile +++ b/lib/librte_ether/Makefile @@ -8,6 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk # LIB = librte_ethdev.a +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lrte_net -lrte_eal -lrte_mempool -lrte_ring diff --git a/lib/librte_eventdev/Makefile b/lib/librte_eventdev/Makefile index 7fd78c7fdd..d27dd07073 100644 --- a/lib/librte_eventdev/Makefile +++ b/lib/librte_eventdev/Makefile @@ -11,6 +11,7 @@ LIB = librte_eventdev.a LIBABIVER := 3 # build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lrte_eal -lrte_ring -lrte_ethdev -lrte_hash diff --git a/lib/librte_flow_classify/Makefile b/lib/librte_flow_classify/Makefile index 086afe52dd..fe9fc47ab6 100644 --- a/lib/librte_flow_classify/Makefile +++ b/lib/librte_flow_classify/Makefile @@ -6,6 +6,7 @@ include $(RTE_SDK)/mk/rte.vars.mk # library name LIB = librte_flow_classify.a +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile index e2e3ec6c31..367568ae35 100644 --- a/lib/librte_mbuf/Makefile +++ b/lib/librte_mbuf/Makefile @@ -6,6 +6,7 @@ include $(RTE_SDK)/mk/rte.vars.mk # library name LIB = librte_mbuf.a +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 LDLIBS += -lrte_eal -lrte_mempool diff --git a/lib/librte_security/Makefile b/lib/librte_security/Makefile index bd92343bda..8daebea466 100644 --- a/lib/librte_security/Makefile +++ b/lib/librte_security/Makefile @@ -10,6 +10,7 @@ LIB = librte_security.a LIBABIVER := 1 # build flags +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) LDLIBS += -lrte_eal -lrte_mempool diff --git a/lib/librte_vhost/Makefile b/lib/librte_vhost/Makefile index 065d5c469a..5d6c6abaed 100644 --- a/lib/librte_vhost/Makefile +++ b/lib/librte_vhost/Makefile @@ -10,6 +10,7 @@ EXPORT_MAP := rte_vhost_version.map LIBABIVER := 4 +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -D_FILE_OFFSET_BITS=64 CFLAGS += -I vhost_user LDLIBS += -lpthread diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk index d1dd6df024..a734cbbd0c 100644 --- a/mk/internal/rte.compile-pre.mk +++ b/mk/internal/rte.compile-pre.mk @@ -56,6 +56,9 @@ C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CPPFLAGS) $(CFLAGS) \ C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)"," CC $(@)") endif +EXPERIMENTAL_CHECK = $(RTE_SDK)/buildtools/check-experimental-syms.sh +CHECK_EXPERIMENTAL = $(EXPERIMENTAL_CHECK) $(SRCDIR)/$(EXPORT_MAP) $@ + PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@.pmd.o $@.pmd.c PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@ @@ -72,6 +75,7 @@ C_TO_O_DO = @set -e; \ echo $(C_TO_O_DISP); \ $(C_TO_O) && \ $(PMDINFO_TO_O) && \ + $(CHECK_EXPERIMENTAL) && \ echo $(C_TO_O_CMD) > $(call obj2cmd,$(@)) && \ sed 's,'$@':,dep_'$@' =,' $(call obj2dep,$(@)).tmp > $(call obj2dep,$(@)) && \ rm -f $(call obj2dep,$(@)).tmp diff --git a/mk/toolchain/clang/rte.vars.mk b/mk/toolchain/clang/rte.vars.mk index 52ca9fca31..3c49dc568d 100644 --- a/mk/toolchain/clang/rte.vars.mk +++ b/mk/toolchain/clang/rte.vars.mk @@ -39,7 +39,7 @@ WERROR_FLAGS := -W -Wall -Wstrict-prototypes -Wmissing-prototypes WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith WERROR_FLAGS += -Wnested-externs -Wcast-qual WERROR_FLAGS += -Wformat-nonliteral -Wformat-security -WERROR_FLAGS += -Wundef -Wwrite-strings +WERROR_FLAGS += -Wundef -Wwrite-strings -Wdeprecated ifeq ($(RTE_DEVEL_BUILD),y) WERROR_FLAGS += -Werror diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index 7763ba79b6..7e4531bab3 100644 --- a/mk/toolchain/gcc/rte.vars.mk +++ b/mk/toolchain/gcc/rte.vars.mk @@ -47,7 +47,7 @@ WERROR_FLAGS := -W -Wall -Wstrict-prototypes -Wmissing-prototypes WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual WERROR_FLAGS += -Wformat-nonliteral -Wformat-security -WERROR_FLAGS += -Wundef -Wwrite-strings +WERROR_FLAGS += -Wundef -Wwrite-strings -Wdeprecated ifeq ($(RTE_DEVEL_BUILD),y) WERROR_FLAGS += -Werror diff --git a/mk/toolchain/icc/rte.vars.mk b/mk/toolchain/icc/rte.vars.mk index ff338d661d..aa1422bf1f 100644 --- a/mk/toolchain/icc/rte.vars.mk +++ b/mk/toolchain/icc/rte.vars.mk @@ -45,7 +45,7 @@ TOOLCHAIN_ASFLAGS = WERROR_FLAGS := -Wall -w2 -diag-disable 271 -diag-warning 1478 WERROR_FLAGS += -diag-disable 13368 -diag-disable 15527 WERROR_FLAGS += -diag-disable 188 -WERROR_FLAGS += -diag-disable 11074 -diag-disable 11076 +WERROR_FLAGS += -diag-disable 11074 -diag-disable 11076 -Wdeprecated ifeq ($(RTE_DEVEL_BUILD),y) WERROR_FLAGS += -Werror-all diff --git a/test/test/Makefile b/test/test/Makefile index 89eecadc37..cb3884a69e 100644 --- a/test/test/Makefile +++ b/test/test/Makefile @@ -189,6 +189,8 @@ endif SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) += test_kvargs.c +CFLAGS += -DALLOW_EXPERIMENTAL_API + CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS)