[dpdk-dev] [PATCH v3 1/4] eal: disable function versioning on Windows

Fady Bader fady at mellanox.com
Sun Jul 5 09:00:07 CEST 2020



> -----Original Message-----
> From: Kinsella, Ray <mdr at ashroe.eu>
> Sent: Thursday, July 2, 2020 5:57 PM
> To: Fady Bader <fady at mellanox.com>; dev at dpdk.org
> Cc: Thomas Monjalon <thomas at monjalon.net>; Tasnim Bashar
> <tbashar at mellanox.com>; Tal Shnaiderman <talshn at mellanox.com>; Yohad Tor
> <yohadt at mellanox.com>; dmitry.kozliuk at gmail.com;
> harini.ramakrishnan at microsoft.com; ocardona at microsoft.com;
> pallavi.kadam at intel.com; ranjit.menon at intel.com; olivier.matz at 6wind.com;
> arybchenko at solarflare.com; nhorman at tuxdriver.com
> Subject: Re: [PATCH v3 1/4] eal: disable function versioning on Windows
> 
> Fady,
> 
> Any comments on the below?
> 
> Ray K
> 
> On 30/06/2020 11:49, Kinsella, Ray wrote:
> >
> >
> > On 22/06/2020 12:55, Fady Bader wrote:
> >> Function versioning is not needed on Windows, also the function
> >> versioning implementation is not supported by Windows.
> >> Function versioning was disabled on Windows.
> >>
> >> Signed-off-by: Fady Bader <fady at mellanox.com>
> >> ---
> >>  lib/librte_eal/include/rte_function_versioning.h | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/lib/librte_eal/include/rte_function_versioning.h
> >> b/lib/librte_eal/include/rte_function_versioning.h
> >> index f588f2643b..cee06602e9 100644
> >> --- a/lib/librte_eal/include/rte_function_versioning.h
> >> +++ b/lib/librte_eal/include/rte_function_versioning.h
> >> @@ -11,6 +11,10 @@
> >>  #error Use of function versioning disabled, is "use_function_versioning=true"
> in meson.build?
> > Do we need a meson error/rule that catches if people explicitly try to enable
> function_versioning.
> > We don't want to just silently fail under such circumstances?
> >
> > Would something in lib/meson.build would work better?
> >
> > if use_function_versioning and target_machine.system == "Windows"
> > 	// complain loudly ...
> > endif
> >

I think this would be a better approach. 
But instead of checking if the use of function versioning is enabled under Windows
and then complain, I think we should simply disable it from Windows in the 
meson.build file. Something like this:

if target_machine.system == "Windows"
	use_function_versioning = false
endif

> >>  #endif
> >>
> >> +#ifdef RTE_EXEC_ENV_WINDOWS
> >> +#undef RTE_BUILD_SHARED_LIB
> >> +#endif
> >> +
> >>  #ifdef RTE_BUILD_SHARED_LIB
> >>
> >>  /*
> >>


More information about the dev mailing list