summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorAnand Rawat <anand.rawat@intel.com>2019-04-01 20:54:49 -0700
committerThomas Monjalon <thomas@monjalon.net>2019-04-03 01:06:01 +0200
commit98edcbb5ab2f06eabb691c67613e65a8405c55b1 (patch)
treee05f460653984bcdc1d5699e1ce0f675937ab04d /config
parent3c45889189924067e0c0e3f54dab36f1b938ab12 (diff)
downloaddpdk-draft-windows-98edcbb5ab2f06eabb691c67613e65a8405c55b1.zip
dpdk-draft-windows-98edcbb5ab2f06eabb691c67613e65a8405c55b1.tar.gz
dpdk-draft-windows-98edcbb5ab2f06eabb691c67613e65a8405c55b1.tar.xz
eal/windows: introduce Windows support
Added initial stub source files and required meson changes for Windows support. kernel/windows/meson is a stub file added to support Windows specific source in future releases. Signed-off-by: Pallavi Kadam <pallavi.kadam@intel.com> Signed-off-by: Anand Rawat <anand.rawat@intel.com> Reviewed-by: Jeff Shaw <jeffrey.b.shaw@intel.com> Reviewed-by: Ranjit Menon <ranjit.menon@intel.com> Acked-by: Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>
Diffstat (limited to 'config')
-rw-r--r--config/meson.build23
-rw-r--r--config/x86/meson.build14
2 files changed, 24 insertions, 13 deletions
diff --git a/config/meson.build b/config/meson.build
index 30a7261..483139b 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
+# Copyright(c) 2017-2019 Intel Corporation
# set the major version, which might be used by drivers and libraries
# depending on the configuration options
@@ -80,18 +80,27 @@ dpdk_extra_ldflags += '-Wl,--no-as-needed'
add_project_link_arguments('-pthread', language: 'c')
dpdk_extra_ldflags += '-pthread'
-# some libs depend on maths lib
-add_project_link_arguments('-lm', language: 'c')
-dpdk_extra_ldflags += '-lm'
+# on some OS, maths functions are in a separate library
+if cc.find_library('libm', required : false).found()
+ # some libs depend on maths lib
+ add_project_link_arguments('-lm', language: 'c')
+ dpdk_extra_ldflags += '-lm'
+endif
# for linux link against dl, for bsd execinfo
if host_machine.system() == 'linux'
link_lib = 'dl'
-else
+elif host_machine.system() == 'freebsd'
link_lib = 'execinfo'
+else
+ link_lib = ''
+endif
+
+# if link_lib is empty, do not add it to project properties
+if link_lib != ''
+ add_project_link_arguments('-l' + link_lib, language: 'c')
+ dpdk_extra_ldflags += '-l' + link_lib
endif
-add_project_link_arguments('-l' + link_lib, language: 'c')
-dpdk_extra_ldflags += '-l' + link_lib
# check for libraries used in multiple places in DPDK
has_libnuma = 0
diff --git a/config/x86/meson.build b/config/x86/meson.build
index 7504cb9..558edfd 100644
--- a/config/x86/meson.build
+++ b/config/x86/meson.build
@@ -1,15 +1,17 @@
# SPDX-License-Identifier: BSD-3-Clause
-# Copyright(c) 2017 Intel Corporation
+# Copyright(c) 2017-2019 Intel Corporation
# for checking defines we need to use the correct compiler flags
march_opt = ['-march=@0@'.format(machine)]
# get binutils version for the workaround of Bug 97
-ldver = run_command('ld', '-v').stdout().strip()
-if ldver.contains('2.30')
- if cc.has_argument('-mno-avx512f')
- march_opt += '-mno-avx512f'
- message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97')
+if host_machine.system() != 'windows'
+ ldver = run_command('ld', '-v').stdout().strip()
+ if ldver.contains('2.30')
+ if cc.has_argument('-mno-avx512f')
+ march_opt += '-mno-avx512f'
+ message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97')
+ endif
endif
endif