> On 20/01/2016 10:05, Liang Li wrote: > > Detect if the compiler can support the ifun and avx2, if so, set > > CONFIG_AVX2_OPT which will be used to turn on the avx2 instruction > > optimization. > > > > Signed-off-by: Liang Li <liang.z...@intel.com> > > --- > > configure | 20 ++++++++++++++++++++ > > 1 file changed, 20 insertions(+) > > > > diff --git a/configure b/configure > > index 44ac9ab..b7f4661 100755 > > --- a/configure > > +++ b/configure > > @@ -310,6 +310,7 @@ smartcard="" > > libusb="" > > usb_redir="" > > opengl="" > > +avx2_opt="" > > zlib="yes" > > lzo="" > > snappy="" > > @@ -1827,6 +1828,20 @@ EOF > > fi > > > > ########################################## > > +# avx2 optimization requirement check > > + > > +cat > $TMPC << EOF > > +static void bar(void) {} > > Might be nicer to use "void *" and return an actual function name: > > static void bar(void) {} > static void *bar_ifunc(void) { return (void *)bar; } void foo(void) > __attribute__((ifunc("bar_ifunc"))); > > And also you probably should use "readelf --syms ... | grep IFUNC.*foo" > to check that the attribute was not ignored. > > Paolo >
Got it, will change in the next version. Liang