Aug 10, 2008

Setting CFLAGS #2

It turns out that with GCC 4.2.1 and later there is a new 'native' architecture flag for '-march' and '-mtune' that simplifies the setting of 'CFLAGS' greatly. Now instead of having to manually determine the exact architecture you can let GCC do it for you. If you trust it. Example:

CFLAGS="-march=native"
CXXFLAGS="${CFLAGS}"
export CFLAGS CXXFLAGS

previous post: 'Setting CFLAGS'

No comments: