path: root/buildtools
diff options
authorFerruh Yigit <>2017-11-02 00:25:10 +0000
committerThomas Monjalon <>2017-11-06 21:43:04 +0100
commita462a6a9e7705e0a8e855ed42377041ff0efc908 (patch)
treee3ae4d18e109c490c2e09b02504880612ec2e920 /buildtools
parent0e3ef055bee51b6cf4bf8d8d0a1377a5941a0741 (diff)
buildtools: fix icc build
There are random build errors in test reports [1]. Build error is not directly related to DPDK but observed during DPDK build. When I get similar unexpected build errors in my system, found out that /dev/null is invalid. It seems ICC overwrites the /dev/null with "icc -o /dev/null" instead of sending output to /dev/null. This is not always reproducible, so hard to say what exactly is triggering the error. I suspect test-report build errors can be because of the same reason, and it is good to add a protection for this case. Instead of sending output to /dev/null save it to the tmp folder and remove it back when done. [1] Failure #3 /usr/src/linux-headers-4.4.0-97-generic/include/linux/sysfs.h:517:37: error: pointer targets in passing argument 2 of ‘kernfs_find_and_get’ differ in signedness [-Werror=pointer-sign] return kernfs_find_and_get(parent, name); Signed-off-by: Ferruh Yigit <>
Diffstat (limited to 'buildtools')
1 files changed, 3 insertions, 3 deletions
diff --git a/buildtools/ b/buildtools/
index 4356d7e..cb8bce9 100755
--- a/buildtools/
+++ b/buildtools/
@@ -114,9 +114,9 @@ printf "\
" "$include" "$code" > "${temp}" &&
- -c -o /dev/null "${temp}" 1>&${out} 2>&${err}
+ -c -o ${temp}.o "${temp}" 1>&${out} 2>&${err}
- rm -f "${temp}"
+ rm -f "${temp}" "${temp}.o"
printf "\
#ifndef %s
#define %s 1
@@ -125,7 +125,7 @@ then
" "${macro}" "${macro}" "${macro}" >> "${file}" &&
printf 'Defining %s.\n' "${macro}"
- rm -f "${temp}"
+ rm -f "${temp}" "${temp}.o"
printf "\
/* %s is not defined. */