https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84926
Дилян Палаузов <dilyan.palauzov at aegee dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #4 from Дилян Палаузов <dilyan.palauzov at aegee dot org> --- Why does COLLECT_GCC_OPTIONS show '-march=x86-64', but https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html does not show x86-64 as valid option for -march? Why doesn't 'make CFLAGS="--verbose -march=native -flto"' work, in terms of detecting that ssse3 is available and there is no conflict? The latter prints: make[3]: Leaving directory '/git/postgresql/src/backend' gcc --verbose -march=native -flto -I../../src/port -DFRONTEND -I../../src/include -D_GNU_SOURCE -I/usr/local/include/libxml2 -c -o pg_crc32c_sse42.o pg_crc32c_sse42.c Using built-in specs. COLLECT_GCC=gcc Target: x86_64-pc-linux-gnu Configured with: ./configure --enable-threads=posix --enable-nls --enable-interpreter --with-system-zlib --enable-libgcj-multifile --enable-languages=all --enable-targets=all --with-system-unwind --without-x --with-linker-hash-style=gnu --disable-multilib --enable-shared --with-build-config='bootstrap-lto bootstrap-O3' Thread model: posix gcc version 7.3.1 20180316 (GCC) COLLECT_GCC_OPTIONS='-v' '-march=native' '-flto' '-I' '../../src/port' '-D' 'FRONTEND' '-I' '../../src/include' '-D' '_GNU_SOURCE' '-I' '/usr/local/include/libxml2' '-c' '-o' 'pg_crc32c_sse42.o' /usr/local/libexec/gcc/x86_64-pc-linux-gnu/7.3.1/cc1 -quiet -v -I ../../src/port -I ../../src/include -I /usr/local/include/libxml2 -imultiarch x86_64-linux-gnu -D FRONTEND -D _GNU_SOURCE pg_crc32c_sse42.c -march=nocona -mmmx -mno-3dnow -msse -msse2 -msse3 -mno-ssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-sgx -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=nocona -quiet -dumpbase pg_crc32c_sse42.c -auxbase-strip pg_crc32c_sse42.o -version -flto -o /tmp/cch1CzQr.s GNU C11 (GCC) version 7.3.1 20180316 (x86_64-pc-linux-gnu) compiled by GNU C version 7.3.1 20180316, GMP version 6.1.2, MPFR version 4.0.0, MPC version 1.1.0, isl version isl-0.18-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu" ignoring nonexistent directory "/usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/../../../../x86_64-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: ../../src/port ../../src/include /usr/local/include/libxml2 /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include /usr/local/include /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include-fixed /usr/include/x86_64-linux-gnu /usr/include End of search list. GNU C11 (GCC) version 7.3.1 20180316 (x86_64-pc-linux-gnu) compiled by GNU C version 7.3.1 20180316, GMP version 6.1.2, MPFR version 4.0.0, MPC version 1.1.0, isl version isl-0.18-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: e97c32a4d3c4d8b00665455dd270ad26 In file included from /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/nmmintrin.h:31:0, from pg_crc32c_sse42.c:19: pg_crc32c_sse42.c: In function ‘pg_comp_crc32c_sse42’: /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/smmintrin.h:846:1: error: inlining failed in call to always_inline ‘_mm_crc32_u64’: target specific option mismatch _mm_crc32_u64 (unsigned long long __C, unsigned long long __V) ^~~~~~~~~~~~~ pg_crc32c_sse42.c:37:18: note: called from here crc = (uint32) _mm_crc32_u64(crc, *((const uint64 *) p)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/nmmintrin.h:31:0, from pg_crc32c_sse42.c:19: /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/smmintrin.h:839:1: error: inlining failed in call to always_inline ‘_mm_crc32_u32’: target specific option mismatch _mm_crc32_u32 (unsigned int __C, unsigned int __V) ^~~~~~~~~~~~~ pg_crc32c_sse42.c:44:7: note: called from here crc = _mm_crc32_u32(crc, *((const unsigned int *) p)); ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/nmmintrin.h:31:0, from pg_crc32c_sse42.c:19: /usr/local/lib/gcc/x86_64-pc-linux-gnu/7.3.1/include/smmintrin.h:827:1: error: inlining failed in call to always_inline ‘_mm_crc32_u8’: target specific option mismatch _mm_crc32_u8 (unsigned int __C, unsigned char __V) ^~~~~~~~~~~~ pg_crc32c_sse42.c:63:7: note: called from here crc = _mm_crc32_u8(crc, *p); ~~~~^~~~~~~~~~~~~~~~~~~~~~~ make[2]: *** [<builtin>: pg_crc32c_sse42.o] Error 1 make[2]: Leaving directory '/git/postgresql/src/port' make[1]: *** [Makefile:38: all-port-recurse] Error 2 make[1]: Leaving directory '/git/postgresql/src' make: *** [GNUmakefile:11: all-src-recurse] Error 2