Re: [dpdk-dev] [PATCH v2 2/3] meson: use threads dependency as provided by meson

2021-03-23 Thread Gabriel Ganne
Hi Nick, Dmitry, Thanks for the reviews. I wrote this patch following the link issue I had with libpcap thinking it was "more of the same" ... which clearly it wasn't. I had a closer look to what dependency('threads') generates and I agree that it's not that well documented. From what I understa

Re: [dpdk-dev] [PATCH v2 2/3] meson: use threads dependency as provided by meson

2021-03-23 Thread Nick Connolly
Agreed. In my tests it's "-pthread", not "-lpthread", but still. Agreed - I must have been distracted by the array of -l: arguments :-) It's more like, in lib/librte_telemetry/meson.build: if not is_windows ext_deps += threads_dep endif It's not a big deal, b

Re: [dpdk-dev] [PATCH v2 2/3] meson: use threads dependency as provided by meson

2021-03-23 Thread Dmitry Kozlyuk
2021-03-23 13:35 (UTC+), Nick Connolly: [...] > 2. Adding -lpthread to libdpdk.pc is more problematic. The application > is almost > certain to be using a threads library. If this is a 3rd party > library, then the link > command will potentially include two libraries defining

Re: [dpdk-dev] [PATCH v2 2/3] meson: use threads dependency as provided by meson

2021-03-23 Thread Nick Connolly
Threads is a dummy dependency for Clang. For MinGW without pthread it still adds -pthread switch (and it comes to libdpdk.pc), but executable doesn't require pthread library to run. I can imagine DPDK built by MinGW without pthread be linked via pkg-config to an app built by MinGW with pthread,

Re: [dpdk-dev] [PATCH v2 2/3] meson: use threads dependency as provided by meson

2021-03-22 Thread Dmitry Kozlyuk
2021-03-22 16:04 (UTC+), Nick Connolly: > > meson guarantees this is portable, so this also allows us to remove a > > is_windows switch. > Hi Gabriel, > > On Windows, there are at least three different compilation options: > > * MinGW-w64 with posix threads > * MinGW-w64 with win32 thre

Re: [dpdk-dev] [PATCH v2 2/3] meson: use threads dependency as provided by meson

2021-03-22 Thread Nick Connolly
meson guarantees this is portable, so this also allows us to remove a is_windows switch. Hi Gabriel, On Windows, there are at least three different compilation options: * MinGW-w64 with posix threads * MinGW-w64 with win32 threads (different download) * Clang without threads support The

[dpdk-dev] [PATCH v2 2/3] meson: use threads dependency as provided by meson

2021-03-22 Thread Gabriel Ganne
meson guarantees this is portable, so this also allows us to remove a is_windows switch. Link: https://mesonbuild.com/howtox.html#enable-threads Signed-off-by: Gabriel Ganne --- config/meson.build | 5 + lib/librte_metrics/meson.build | 2 ++ lib/librte_telemetry/meson.build