Created
April 14, 2020 15:50
-
-
Save toddlipcon/573a9e5563d22ed56e38cac5aba26b30 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
todd@va1022:/tmp$ cat test.cc | |
int main() { | |
return __builtin_cpu_supports("bmi") ? 0 : 1; | |
} | |
todd@va1022:/tmp$ g++ ./test.cc -O2 ; ./a.out && echo "supports bmi" || echo "no bmi" | |
no bmi | |
todd@va1022:/tmp$ g++ ./test.cc -O2 /opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libgcc.a ; ./a.out && echo "supports bmi" || echo "no bmi" | |
supports bmi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment