> -----Original Message----- > From: Van Haaren, Harry > Sent: Thursday, June 18, 2020 1:05 PM > To: 'Bruce Richardson' <bruce.richard...@intel.com>; dev@dpdk.org > Cc: Yigit, Ferruh <ferruh.yi...@intel.com>; tho...@monjalon.net; Richardson, > Bruce <bruce.richard...@intel.com> > Subject: RE: [dpdk-dev] [PATCH v2] build: check functionality rather than > binutils > version > > > -----Original Message----- > > From: dev <dev-boun...@dpdk.org> On Behalf Of Bruce Richardson > > Sent: Thursday, June 18, 2020 12:57 PM > > To: dev@dpdk.org > > Cc: Yigit, Ferruh <ferruh.yi...@intel.com>; tho...@monjalon.net; Richardson, > > Bruce <bruce.richard...@intel.com> > > Subject: [dpdk-dev] [PATCH v2] build: check functionality rather than > > binutils > > version > > > > Rather than checking the binutils version number, which can lead to > > unnecessary disabling of AVX512 if fixes have been backported to distro > > versions, we can instead check the output of "as" from binutils to see if > > it is correct. > > > > The check in the script uses the minimal assembly reproduction code posted > > to the public bug tracker for gcc/binutils for those issues [1]. If the > > binutils bug is present, the instruction parameters - specifically the > > displacement parameter - will be different in the disassembled output > > compared to the input. Therefore the check involves assembling a single > > instruction and disassembling it again, checking that the two match. > > > > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028 > > > > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com> > > Tested on binutils 2.30 without backported fixes, can confirm that __AVX512F__ > define is > not present at meson configure time.
Re-tested with Ubuntu LTS version 18.04 with the proposed binutils backport fix: https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/1883880 With this fix, AVX512 gets enabled as it should after running the check: Fetching value of define "__AVX512F__": 1 As before, still, and now even more so: Tested-by: Harry van Haaren <harry.van.haa...@intel.com>