numam-dpdk/mk
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
..
arch build: enable large file support on 32-bit 2019-06-03 23:53:40 +02:00
exec-env eal: add OS specific header file 2019-04-03 01:11:56 +02:00
internal mk: use EXTRA_CFLAGS for pmdinfogen 2018-10-25 00:02:00 +02:00
machine config: disable armv8 crypto extension 2019-06-04 01:24:25 +02:00
target/generic build: enable BSD features visibility for FreeBSD 2019-06-26 16:50:33 +02:00
toolchain mk: disable warning for packed member pointer 2019-05-02 23:04:38 +02:00
rte.app.mk mempool/octeontx2: add build infra and device probe 2019-06-25 23:35:57 +02:00
rte.bsdmodule.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.combinedlib.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.cpuflags.mk eal/x86: check rdrand and rdseed 2019-06-04 00:23:04 +02:00
rte.extapp.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.extlib.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.extobj.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.extshared.mk use SPDX tag for 6WIND copyrighted files 2018-05-25 10:47:06 +02:00
rte.extsubdir.mk use SPDX tag for 6WIND copyrighted files 2018-05-25 10:47:06 +02:00
rte.gnuconfigure.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.helper.mk mk: introduce helper to check compiler argument 2019-04-15 22:55:56 +02:00
rte.hostapp.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.hostlib.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.install.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.lib.mk mk: fix build of shared library with libbsd 2019-02-24 23:23:57 +01:00
rte.module.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.obj.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.sdkbuild.mk test: move to app directory 2019-02-26 15:29:27 +01:00
rte.sdkconfig.mk build: use version number from config file 2019-03-27 09:43:47 +01:00
rte.sdkdepdirs.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.sdkdoc.mk mk: use templated doxygen config 2018-09-18 15:49:48 +02:00
rte.sdkexamples.mk use SPDX tag for 6WIND copyrighted files 2018-05-25 10:47:06 +02:00
rte.sdkgcov.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.sdkinstall.mk mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
rte.sdkroot.mk mk: use linux and freebsd in config names 2019-03-12 23:05:06 +01:00
rte.sdktest.mk test: move to app directory 2019-02-26 15:29:27 +01:00
rte.shared.mk use SPDX tag for 6WIND copyrighted files 2018-05-25 10:47:06 +02:00
rte.subdir.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
rte.vars.mk mk: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00