buildtools: fix build with coverage
authorDavid Marchand <david.marchand@redhat.com>
Mon, 25 Nov 2019 08:10:07 +0000 (09:10 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 26 Nov 2019 08:04:36 +0000 (09:04 +0100)
commit24252a60ad4d306b59aa3e1e3e5132f945f33387
treea7096166c618da5ad586bb0bca6f85bb26624b1e
parent72e75e1f1bd72f22e5a31d9d0a95b46ddf247c54
buildtools: fix build with coverage

A compiler can reuse a variable name and prefix it when instrumenting
with coverage.

Example:
$ make defconfig T=x86_64-native-linux-gcc O=master
$ make EXTRA_CFLAGS='--coverage' O=master
[...]
    CC rte_flow.o
 rte_flow_dynf_metadata_offs is not flagged as experimental but is listed
 in version map
 Please add __rte_experimental to the definition of
 rte_flow_dynf_metadata_offs

$ objdump -t master/build/lib/librte_ethdev/rte_flow.o |grep _offs$
0000000000000000 l     F .text.startup 000000000000000a
  _GLOBAL__sub_I_65535_0_rte_flow_dynf_metadata_offs
0000000000000620 g     O .data 0000000000000004
  rte_flow_dynf_metadata_offs

Protect against this by adding a space character in the pattern.

Fixes: a4bcd61de82d ("buildtools: add script to check experimental API exports")
Cc: stable@dpdk.org
Reported-by: Andrew Rybchenko <arybchenko@solarflare.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
buildtools/check-experimental-syms.sh