buildtools: allow pedantic empty pmdinfo
[dpdk.git] / buildtools / gen-pmdinfo-cfile.sh
index 0b6dc2c..43059cf 100755 (executable)
@@ -6,7 +6,8 @@ arfile=$1
 output=$2
 pmdinfogen=$3
 
-echo > $output
+# The generated file must not be empty if compiled in pedantic mode
+echo 'static __attribute__((unused)) const char *generator = "'$0'";' > $output
 for ofile in `ar t $arfile` ; do
        ar p $arfile $ofile | $pmdinfogen - - >> $output 2> /dev/null
 done