Commit 6e9cf0c7 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

test: add ENV_CFLAGS after includes



DPDK CFLAGS get put into CFLAGS in mk/cc.flags.mk,
which for system package installed DPDK will include
extra paths like /usr/include/<arch-3-tuple>/dpdk.
If a Makefile adds its own CFLAGS before including
the .mk fragment that pulls in these CFLAGS, we won't
actually get those cc.flags.mk applied since they
are defined with ?=.

This may need to be revisited - using ?= for these
has evolved through several iterations of our SPDK
configured flag files - starting with commit
08ec96eb.  But for now, let's just fix these few
Makefiles.

Fixes issue #2548.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I9863db1b37b31907b4088f58cc13b81ed1bb8632
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12982


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 6c2ce122
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5,7 +5,8 @@

SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..)

CFLAGS += $(ENV_CFLAGS)
APP = env_dpdk_post_init

include $(SPDK_ROOT_DIR)/mk/nvme.libtest.mk

CFLAGS += $(ENV_CFLAGS)
+3 −2
Original line number Diff line number Diff line
@@ -5,8 +5,9 @@

SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..)

CFLAGS += $(ENV_CFLAGS)
CFLAGS += -I$(SPDK_ROOT_DIR)/test/lib
TEST_FILE = memory_ut.c

include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk

CFLAGS += $(ENV_CFLAGS)
CFLAGS += -I$(SPDK_ROOT_DIR)/test/lib
+2 −1
Original line number Diff line number Diff line
@@ -6,7 +6,8 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..)

UNIT_TEST_LINK_ENV = 1
CFLAGS += $(ENV_CFLAGS)
TEST_FILE = pci_ut.c

include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk

CFLAGS += $(ENV_CFLAGS)
+2 −1
Original line number Diff line number Diff line
@@ -6,7 +6,8 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
include $(SPDK_ROOT_DIR)/mk/config.mk

CFLAGS += $(ENV_CFLAGS)
TEST_FILE = vhost_ut.c

include $(SPDK_ROOT_DIR)/mk/spdk.unittest.mk

CFLAGS += $(ENV_CFLAGS)