Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly does -march=native do?

Tags:

Gentoo Wiki told me the following:

Warning: GCC 4.2 and above support -march=native. -march=native applies additional settings beyond -march, specific to your CPU. Unless you have a specific reason not to (e.g. distcc cross-compiling), you should probably be using -march=native, rather than anything listed below.

What are those additional settings?

like image 572
György Andrasek Avatar asked Jun 10 '10 14:06

György Andrasek


People also ask

What does -= do in Python?

-= Subtraction AssignmentSubtracts a value from the variable and assigns the result to that variable.

What does += in Python do?

Python += Operator: A Guide. The Python += operator lets you add two values together and assign the resultant value to a variable. This operator is often referred to as the addition assignment operator.

What does += mean in coding?

The addition assignment operator ( += ) adds the value of the right operand to a variable and assigns the result to the variable.

What does += mean in Python 3?

+= Addition Assignment Adds a value and the variable and assigns the result to that variable.


1 Answers

Nevermind.

$ cc -march=core2 -E -v - </dev/null 2>&1 | grep cc1  /[...]/cc1 -E -quiet -v -iprefix /[...]/4.3.2/ - -march=core2  $ cc -march=native -E -v - </dev/null 2>&1 | grep cc1  /[...]/cc1 -E -quiet -v -iprefix /[...]/4.3.2/ - -march=core2 -mcx16 -msahf --param l1-cache-size=32 --param l1-cache-line-size=64 -mtune=core2 

I'm starting to like this option a lot. -mcx16 and -msahf are two additional CPU instructions gcc can now use, which weren't available in earlier Core2's.

like image 79
György Andrasek Avatar answered Sep 28 '22 07:09

György Andrasek