@@ -34,8 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_acl.a
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_acl_version.map
@@ -34,7 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_bitratestats.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_bitratestats_version.map
@@ -34,7 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_cmdline.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_cmdline_version.map
@@ -34,8 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_distributor.a
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_distributor_version.map
@@ -41,7 +41,13 @@ LIBABIVER := 5
VPATH += $(RTE_SDK)/lib/librte_eal/common
-CFLAGS += -I$(SRCDIR)/include
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR)/include $(CFLAGS)
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
CFLAGS += $(WERROR_FLAGS) -O3
@@ -34,8 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_efd.a
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_efd_version.map
@@ -34,8 +34,15 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_gro.a
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+CFLAGS += $(WERROR_FLAGS)
EXPORT_MAP := rte_gro_version.map
@@ -34,8 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_hash.a
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_hash_version.map
@@ -34,8 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_ip_frag.a
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_ipfrag_version.map
@@ -34,8 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_jobstats.a
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_jobstats_version.map
@@ -34,7 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_kni.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3 -fno-strict-aliasing
EXPORT_MAP := rte_kni_version.map
@@ -36,7 +36,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_kvargs.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_kvargs_version.map
@@ -33,7 +33,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_latencystats.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
LDLIBS += -lm
LDLIBS += -lpthread
@@ -34,8 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_lpm.a
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_lpm_version.map
@@ -34,7 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_mbuf.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_mbuf_version.map
@@ -34,7 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_mempool.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_mempool_version.map
@@ -34,7 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_metrics.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_metrics_version.map
@@ -33,7 +33,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
LIB = librte_net.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_net_version.map
LIBABIVER := 1
@@ -34,8 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_pdump.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
-CFLAGS += -D_GNU_SOURCE
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3 -D_GNU_SOURCE
LDLIBS += -lpthread
EXPORT_MAP := rte_pdump_version.map
@@ -34,7 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_power.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3 -fno-strict-aliasing
EXPORT_MAP := rte_power_version.map
@@ -34,8 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_reorder.a
-CFLAGS += -O3
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR)
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_reorder_version.map
@@ -34,7 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_ring.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during paralle
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_ring_version.map
@@ -34,7 +34,14 @@ include $(RTE_SDK)/mk/rte.vars.mk
# library name
LIB = librte_timer.a
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during parallel
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3
EXPORT_MAP := rte_timer_version.map
@@ -38,7 +38,14 @@ EXPORT_MAP := rte_vhost_version.map
LIBABIVER := 4
-CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -D_FILE_OFFSET_BITS=64
+# Include the source dir first, so that headers paths are always picked
+# from there. By including it last race conditions might happen during parallel
+# builds, and headers might be already installed in RTE_OUT/include when the
+# variable is recursively expanded, thus causing GCC to sometimes use the
+# SRCDIR path and sometimes the RTE_OUT/include, making the builds not
+# reproducible.
+CFLAGS := -I$(SRCDIR) $(CFLAGS)
+CFLAGS += $(WERROR_FLAGS) -O3 -D_FILE_OFFSET_BITS=64
CFLAGS += -I vhost_user
LDLIBS += -lpthread