28188cee2a
When a component uses either XOPEN_SOURCE or POSIX_C_SOURCE macro explicitly in its build recipe, it restricts visibility of a non POSIX features subset, such as IANA protocol numbers (IPPROTO_* macros). Non standard features are enabled by default for DPDK both for Linux thanks to _GNU_SOURCE and for FreeBSD thanks to __BSD_VISIBLE. However using XOPEN_SOURCE or POSIX_(C_)SOURCE in a component causes __BSD_VISIBLE to be defined to 0 for FreeBSD, causing different feature sets visibility for Linux and FreeBSD. It restricts from using IPPROTO macros in public headers, such as rte_ip.h, despite the fact they are already widely used in sources. Add __BSD_VISIBLE macro specified unconditionally for FreeBSD targets which enforces feature sets visibility unification between Linux and FreeBSD. Add single -D_GNU_SOURCE to config/meson.build as a project argument instead of adding separate directive for each project subtree. This patch solves the problem of build breaks for [1] on FreeBSD [2] following the discussion [3]. [1] https://mails.dpdk.org/archives/dev/2019-May/131885.html [2] http://mails.dpdk.org/archives/test-report/2019-May/082263.html [3] https://mails.dpdk.org/archives/dev/2019-May/132110.html Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> |
||
---|---|---|
.. | ||
arm | ||
ppc_64 | ||
x86 | ||
common_armv8a_linux | ||
common_base | ||
common_freebsd | ||
common_linux | ||
defconfig_arm64-armada-linux-gcc | ||
defconfig_arm64-armada-linuxapp-gcc | ||
defconfig_arm64-armv8a-linux-clang | ||
defconfig_arm64-armv8a-linux-gcc | ||
defconfig_arm64-armv8a-linuxapp-clang | ||
defconfig_arm64-armv8a-linuxapp-gcc | ||
defconfig_arm64-bluefield-linux-gcc | ||
defconfig_arm64-bluefield-linuxapp-gcc | ||
defconfig_arm64-dpaa2-linux-gcc | ||
defconfig_arm64-dpaa2-linuxapp-gcc | ||
defconfig_arm64-dpaa-linux-gcc | ||
defconfig_arm64-dpaa-linuxapp-gcc | ||
defconfig_arm64-octeontx2-linux-gcc | ||
defconfig_arm64-octeontx2-linuxapp-gcc | ||
defconfig_arm64-stingray-linux-gcc | ||
defconfig_arm64-stingray-linuxapp-gcc | ||
defconfig_arm64-thunderx2-linux-gcc | ||
defconfig_arm64-thunderx2-linuxapp-gcc | ||
defconfig_arm64-thunderx-linux-gcc | ||
defconfig_arm64-thunderx-linuxapp-gcc | ||
defconfig_arm64-xgene1-linux-gcc | ||
defconfig_arm64-xgene1-linuxapp-gcc | ||
defconfig_arm-armv7a-linux-gcc | ||
defconfig_arm-armv7a-linuxapp-gcc | ||
defconfig_i686-native-linux-gcc | ||
defconfig_i686-native-linux-icc | ||
defconfig_i686-native-linuxapp-gcc | ||
defconfig_i686-native-linuxapp-icc | ||
defconfig_ppc_64-power8-linux-gcc | ||
defconfig_ppc_64-power8-linuxapp-gcc | ||
defconfig_x86_64-native-bsdapp-clang | ||
defconfig_x86_64-native-bsdapp-gcc | ||
defconfig_x86_64-native-freebsd-clang | ||
defconfig_x86_64-native-freebsd-gcc | ||
defconfig_x86_64-native-linux-clang | ||
defconfig_x86_64-native-linux-gcc | ||
defconfig_x86_64-native-linux-icc | ||
defconfig_x86_64-native-linuxapp-clang | ||
defconfig_x86_64-native-linuxapp-gcc | ||
defconfig_x86_64-native-linuxapp-icc | ||
defconfig_x86_x32-native-linux-gcc | ||
defconfig_x86_x32-native-linuxapp-gcc | ||
meson.build | ||
rte_config.h |