[dpdk-stable] patch 'mk: fix make defconfig on FreeBSD' has been queued to stable release 18.02.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Apr 30 16:41:37 CEST 2018


Hi,

FYI, your patch has been queued to stable release 18.02.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/02/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 242933f016b3f3fd7603775368fa64860e11fd59 Mon Sep 17 00:00:00 2001
From: David Hunt <david.hunt at intel.com>
Date: Mon, 23 Apr 2018 14:09:02 +0100
Subject: [PATCH] mk: fix make defconfig on FreeBSD

[ upstream commit 6ace79505d326d05aaa3c57facca7ca8e1675b11 ]

On FreeBSD, make defconfig generates the config as
"defconfig_x86_64-bsdapp-", which does not resolve to any known
config file.

On FreeBSD, we get amd64 out of "uname -m", which was not handled by
the list of checks, but which now resolves to x86_64-native.

Then we run '$CC --version', and use grep -o with the list of known
compilers, and set to either gcc, icc or clang. Grep's '-o' option
returns the matched word rather than the whole line, making the
result easier to use.

The remaining code in the patch then takes ${compiler}, the "uname -m"
output and assembles them all together into a valid freebsd config name,
i.e. "defconfig_x86_64-native-bsdapp-clang".

Fixes: bce6c42c4ad5 ("mk: add sensible default target with defconfig")

Signed-off-by: David Hunt <david.hunt at intel.com>
Tested-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 mk/rte.sdkconfig.mk | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index 0664725ee..d90d62cc6 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -36,7 +36,6 @@ notemplate:
 	@echo "use T=template from the following list:"
 	@$(MAKE) -rR showconfigs | sed 's,^,  ,'
 
-
 .PHONY: defconfig
 defconfig:
 	@$(MAKE) config T=$(shell \
@@ -47,15 +46,25 @@ defconfig:
                         print "arm-armv7a"} \
                 else if ($$0 == "ppc64") { \
                         print "ppc_64-power8"} \
+                else if ($$0 == "amd64") { \
+                        print "x86_64-native"} \
                 else { \
-                        printf "%s-native", $$0} }')-$(shell \
+                        printf "%s-native", $$0} }' \
+		)-$(shell \
                 uname | awk '{ \
                 if ($$0 == "Linux") { \
                         print "linuxapp"} \
                 else { \
-                        print "bsdapp"} }')-$(shell \
-                ${CC} -v 2>&1 | \
-                grep " version " | cut -d ' ' -f 1)
+                        print "bsdapp"} }' \
+		)-$(shell \
+		${CC} --version | grep -o 'cc\|gcc\|icc\|clang' | awk \
+		'{ \
+		if ($$1 == "cc") { \
+			print "gcc" } \
+		else { \
+			print $$1 } \
+		}' \
+		)
 
 .PHONY: config
 ifeq ($(RTE_CONFIG_TEMPLATE),)
-- 
2.14.2



More information about the stable mailing list