From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id EE5732C52 for ; Sat, 27 Oct 2018 01:38:33 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Oct 2018 16:38:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,429,1534834800"; d="scan'208";a="269141725" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.212]) by orsmga005.jf.intel.com with ESMTP; 26 Oct 2018 16:38:31 -0700 From: Ferruh Yigit To: Thomas Monjalon Cc: dev@dpdk.org, Ferruh Yigit Date: Sat, 27 Oct 2018 01:38:15 +0100 Message-Id: <20181027003815.943-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181026184248.78908-1-ferruh.yigit@intel.com> References: <20181026184248.78908-1-ferruh.yigit@intel.com> Subject: [dpdk-dev] [PATCH v2] buildtools: fix build for some mktemp X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Oct 2018 23:38:34 -0000 build error: == Build drivers/net/tap mktemp: cannot create temp file /tmp/dpdk.auto-config-h.sh.XXX.c: Invalid argument .../buildtools/auto-config-h.sh: line 86: : No such file or directory .../drivers/net/tap/Makefile:55: recipe for target 'tap_autoconf.h.new' failed Above error observed on Wind River Linux 8.0 `mktemp` command in that system has a restrictions to have X in the template at the end and at least six of them. Complied to mktemp requirements and add -xc flag to compiler to say `temp` file is a C file Fixes: ff37ca5d3773 ("devtools: use a common prefix for temporary files") Reported-by: Shuai Zhu Signed-off-by: Ferruh Yigit --- v2: * keep using mktemp, add -xc to compiler --- buildtools/auto-config-h.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildtools/auto-config-h.sh b/buildtools/auto-config-h.sh index 6130429eb..5b613c35f 100755 --- a/buildtools/auto-config-h.sh +++ b/buildtools/auto-config-h.sh @@ -23,7 +23,7 @@ name=${5:?define/type/function name required} : ${CC:=cc} -temp=$(mktemp -t dpdk.${0##*/}.XXX.c) +temp=$(mktemp -t dpdk.${0##*/}.c.XXXXXX) case $type in define) @@ -86,7 +86,7 @@ printf "\ " "$include" "$code" > "${temp}" && if ${CC} ${CPPFLAGS} ${EXTRA_CPPFLAGS} ${CFLAGS} ${EXTRA_CFLAGS} \ ${AUTO_CONFIG_CFLAGS} \ - -c -o ${temp}.o "${temp}" 1>&${out} 2>&${err} + -xc -c -o ${temp}.o "${temp}" 1>&${out} 2>&${err} then rm -f "${temp}" "${temp}.o" printf "\ -- 2.17.2