From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id E3C2C3978 for ; Mon, 25 Jul 2016 14:56:12 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 25 Jul 2016 05:56:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,419,1464678000"; d="scan'208";a="1028639603" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 25 Jul 2016 05:56:12 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u6PCuAeI026487; Mon, 25 Jul 2016 13:56:10 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u6PCuA8q027823; Mon, 25 Jul 2016 13:56:10 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u6PCuAYG027819; Mon, 25 Jul 2016 13:56:10 +0100 X-Authentication-Warning: sivswdev02.ir.intel.com: fyigit set sender to ferruh.yigit@intel.com using -f From: Ferruh Yigit To: dev@dpdk.org Cc: Thomas Monjalon Date: Mon, 25 Jul 2016 13:55:49 +0100 Message-Id: <1469451349-27653-2-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1469451349-27653-1-git-send-email-ferruh.yigit@intel.com> References: <1469451349-27653-1-git-send-email-ferruh.yigit@intel.com> Subject: [dpdk-dev] [PATCH 2/2] mk: fix FreeBSD clang compile error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jul 2016 12:56:13 -0000 clang version < 3.5 doesn't support -z linker option, and some FreeBSD box still has clang versions < 3.5 as default version. compile error: clang: error: unknown argument: '-z' Fixes: fd591c4c4e35 ("mk: check shared library dependencies") Signed-off-by: Ferruh Yigit --- mk/rte.lib.mk | 6 +++++- mk/toolchain/clang/rte.toolchain-compat.mk | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index 0187ae8..830f81a 100644 --- a/mk/rte.lib.mk +++ b/mk/rte.lib.mk @@ -93,8 +93,12 @@ O_TO_A_DO = @set -e; \ $(O_TO_A) && \ echo $(O_TO_A_CMD) > $(call exe2cmd,$(@)) +ifneq ($(CC_SUPPORTS_Z),false) +NO_UNDEFINED := -z defs +endif + O_TO_S = $(LD) -L$(RTE_SDK_BIN)/lib $(_CPU_LDFLAGS) $(EXTRA_LDFLAGS) \ - -shared $(OBJS-y) -z defs $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB) + -shared $(OBJS-y) $(NO_UNDEFINED) $(LDLIBS) -Wl,-soname,$(LIB) -o $(LIB) O_TO_S_STR = $(subst ','\'',$(O_TO_S)) #'# fix syntax highlight O_TO_S_DISP = $(if $(V),"$(O_TO_S_STR)"," LD $(@)") O_TO_S_DO = @set -e; \ diff --git a/mk/toolchain/clang/rte.toolchain-compat.mk b/mk/toolchain/clang/rte.toolchain-compat.mk index 03e5a97..b734413 100644 --- a/mk/toolchain/clang/rte.toolchain-compat.mk +++ b/mk/toolchain/clang/rte.toolchain-compat.mk @@ -43,3 +43,7 @@ CLANG_VERSION := $(shell $(CC) -v 2>&1 | grep version | sed "s/.*version \([0-9] CLANG_MAJOR_VERSION := $(shell echo $(CLANG_VERSION) | cut -f1 -d.) CLANG_MINOR_VERSION := $(shell echo $(CLANG_VERSION) | cut -f2 -d.) + +ifeq ($(shell test $(CLANG_MAJOR_VERSION)$(CLANG_MINOR_VERSION) -lt 35 && echo 1), 1) + CC_SUPPORTS_Z := false +endif -- 2.7.4