DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] mk: fix make defconfig on FreeBSD
@ 2018-04-10 15:08 David Hunt
  2018-04-10 15:28 ` Thomas Monjalon
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: David Hunt @ 2018-04-10 15:08 UTC (permalink / raw)
  To: dev; +Cc: thomas, David Hunt

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

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 mk/rte.sdkconfig.mk | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index 0664725ee..7b1684375 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -36,6 +36,7 @@ notemplate:
 	@echo "use T=template from the following list:"
 	@$(MAKE) -rR showconfigs | sed 's,^,  ,'
 
+compiler:=$(filter clang gcc icc cc,$(shell ${CC} --version))
 
 .PHONY: defconfig
 defconfig:
@@ -47,15 +48,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 \
+		echo | awk -v compiler=${compiler} \
+		'{ \
+		if (compiler == "cc") \
+			{ print "gcc" } \
+		else \
+			{ print compiler } \
+		}' \
+		)
 
 .PHONY: config
 ifeq ($(RTE_CONFIG_TEMPLATE),)
-- 
2.14.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-04-23 20:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-10 15:08 [dpdk-dev] [PATCH v1] mk: fix make defconfig on FreeBSD David Hunt
2018-04-10 15:28 ` Thomas Monjalon
2018-04-10 15:52   ` Hunt, David
2018-04-10 15:30 ` Burakov, Anatoly
2018-04-10 15:44 ` [dpdk-dev] [PATCH v2] " David Hunt
2018-04-10 15:55   ` Burakov, Anatoly
2018-04-22 23:36   ` Thomas Monjalon
2018-04-23 13:09 ` [dpdk-dev] [PATCH v3] " David Hunt
2018-04-23 20:56   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).