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運維”