From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id F3AAD374F for ; Mon, 21 Mar 2016 21:29:19 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id l68so136978695wml.1 for ; Mon, 21 Mar 2016 13:29:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=6yFvmh665h4N/sSgES1ko8kU+0aTj3ntAZoFD5jwEpI=; b=Ud/mncteVnoKSuImzwyu1FBmrOBkxn6UnHujObsX/Vo6cN/rvzITCZBVU3IykLRfgG EgwMGmGj1gF7qY1zsDim2DGW7Ymsm8sugNxDo/bf5syID8iOiqikUyp4xnMOM0Yw7wfA r5HWSAnumtBU7UcRqI6LRTfHik0+LC7cbHAGadgCcXlMy6WmO6wUxurlbHHY6SqJTndx eIOKHxrqEBccgmxdYvHy/grVpG7t/klEG/wcLm+tD5YgX0QtUEqo4ufjM3G7BQvz6xcE /fhEbXQnXzppNAu1GoOGeEJ5YNzrVaZO9II8D8+5r7WXcNP6vs7X040GBOe3lbEsEGaN ZDyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=6yFvmh665h4N/sSgES1ko8kU+0aTj3ntAZoFD5jwEpI=; b=Hto982aG2ZKpKnWF35zQSFvA8UQK4ZfP0CaqK+qOKgqZ7F3gA6Jv7FTNnmW9X7n3gP FB4TnCVV03upx3qv44YCCUOispe4dJnBPCscW2f/w+U2m87q7YB62BLkrqQ8GAccmiNd a/mujwrxe6q7ZwXtC7gcLsRGo93ej2+TLVhoGOJ/d9nAy+xoEH+XM7L2DUuaPcBOiyA7 fP6MLpqclGdTsqf61foEo+aViHPZacxheGW6bXblNyrdhofluB7gufWKvKJKKoV3UuMU pynWFGgG8L/ubvDAGQUzfaqDIko2DXWG5ZxZPJ11MGfzoe0Snm9orO9lGLuyVxZXIY30 oPzA== X-Gm-Message-State: AD7BkJKPY/ZzJQnczRd6xzepY50gk6+bkQPfsg7hOcBwN6Zh0rWRdT5wCa6H69N9Hlvrvb4Q X-Received: by 10.194.61.169 with SMTP id q9mr32134147wjr.77.1458592159755; Mon, 21 Mar 2016 13:29:19 -0700 (PDT) Received: from XPS13.localdomain (91.111.75.86.rev.sfr.net. [86.75.111.91]) by smtp.gmail.com with ESMTPSA id o16sm26973470wjr.9.2016.03.21.13.29.18 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 21 Mar 2016 13:29:18 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Mon, 21 Mar 2016 21:27:33 +0100 Message-Id: <1458592053-12744-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] mk: restrict CPU flags list 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, 21 Mar 2016 20:29:20 -0000 When compiling each file, the CPU flags are given as RTE_MACHINE_CPUFLAG_* and in the list RTE_COMPILE_TIME_CPUFLAGS. RTE_MACHINE_CPUFLAG_* are used to check the CPU features when compiling. The list RTE_COMPILE_TIME_CPUFLAGS is used only to check the CPU at runtime in the function rte_cpu_check_supported(). So it is not needed to define this list for every files. That's why RTE_COMPILE_TIME_CPUFLAGS is removed from the common variable MACHINE_CFLAGS and is added only to the CFLAGS of eal_common_cpuflags.c. Signed-off-by: Thomas Monjalon --- lib/librte_eal/bsdapp/eal/Makefile | 2 ++ lib/librte_eal/linuxapp/eal/Makefile | 2 ++ mk/rte.cpuflags.mk | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile index 349b0d0..9054ad6 100644 --- a/lib/librte_eal/bsdapp/eal/Makefile +++ b/lib/librte_eal/bsdapp/eal/Makefile @@ -92,6 +92,8 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_keepalive.c # from arch dir SRCS-$(CONFIG_RTE_EXEC_ENV_BSDAPP) += rte_cpuflags.c +CFLAGS_eal_common_cpuflags.o := $(CPUFLAGS_LIST) + CFLAGS_eal.o := -D_GNU_SOURCE #CFLAGS_eal_thread.o := -D_GNU_SOURCE CFLAGS_eal_log.o := -D_GNU_SOURCE diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile index 25b3a8e..53d5b69 100644 --- a/lib/librte_eal/linuxapp/eal/Makefile +++ b/lib/librte_eal/linuxapp/eal/Makefile @@ -102,6 +102,8 @@ SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += rte_keepalive.c # from arch dir SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += rte_cpuflags.c +CFLAGS_eal_common_cpuflags.o := $(CPUFLAGS_LIST) + CFLAGS_eal.o := -D_GNU_SOURCE CFLAGS_eal_interrupts.o := -D_GNU_SOURCE CFLAGS_eal_pci_vfio_mp_sync.o := -D_GNU_SOURCE diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk index 19a3e7e..c494654 100644 --- a/mk/rte.cpuflags.mk +++ b/mk/rte.cpuflags.mk @@ -128,4 +128,4 @@ empty:= space:= $(empty) $(empty) CPUFLAGSTMP1 := $(addprefix RTE_CPUFLAG_,$(CPUFLAGS)) CPUFLAGSTMP2 := $(subst $(space),$(comma),$(CPUFLAGSTMP1)) -MACHINE_CFLAGS += -DRTE_COMPILE_TIME_CPUFLAGS=$(CPUFLAGSTMP2) +CPUFLAGS_LIST := -DRTE_COMPILE_TIME_CPUFLAGS=$(CPUFLAGSTMP2) -- 2.7.0