Skip to content

Commit

Permalink
Makefile: don't override MAKEFLAGS in submake
Browse files Browse the repository at this point in the history
Apparently make doesn't like it:
make[2]: warning: -jN forced in submake: disabling jobserver mode.

We only did it because of scan-build - it detects a ton
of issues (or false positives) in our dependencies. To
disable it, we don't have to override MAKEFLAGS, but
just CC - that's what we'll do now.

Fixes spdk#896

Change-Id: I5eea984d6bbfbf4caabdd704850fac840fed3524
Signed-off-by: Darek Stojaczyk <[email protected]>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/927
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Shuhei Matsumoto <[email protected]>
Reviewed-by: Tomasz Zawadzki <[email protected]>
  • Loading branch information
darsto authored and tomzawadzki committed Feb 21, 2020
1 parent 8ba2c01 commit 712a3f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion dpdkbuild/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,15 @@ endif
# Allow users to specify EXTRA_DPDK_CFLAGS if they want to build DPDK using unsupported compiler versions
DPDK_CFLAGS += $(EXTRA_DPDK_CFLAGS)

# Force-disable scan-build
SUB_CC = $(patsubst %ccc-analyzer,$(DEFAULT_CC),$(CC))

$(SPDK_ROOT_DIR)/dpdk/build: $(SPDK_ROOT_DIR)/mk/cc.mk $(SPDK_ROOT_DIR)/include/spdk/config.h
$(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk config T=$(DPDK_CONFIG) $(DPDK_OPTS)

all: $(SPDK_ROOT_DIR)/dpdk/build
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk/build EXTRA_CFLAGS="$(DPDK_CFLAGS)" EXTRA_LDFLAGS="$(DPDK_LDFLAGS)" MAKEFLAGS="T=$(DPDK_CONFIG) -j$(NPROC)" $(DPDK_OPTS)
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/dpdk/build EXTRA_CFLAGS="$(DPDK_CFLAGS)" EXTRA_LDFLAGS="$(DPDK_LDFLAGS)" CC=$(SUB_CC) T="$(DPDK_CONFIG)" $(DPDK_OPTS)

clean:
$(Q)rm -rf $(SPDK_ROOT_DIR)/dpdk/build
Expand Down
5 changes: 4 additions & 1 deletion ipsecbuild/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ ifneq ($(Q),)
REDIRECT=> /dev/null
endif

# Force-disable scan-build
SUB_CC = $(patsubst %ccc-analyzer,$(DEFAULT_CC),$(CC))

all:
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/intel-ipsec-mb -j$(NPROC) all SHARED=n EXTRA_CFLAGS=-fPIC CC=cc $(REDIRECT)
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/intel-ipsec-mb all SHARED=n EXTRA_CFLAGS=-fPIC CC=$(SUB_CC) $(REDIRECT)

install: all

Expand Down
5 changes: 4 additions & 1 deletion isalbuild/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@ ifneq ($(Q),)
REDIRECT=> /dev/null
endif

# Force-disable scan-build
SUB_CC = $(patsubst %ccc-analyzer,$(DEFAULT_CC),$(CC))

$(ISAL_DIR)/isa-l:
@ln -s $(ISAL_DIR)/include $(ISAL_DIR)/isa-l

all: $(ISAL_DIR)/isa-l
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/isa-l -j$(NPROC) all CC=cc $(REDIRECT)
$(Q)$(MAKE) -C $(SPDK_ROOT_DIR)/isa-l all CC="$(SUB_CC)" $(REDIRECT)

install: all

Expand Down

0 comments on commit 712a3f6

Please sign in to comment.