admin 管理员组

文章数量: 887021

linux gcc march arch,gcc

我不能在不指定'-march = native'的情况下编译简单的c程序,我需要将其运行为:'gcc -march = native -o hello hello.c'。

我做了:

export CFLAGS='-march=native'

export CXXFLAGS='-march=native'

但没有帮助。

user@server:~$ gcc -march=native -Q --help=target

...

-march=corei7-avx

...

gcc -v的输出:

user@server:~$ gcc -v

Using built-in specs.

gcc: error: missing argument to ‘-march=’

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable

本文标签: linux gcc march arch gcc