Repository: opencv
Issue: 32 bit builds tries to use `_mm256_extract_epi64` which is unavailable in gcc x86_32.
Labels: bug,optimization,priority: low,category: core,category: build/install

##### System information (version)
- OpenCV => 4.5.3
- Operating System / Platform => Linux 64 bit, 5.11 kernel
- Compiler => Through Docker ubuntu:14.04 base image , gcc 5.5 from ubuntu-toolchain-r/test

##### Detailed description

I'm building OpenCV through a docker image with Conan. The target is a 32-bit Silvermont CPU. During the configuration process the output is

```
-- General configuration for OpenCV 4.5.3 =====================================
--   Version control:               1.3.0-release1-25848-g9e6f8f87c0-dirty
-- 
--   Platform:
--     Timestamp:                   2022-01-04T19:13:25Z
--     Host:                        Linux 5.11.0-41-generic x86_64
--     CMake:                       3.21.4
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               Debug
-- 
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3
--       requested:                 SSE3
--     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       SSE4_1 (14 files):         + SSSE3 SSE4_1
--       SSE4_2 (1 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (3 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (27 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
-- 
--   C/C++:
--     Built as dynamic libs?:      NO
--     C++ standard:                11
--     C++ Compiler:                /usr/bin/g++  (ver 5.5.0)
--     C++ flags (Release):         -m32   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -O3 -DNDEBUG   -DNDEBUG
--     C++ flags (Debug):           -m32   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -g   -O0 -DDEBUG -D_DEBUG
```

##### Steps to reproduce

During compilation through the docker image 

```
In file included from ../../../../source_subfolder/modules/core/include/opencv2/core/hal/intrin.hpp:253:0,
                 from /mnt/build/.conan/data/opencv/4.5.3/_/_/build/c6bddeaccfda30f4a7c93e25c4fb5ee91fe85994/source_subfolder/modules/core/src/precomp.hpp:89,
                 from sum.avx2.cpp:2:
../../../../source_subfolder/modules/core/include/opencv2/core/hal/intrin_avx.hpp: In function 'int64 cv::hal_AVX2::_v256_extract_epi64(const __m256i&)':
../../../../source_subfolder/modules/core/include/opencv2/core/hal/intrin_avx.hpp:130:37: error: there are no arguments to '_mm256_extract_epi64' that depend on a template parameter, so a declaration of '_mm256_extract_epi64' must be available [-fpermissive]
     return _mm256_extract_epi64(a, i);
                                     ^
../../../../source_subfolder/modules/core/include/opencv2/core/hal/intrin_avx.hpp:130:37: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make[2]: *** [source_subfolder/modules/core/CMakeFiles/opencv_core.dir/sum.avx2.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from ../../../../source_subfolder/modules/core/include/opencv2/core/hal/intrin.hpp:253:0,
                 from ../../../../source_subfolder/modules/core/src/precomp.hpp:89,
                 from stat.avx2.cpp:2:
../../../../source_subfolder/modules/core/include/opencv2/core/hal/intrin_avx.hpp: In function 'int64 cv::hal_AVX2::_v256_extract_epi64(const __m256i&)':
../../../../source_subfolder/modules/core/include/opencv2/core/hal/intrin_avx.hpp:130:37: error: there are no arguments to '_mm256_extract_epi64' that depend on a template parameter, so a declaration of '_mm256_extract_epi64' must be available [-fpermissive]
     return _mm256_extract_epi64(a, I);
```

I would have thought that the epi64 version is not compiled in 32 bits. Through Conan, it's currently impossible to turn off any extensions yet. According to GCC header source file `_mm256_extract_epi64` is only included if the system is x86_64.

Probably shouldn't include `_mm256_extract_epi64` with `-m32` build

##### Issue submission checklist

 - [x] I report the issue, it's not a question
 - [x] I checked the problem with documentation, FAQ, open issues,
       forum.opencv.org, Stack Overflow, etc and have not found solution
 - [x] I updated to latest OpenCV version and the issue is still there
 - [x] There is reproducer code and related data files: videos, images, onnx, etc