Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Isn't gcc's default march=native so it would emit popcount if the host supports it?


No, the default produces binaries that are compatible with as many machines as possible.


You're right [0], but I couldn't find which march value [1] corresponds to the settings used for "x86_64-linux-gnu".

EDIT: running "echo | gcc -v -E - 2>&1 | grep cc1" shows the command line, which says "-mtune=generic -march=x86-64". I do not know what "-march=x86-64" implies, except SSE2.

0 - https://gcc.gnu.org/ml/gcc-help/2012-12/msg00074.html

1 - https://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.h...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: