summaryrefslogtreecommitdiff
path: root/drivers/meson.build
AgeCommit message (Collapse)Author
2019-03-26build: move variable for drivers to top levelAndrius Sirvys
If for debugging we disable the driver directory in the meson.build file, we get an error because the variable "driver_classes" does not exist. This is because driver_classes is only defined in the drivers/meson.build file. Defining driver_classes in dpdk/meson.build file will make it easier for compiling separate directories. In the process, we rename driver_classes to dpdk_driver_classes for consistency with the other variables. Signed-off-by: Andrius Sirvys <andrius.sirvys@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-27build: improve dependency handlingLuca Boccassi
Whenever possible (if the library ships a pkg-config file) use meson's dependency() function to look for it, as it will automatically add it to the Requires.private list if needed, to allow for static builds to succeed for reverse dependencies of DPDK. Otherwise the recursive dependencies are not parsed, and users doing static builds have to resolve them manually by themselves. When using this API avoid additional checks that are superfluous and take extra time, and avoid adding the linker flag manually which causes it to be duplicated. Signed-off-by: Luca Boccassi <bluca@debian.org> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Tested-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-27build: bump minimum Meson version to 0.47.1Luca Boccassi
Meson 0.47.1 fixed a bug that is difficult to work around, which causes the linker flag of dependencies to be repeated dozens of times, which causes issues especially when using the built-in dependency() API. Bump the minimum version and remove obsolete version checks. Signed-off-by: Luca Boccassi <bluca@debian.org> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-10-27build: change default driver installation directoryLuca Boccassi
As part of the effort of consolidating the DPDK installation bits and pieces across distros, set the default directory of lib/ where PMDs get installed to dpdk/pmds-XX.YY. It's necessary to have a versioned subdirectory as multiple ABI revisions might be installed at the same time, so having a fixed name will cause trouble with the autoload feature. Small refactor with parsing and saving the major version to a variable, since it's now used in 3 different places. Signed-off-by: Luca Boccassi <bluca@debian.org> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Timothy Redaelli <tredaelli@redhat.com>
2018-10-22mk: build with _GNU_SOURCE defined by defaultAnatoly Burakov
We use _GNU_SOURCE all over the place, but often times we miss defining it, resulting in broken builds on musl. Rather than fixing every library's and driver's and application's makefile, fix it by simply defining _GNU_SOURCE by default for all builds. Remove all usages of _GNU_SOURCE in source files and makefiles, and also fixup a couple of instances of using __USE_GNU instead of _GNU_SOURCE. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-09-18baseband/null: add in meson buildLuca Boccassi
Signed-off-by: Luca Boccassi <bluca@debian.org>
2018-09-18build: fix compatibility with meson 0.41 onwardsBruce Richardson
Versions of meson prior to 0.47 flattened the parameters to the "set_variable" function, which meant that the function could not take array variables as a parameter. Therefore, we need to disable driver tracking for those older versions, in order to maintain compatibility with the minimum supported 0.41 version, and also v0.45 shipped in Ubuntu 18.04 release. Fixes: 806c45dd483d ("build: add configuration summary at end of config") Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Tested-by: Timothy Redaelli <tredaelli@redhat.com>
2018-09-17build: add configuration summary at end of configBruce Richardson
After running meson to configure a DPDK build, it can be useful to know what was automatically enabled or disabled. Therefore, print out by way of summary a categorised list of libraries and drivers to be built. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-07-26build: remove duplicate checks for cflagsBruce Richardson
There is no need to check for each library, driver and example whether certain cflags are supported. Instead of checking inside the loop, do so outside and reuse the value. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-07-26build: improve error message for missing dependencyBruce Richardson
When building a driver or library and a required internal dependency is missing, the error message printed was: Tried to get unknown variable "shared_rte_<libname>". However, a better way to handle this is to catch the missing variable earlier and convert it into a proper message, informing the user that the required dependency is missing, and most importantly, what library or driver wanted that dependency. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-07-11build: fix for host clang and cross gccGavin Hu
The following error hits if host cc compiler is clang(default one in most linux distributions) and the cross compiler is gcc. The root cause is: the hybride compilers add the warning options to the meson project as project arguments, which apply for both host compiling and cross compiling. But some options such as '-Wno-format-truncation' are not supported nor recognized by clang, so they have to be removed from the project arguments for the host compiler to run smoothily and added back as cflags for the cross compiler to compile for cross source files. The fix is remove unrecognized warning options from the meson project arguments shared by gcc and clang, as add them specifically for gcc or clang as cflags. [265/893] Compiling C object 'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o'. warning: unknown warning option '-Wno-format-truncation' [-Wunknown-warning-option] Fixes: a55277a788 ("devtools: add test script for meson builds") Cc: stable@dpdk.org Signed-off-by: Gavin Hu <gavin.hu@arm.com> Reviewed-by: Phil Yang <phil.yang@arm.com> Reviewed-by: Song Zhu <song.zhu@arm.com> Reviewed-by: Steve Capper <steve.capper@arm.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-05-10compress/isal: add skeleton ISA-L compression PMDLee Daly
Adding basic skeleton of the ISA-L compression driver. No compression functionality, but lays the foundation for operations in the rest of the patchset. The ISA-L compression driver utilizes Intel's ISA-L compression library and compressdev API. Signed-off-by: Lee Daly <lee.daly@intel.com> Reviewed-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
2018-05-08drivers/raw: support meson buildNipun Gupta
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
2018-04-04drivers: add common folderPavan Nikhilesh
Add driver/common folder and skeleton makefile for adding commonly used functions across mempool, event and net devices. Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
2018-01-30drivers: improve pmdinfo generation with mesonBruce Richardson
Since meson 0.44, changing any file inside a PMD directory (quite correctly) triggers a full re-run of meson on build, rather than an incremental build as with earlier versions. This rerun is needed because we use "grep" in meson to search for files on which to run pmdinfogen, and changing any of those files means that grep and, therefore meson, needs to be rerun. [Previous versions of meson did not track this dependency on the grep command, and so did incremental builds only.] If, however, we take advantage of pmdinfogen's ability to use stdin and stdout instead of files, we can instead use a shell script to process an entire static archive and generate a single .c file from it. This eliminates the need for grep, and means that changes to a PMD file only need an incremental build - a significant time saving. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-30build: detect micro-arch on ARMPavan Nikhilesh
Added support for detecting march and mcpu by reading midr_el1 register. The implementer, primary part number values read can be used to figure out the underlying arm cpu. Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2018-01-30event/octeontx: build with mesonPavan Nikhilesh
Add Cavium octeontx to meson build and change order of drivers built from event->mempool->net to mempool->net->event to resolve dependency. Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-30build: remove architecture flag as default C flagBruce Richardson
Any flags added to the project args are automatically added to all builds, both native and cross-compiled. This is not what we want for the -march flag as a valid -march for the cross-compile is not valid for pmdinfogen which is a native-build tool. Instead we store the march flag as a variable, and add it to the default cflags for all libs, drivers, examples, etc. This will allow pmdinfogen to compile successfully in a cross-compilation environment. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2018-01-30build: replace license text with SPDX tagBruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-30build: build as both static and shared libsBruce Richardson
This patch changes the build process to group all .o files for a driver or library into a static archive first, and then link the .o files together into a shared library. This eliminates the need for separate static or shared object builds when packaging, for instance. The "default_library" configuration option now only affects the apps and examples, which are either linked against the static or shared library versions depending on the value of the option. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Luca Boccassi <bluca@debian.org>
2018-01-30drivers/event: build skeleton and SW drivers with mesonBruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-30build: add option to version libs using DPDK versionBruce Richardson
Normally, each library has it's own version number based on the ABI. Add an option to have all libs just use the DPDK version number as the .so version. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Keith Wiles <keith.wiles@intel.com> Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-30drivers/net: add meson build infrastructureBruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Keith Wiles <keith.wiles@intel.com> Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-30crypto/null: build with mesonBruce Richardson
Add in a crypto driver class, and implement compiling the null crypto instance. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Keith Wiles <keith.wiles@intel.com> Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-30drivers/mempool: build SW drivers with mesonBruce Richardson
With build infrastructure in place, add in mempool drivers to the build. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Keith Wiles <keith.wiles@intel.com> Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-30bus/pci: build with mesonBruce Richardson
Many drivers across the various device types rely on PCI infrastructure, so the bus drivers should be the first driver class built. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2018-01-30drivers: add infrastructure for meson buildBruce Richardson
Add in the top-level drivers meson.build file to start adding in building of PMDs. Since all PMDs are built in pretty much the same way, the logic for building each PMD, including extracting the pmdinfo, is included in the top level build file. This means that each individual driver class only needs to specify its default dependencies and a few naming conventions, and each driver only needs to specify it's source files, headers, etc. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Keith Wiles <keith.wiles@intel.com> Acked-by: Luca Boccassi <luca.boccassi@gmail.com>