numam-dpdk/config
Marcin Smoczynski 28188cee2a build: enable BSD features visibility for FreeBSD
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>
2019-06-26 16:50:33 +02:00
..
arm config: add Marvell ARMADA based on armv8-a 2019-06-04 10:30:14 +02:00
ppc_64 build: set RTE_ARCH_64 based on pointer size 2019-02-26 18:34:28 +01:00
x86 eal/x86: check rdrand and rdseed 2019-06-04 00:23:04 +02:00
common_armv8a_linux mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
common_base mempool/octeontx2: add build infra and device probe 2019-06-25 23:35:57 +02:00
common_freebsd mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
common_linux net/memif: introduce memory interface PMD 2019-06-13 23:54:29 +09:00
defconfig_arm64-armada-linux-gcc config: add Marvell ARMADA based on armv8-a 2019-06-04 10:30:14 +02:00
defconfig_arm64-armada-linuxapp-gcc config: add Marvell ARMADA based on armv8-a 2019-06-04 10:30:14 +02:00
defconfig_arm64-armv8a-linux-clang mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-armv8a-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-armv8a-linuxapp-clang mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-armv8a-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-bluefield-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-bluefield-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-dpaa2-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-dpaa2-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-dpaa-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-dpaa-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-octeontx2-linux-gcc config: add octeontx2 machine 2019-04-15 22:58:20 +02:00
defconfig_arm64-octeontx2-linuxapp-gcc common/octeontx2: add build infrastructure and HW definition 2019-06-25 23:35:57 +02:00
defconfig_arm64-stingray-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-stingray-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-thunderx2-linux-gcc config: add thunderx2 machine 2019-04-15 22:57:29 +02:00
defconfig_arm64-thunderx2-linuxapp-gcc config: add thunderx2 machine 2019-04-15 22:57:29 +02:00
defconfig_arm64-thunderx-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-thunderx-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-xgene1-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm64-xgene1-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm-armv7a-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_arm-armv7a-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_i686-native-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_i686-native-linux-icc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_i686-native-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_i686-native-linuxapp-icc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_ppc_64-power8-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_ppc_64-power8-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_64-native-bsdapp-clang mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_64-native-bsdapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_64-native-freebsd-clang mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_64-native-freebsd-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_64-native-linux-clang mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_64-native-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_64-native-linux-icc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_64-native-linuxapp-clang mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_64-native-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_64-native-linuxapp-icc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_x32-native-linux-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
defconfig_x86_x32-native-linuxapp-gcc mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
meson.build build: enable BSD features visibility for FreeBSD 2019-06-26 16:50:33 +02:00
rte_config.h config: increase maximum number of raw devices to 64 2019-04-05 00:26:02 +02:00