bitsCN.com
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti -fomit-frame-pointer -ffixed-ebp"
export CFLAGS CXX CXXFLAGS
./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-unix-socket-path=/tmp/mysql3306.sock --with-charset=utf8 --with-collation=utf8_general_ci --with-extra-charsets=all --with-plugins=max
1、当你用-static链接时,可以得到最快的可执行文件
2、在Linux上,最好用pgcc和-O3编译服务器
作者“linux运维”