1. 程式人生 > >使用sysbench對Oracle做基準測試(-) 安裝篇

使用sysbench對Oracle做基準測試(-) 安裝篇

sysbench是一款開源的多執行緒效能測試工具,
可以執行CPU/記憶體/執行緒/IO/資料庫等方面的效能測試。
資料庫目前支援MySQL/Oracle/PostgreSQL。


由於sysbench 已經託管到launchpad。 souuceforge已經不可用。

獲取sysbench 需要安裝bzr,為了安裝bzr 需要安裝一個espl源

rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

之後安裝bzr
yum install bzr

獲取sysbench 檔案
[[email protected] ~]# bzr branch lp:sysbench
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data.  See "bzr help launchpad-login".
Branched 123 revision(s).                                                                                                                       
[
[email protected]
~]# ll total 180292 -rw-------. 1 root root 1181 Sep 26 18:55 anaconda-ks.cfg drwxr-xr-x. 2 root root 4096 Sep 26 18:58 Desktop drwxr-xr-x. 2 root root 4096 Sep 26 18:57 Documents drwxr-xr-x. 2 root root 4096 Sep 26 18:57 Downloads -rw-r--r--. 1 root root 35467 Sep 26 18:55 install.log -rw-r--r--. 1 root root 10054 Sep 26 18:53 install.log.syslog drwxr-xr-x. 2 root root 4096 Sep 26 18:57 Music -rw-r--r--. 1 root root 184513020 Sep 11 19:35 mysql-5.5.38-linux2.6-x86_64.tar.gz drwxr-xr-x. 2 root root 4096 Sep 26 18:57 Pictures drwxr-xr-x. 2 root root 4096 Sep 26 18:57 Public drwxr-xr-x. 4 root root 4096 Sep 26 19:30 rpmbuild drwxr-xr-x. 7 root root 4096 Oct 13 12:27 sysbench drwxr-xr-x. 2 root root 4096 Sep 26 18:57 Templates drwxr-xr-x. 2 root root 4096 Sep 26 18:57 Videos drwxr-xr-x. 3 root root 4096 Sep 26 20:17 zabbix [
[email protected]
~]#
配置環境變數 有一些關於編譯器的東西
[[email protected] sysbench]# export CC=cc
[[email protected] sysbench]# export CXX=c++
#指定編譯選項通過man make 能查到-I 後面指定--include-dir
[[email protected] sysbench]# export CFLAGS="-m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public"   
[[email protected]
sysbench]# export CXXFLAGS="$CFLAGS"
#注意下面聲明瞭Oracle 類庫
[[email protected] sysbench]# export ORACLE_HOME=/u01/app/oracle/product/11.2.0/client_1
[[email protected] sysbench]# export LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/client_1/lib
呼叫autogen.sh生成configure
[[email protected] sysbench]# ./configure  --prefix=/usr/local/sysbench --with-oracle --libdir=/u01/app/oracle/product/11.2.0/client_1/lib --without-mysql
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of cc... gcc3
checking how to run the C preprocessor... cc -E
checking whether cc understands -c and -o together... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether __SUNPRO_C is declared... no
checking "C Compiler version"... "cc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)"
checking whether to compile with MySQL support... (cached) no
checking whether to compile with Drizzle support... (cached) yes
checking whether to compile with Oracle support... (cached) yes
checking whether to compile with PostgreSQL support... (cached) no
checking whether to compile with Lua support... (cached) yes
checking whether SHM_HUGETLB is declared... yes
checking whether O_SYNC is declared... yes
checking for xsltproc... xsltproc
checking whether xsltproc works... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for sqrt in -lm... yes
checking for ld used by GCC... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking for shared library run path origin... done
checking for libdrizzle... no
checking libaio.h usability... yes
checking libaio.h presence... yes
checking for libaio.h... yes
checking for io_queue_init in -laio... yes
checking if io_getevents() has an old interface... no
checking for malloc in -lumem... no
checking for malloc in -lmtmalloc... no
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/aio.h usability... no
checking sys/aio.h presence... no
checking for sys/aio.h... no
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking thread.h usability... no
checking thread.h presence... no
checking for thread.h... no
checking for unistd.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for inline... inline
checking for off_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking size of size_t... 8
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking whether clock_gettime is declared... yes
checking for library containing clock_gettime... -lrt
checking for alarm... yes
checking for directio... no
checking for fdatasync... yes
checking for gettimeofday... yes
checking for lrand48... yes
checking for drand48... yes
checking for memalign... yes
checking for memset... yes
checking for mkstemp... yes
checking for popen... yes
checking for posix_memalign... yes
checking for pthread_yield... yes
checking for _setjmp... yes
checking for setvbuf... yes
checking for sqrt... yes
checking for strdup... yes
checking for thr_setconcurrency... no
checking for valloc... yes
checking for pthread_once... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/xsl/Makefile
config.status: creating doc/xsl/catalog.xml
config.status: creating doc/Makefile
config.status: creating sysbench/Makefile
config.status: creating sysbench/drivers/Makefile
config.status: creating sysbench/drivers/mysql/Makefile
config.status: creating sysbench/drivers/drizzle/Makefile
config.status: creating sysbench/drivers/oracle/Makefile
config.status: creating sysbench/drivers/pgsql/Makefile
config.status: creating sysbench/tests/Makefile
config.status: creating sysbench/tests/cpu/Makefile
config.status: creating sysbench/tests/fileio/Makefile
config.status: creating sysbench/tests/memory/Makefile
config.status: creating sysbench/tests/threads/Makefile
config.status: creating sysbench/tests/mutex/Makefile
config.status: creating sysbench/tests/db/Makefile
config.status: creating sysbench/scripting/Makefile
config.status: creating sysbench/scripting/lua/Makefile
config.status: creating sysbench/scripting/lua/src/Makefile
config.status: creating config/config.h
config.status: executing depfiles commands
config.status: executing libtool commands

編譯 這裡要注意引用Oracle的一個庫

[[email protected] sysbench]#  make ORA_LIBS=/u01/app/oracle/product/11.2.0/client_1/lib/libclntsh.so

Making all in doc
make[1]: Entering directory `/root/sysbench/doc'
Making all in xsl
make[2]: Entering directory `/root/sysbench/doc/xsl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/sysbench/doc/xsl'
make[2]: Entering directory `/root/sysbench/doc'
touch manual.html
make[2]: Leaving directory `/root/sysbench/doc'
make[1]: Leaving directory `/root/sysbench/doc'
Making all in sysbench
make[1]: Entering directory `/root/sysbench/sysbench'
Making all in drivers
make[2]: Entering directory `/root/sysbench/sysbench/drivers'
Making all in oracle
make[3]: Entering directory `/root/sysbench/sysbench/drivers/oracle'
cc -DHAVE_CONFIG_H -I. -I../../../config  -Iyes/rdbms/demo -Iyes/rdbms/public -I../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT libsboracle_a-drv_oracle.o -MD -MP -MF .deps/libsboracle_a-drv_oracle.Tpo -c -o libsboracle_a-drv_oracle.o `test -f 'drv_oracle.c' || echo './'`drv_oracle.c
In file included from /u01/app/oracle/product/11.2.0/client_1/rdbms/public/oci.h:3024,
                 from drv_oracle.c:29:
/u01/app/oracle/product/11.2.0/client_1/rdbms/public/ociap.h:10788: warning: function declaration isn’t a prototype
/u01/app/oracle/product/11.2.0/client_1/rdbms/public/ociap.h:10794: warning: function declaration isn’t a prototype
drv_oracle.c: In function ‘ora_drv_init’:
drv_oracle.c:242: warning: pointer targets in assignment differ in signedness
drv_oracle.c: In function ‘ora_drv_connect’:
drv_oracle.c:309: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness
/usr/include/string.h:399: note: expected ‘const char *’ but argument is of type ‘unsigned char *’
drv_oracle.c: In function ‘ora_drv_prepare’:
drv_oracle.c:471: warning: pointer targets in passing argument 3 of ‘OCIStmtPrepare’ differ in signedness
/u01/app/oracle/product/11.2.0/client_1/rdbms/public/ociap.h:7156: note: expected ‘const OraText *’ but argument is of type ‘char *’
drv_oracle.c: In function ‘ora_drv_store_results’:
drv_oracle.c:851: warning: pointer targets in assignment differ in signedness
drv_oracle.c:854: warning: pointer targets in passing argument 1 of ‘__builtin_strncpy’ differ in signedness
drv_oracle.c:854: note: expected ‘char *’ but argument is of type ‘text *’
drv_oracle.c:854: warning: pointer targets in passing argument 2 of ‘__builtin_strncpy’ differ in signedness
drv_oracle.c:854: note: expected ‘const char *’ but argument is of type ‘text *’
drv_oracle.c: At top level:
drv_oracle.c:1076: warning: no previous prototype for ‘get_db_bind_type’
mv -f .deps/libsboracle_a-drv_oracle.Tpo .deps/libsboracle_a-drv_oracle.Po
rm -f libsboracle.a
ar cru libsboracle.a libsboracle_a-drv_oracle.o 
ranlib libsboracle.a
make[3]: Leaving directory `/root/sysbench/sysbench/drivers/oracle'
make[3]: Entering directory `/root/sysbench/sysbench/drivers'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/root/sysbench/sysbench/drivers'
make[2]: Leaving directory `/root/sysbench/sysbench/drivers'
Making all in tests
make[2]: Entering directory `/root/sysbench/sysbench/tests'
Making all in cpu
make[3]: Entering directory `/root/sysbench/sysbench/tests/cpu'
cc -DHAVE_CONFIG_H -I. -I../../../config  -I../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT libsbcpu_a-sb_cpu.o -MD -MP -MF .deps/libsbcpu_a-sb_cpu.Tpo -c -o libsbcpu_a-sb_cpu.o `test -f 'sb_cpu.c' || echo './'`sb_cpu.c
mv -f .deps/libsbcpu_a-sb_cpu.Tpo .deps/libsbcpu_a-sb_cpu.Po
rm -f libsbcpu.a
ar cru libsbcpu.a libsbcpu_a-sb_cpu.o 
ranlib libsbcpu.a
make[3]: Leaving directory `/root/sysbench/sysbench/tests/cpu'
Making all in fileio
make[3]: Entering directory `/root/sysbench/sysbench/tests/fileio'
cc -DHAVE_CONFIG_H -I. -I../../../config  -I../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT libsbfileio_a-sb_fileio.o -MD -MP -MF .deps/libsbfileio_a-sb_fileio.Tpo -c -o libsbfileio_a-sb_fileio.o `test -f 'sb_fileio.c' || echo './'`sb_fileio.c
mv -f .deps/libsbfileio_a-sb_fileio.Tpo .deps/libsbfileio_a-sb_fileio.Po
cc -DHAVE_CONFIG_H -I. -I../../../config  -I../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT libsbfileio_a-crc32.o -MD -MP -MF .deps/libsbfileio_a-crc32.Tpo -c -o libsbfileio_a-crc32.o `test -f 'crc32.c' || echo './'`crc32.c
mv -f .deps/libsbfileio_a-crc32.Tpo .deps/libsbfileio_a-crc32.Po
rm -f libsbfileio.a
ar cru libsbfileio.a libsbfileio_a-sb_fileio.o libsbfileio_a-crc32.o 
ranlib libsbfileio.a
make[3]: Leaving directory `/root/sysbench/sysbench/tests/fileio'
Making all in memory
make[3]: Entering directory `/root/sysbench/sysbench/tests/memory'
cc -DHAVE_CONFIG_H -I. -I../../../config  -I../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT libsbmemory_a-sb_memory.o -MD -MP -MF .deps/libsbmemory_a-sb_memory.Tpo -c -o libsbmemory_a-sb_memory.o `test -f 'sb_memory.c' || echo './'`sb_memory.c
mv -f .deps/libsbmemory_a-sb_memory.Tpo .deps/libsbmemory_a-sb_memory.Po
rm -f libsbmemory.a
ar cru libsbmemory.a libsbmemory_a-sb_memory.o 
ranlib libsbmemory.a
make[3]: Leaving directory `/root/sysbench/sysbench/tests/memory'
Making all in threads
make[3]: Entering directory `/root/sysbench/sysbench/tests/threads'
cc -DHAVE_CONFIG_H -I. -I../../../config  -I../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT libsbthreads_a-sb_threads.o -MD -MP -MF .deps/libsbthreads_a-sb_threads.Tpo -c -o libsbthreads_a-sb_threads.o `test -f 'sb_threads.c' || echo './'`sb_threads.c
mv -f .deps/libsbthreads_a-sb_threads.Tpo .deps/libsbthreads_a-sb_threads.Po
rm -f libsbthreads.a
ar cru libsbthreads.a libsbthreads_a-sb_threads.o 
ranlib libsbthreads.a
make[3]: Leaving directory `/root/sysbench/sysbench/tests/threads'
Making all in mutex
make[3]: Entering directory `/root/sysbench/sysbench/tests/mutex'
cc -DHAVE_CONFIG_H -I. -I../../../config  -I../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT libsbmutex_a-sb_mutex.o -MD -MP -MF .deps/libsbmutex_a-sb_mutex.Tpo -c -o libsbmutex_a-sb_mutex.o `test -f 'sb_mutex.c' || echo './'`sb_mutex.c
mv -f .deps/libsbmutex_a-sb_mutex.Tpo .deps/libsbmutex_a-sb_mutex.Po
rm -f libsbmutex.a
ar cru libsbmutex.a libsbmutex_a-sb_mutex.o 
ranlib libsbmutex.a
make[3]: Leaving directory `/root/sysbench/sysbench/tests/mutex'
Making all in db
make[3]: Entering directory `/root/sysbench/sysbench/tests/db'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/root/sysbench/sysbench/tests/db'
make[3]: Entering directory `/root/sysbench/sysbench/tests'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/root/sysbench/sysbench/tests'
make[2]: Leaving directory `/root/sysbench/sysbench/tests'
Making all in scripting
make[2]: Entering directory `/root/sysbench/sysbench/scripting'
Making all in lua
make[3]: Entering directory `/root/sysbench/sysbench/scripting/lua'
Making all in src
make[4]: Entering directory `/root/sysbench/sysbench/scripting/lua/src'
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lapi.o -MD -MP -MF .deps/lapi.Tpo -c -o lapi.o lapi.c
mv -f .deps/lapi.Tpo .deps/lapi.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lcode.o -MD -MP -MF .deps/lcode.Tpo -c -o lcode.o lcode.c
mv -f .deps/lcode.Tpo .deps/lcode.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT ldebug.o -MD -MP -MF .deps/ldebug.Tpo -c -o ldebug.o ldebug.c
mv -f .deps/ldebug.Tpo .deps/ldebug.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT ldo.o -MD -MP -MF .deps/ldo.Tpo -c -o ldo.o ldo.c
mv -f .deps/ldo.Tpo .deps/ldo.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT ldump.o -MD -MP -MF .deps/ldump.Tpo -c -o ldump.o ldump.c
mv -f .deps/ldump.Tpo .deps/ldump.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lfunc.o -MD -MP -MF .deps/lfunc.Tpo -c -o lfunc.o lfunc.c
mv -f .deps/lfunc.Tpo .deps/lfunc.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lgc.o -MD -MP -MF .deps/lgc.Tpo -c -o lgc.o lgc.c
mv -f .deps/lgc.Tpo .deps/lgc.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT llex.o -MD -MP -MF .deps/llex.Tpo -c -o llex.o llex.c
mv -f .deps/llex.Tpo .deps/llex.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lmem.o -MD -MP -MF .deps/lmem.Tpo -c -o lmem.o lmem.c
mv -f .deps/lmem.Tpo .deps/lmem.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lobject.o -MD -MP -MF .deps/lobject.Tpo -c -o lobject.o lobject.c
mv -f .deps/lobject.Tpo .deps/lobject.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lopcodes.o -MD -MP -MF .deps/lopcodes.Tpo -c -o lopcodes.o lopcodes.c
mv -f .deps/lopcodes.Tpo .deps/lopcodes.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lparser.o -MD -MP -MF .deps/lparser.Tpo -c -o lparser.o lparser.c
mv -f .deps/lparser.Tpo .deps/lparser.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lstate.o -MD -MP -MF .deps/lstate.Tpo -c -o lstate.o lstate.c
mv -f .deps/lstate.Tpo .deps/lstate.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lstring.o -MD -MP -MF .deps/lstring.Tpo -c -o lstring.o lstring.c
mv -f .deps/lstring.Tpo .deps/lstring.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT ltable.o -MD -MP -MF .deps/ltable.Tpo -c -o ltable.o ltable.c
mv -f .deps/ltable.Tpo .deps/ltable.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT ltm.o -MD -MP -MF .deps/ltm.Tpo -c -o ltm.o ltm.c
mv -f .deps/ltm.Tpo .deps/ltm.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lundump.o -MD -MP -MF .deps/lundump.Tpo -c -o lundump.o lundump.c
mv -f .deps/lundump.Tpo .deps/lundump.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lvm.o -MD -MP -MF .deps/lvm.Tpo -c -o lvm.o lvm.c
mv -f .deps/lvm.Tpo .deps/lvm.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lzio.o -MD -MP -MF .deps/lzio.Tpo -c -o lzio.o lzio.c
mv -f .deps/lzio.Tpo .deps/lzio.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lauxlib.o -MD -MP -MF .deps/lauxlib.Tpo -c -o lauxlib.o lauxlib.c
mv -f .deps/lauxlib.Tpo .deps/lauxlib.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lbaselib.o -MD -MP -MF .deps/lbaselib.Tpo -c -o lbaselib.o lbaselib.c
mv -f .deps/lbaselib.Tpo .deps/lbaselib.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT ldblib.o -MD -MP -MF .deps/ldblib.Tpo -c -o ldblib.o ldblib.c
mv -f .deps/ldblib.Tpo .deps/ldblib.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT liolib.o -MD -MP -MF .deps/liolib.Tpo -c -o liolib.o liolib.c
mv -f .deps/liolib.Tpo .deps/liolib.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lmathlib.o -MD -MP -MF .deps/lmathlib.Tpo -c -o lmathlib.o lmathlib.c
mv -f .deps/lmathlib.Tpo .deps/lmathlib.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT loslib.o -MD -MP -MF .deps/loslib.Tpo -c -o loslib.o loslib.c
mv -f .deps/loslib.Tpo .deps/loslib.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT ltablib.o -MD -MP -MF .deps/ltablib.Tpo -c -o ltablib.o ltablib.c
mv -f .deps/ltablib.Tpo .deps/ltablib.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT lstrlib.o -MD -MP -MF .deps/lstrlib.Tpo -c -o lstrlib.o lstrlib.c
mv -f .deps/lstrlib.Tpo .deps/lstrlib.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT loadlib.o -MD -MP -MF .deps/loadlib.Tpo -c -o loadlib.o loadlib.c
mv -f .deps/loadlib.Tpo .deps/loadlib.Po
cc -DHAVE_CONFIG_H -I. -I../../../../config  -I../../../../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -Wno-bad-function-cast -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT linit.o -MD -MP -MF .deps/linit.Tpo -c -o linit.o linit.c
mv -f .deps/linit.Tpo .deps/linit.Po
rm -f liblua.a
ar cru liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o linit.o 
ranlib liblua.a
make[4]: Leaving directory `/root/sysbench/sysbench/scripting/lua/src'
make[4]: Entering directory `/root/sysbench/sysbench/scripting/lua'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/scripting/lua'
make[3]: Leaving directory `/root/sysbench/sysbench/scripting/lua'
Making all in .
make[3]: Entering directory `/root/sysbench/sysbench/scripting'
cc -DHAVE_CONFIG_H -I. -I../../config  -I../../sysbench -I./lua/src -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT libsbscript_a-sb_script.o -MD -MP -MF .deps/libsbscript_a-sb_script.Tpo -c -o libsbscript_a-sb_script.o `test -f 'sb_script.c' || echo './'`sb_script.c
mv -f .deps/libsbscript_a-sb_script.Tpo .deps/libsbscript_a-sb_script.Po
cc -DHAVE_CONFIG_H -I. -I../../config  -I../../sysbench -I./lua/src -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT libsbscript_a-script_lua.o -MD -MP -MF .deps/libsbscript_a-script_lua.Tpo -c -o libsbscript_a-script_lua.o `test -f 'script_lua.c' || echo './'`script_lua.c
mv -f .deps/libsbscript_a-script_lua.Tpo .deps/libsbscript_a-script_lua.Po
rm -f libsbscript.a
ar cru libsbscript.a libsbscript_a-sb_script.o libsbscript_a-script_lua.o 
ranlib libsbscript.a
make[3]: Leaving directory `/root/sysbench/sysbench/scripting'
make[2]: Leaving directory `/root/sysbench/sysbench/scripting'
Making all in .
make[2]: Entering directory `/root/sysbench/sysbench'
cc -DHAVE_CONFIG_H -I. -I../config  -I../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT sysbench.o -MD -MP -MF .deps/sysbench.Tpo -c -o sysbench.o sysbench.c
sysbench.c: In function ‘runner_thread’:
sysbench.c:466: warning: ‘queue_start_time’ may be used uninitialized in this function
mv -f .deps/sysbench.Tpo .deps/sysbench.Po
cc -DHAVE_CONFIG_H -I. -I../config  -I../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT sb_timer.o -MD -MP -MF .deps/sb_timer.Tpo -c -o sb_timer.o sb_timer.c
mv -f .deps/sb_timer.Tpo .deps/sb_timer.Po
cc -DHAVE_CONFIG_H -I. -I../config  -I../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT sb_options.o -MD -MP -MF .deps/sb_options.Tpo -c -o sb_options.o sb_options.c
mv -f .deps/sb_options.Tpo .deps/sb_options.Po
cc -DHAVE_CONFIG_H -I. -I../config  -I../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT sb_logger.o -MD -MP -MF .deps/sb_logger.Tpo -c -o sb_logger.o sb_logger.c
mv -f .deps/sb_logger.Tpo .deps/sb_logger.Po
cc -DHAVE_CONFIG_H -I. -I../config  -I../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT db_driver.o -MD -MP -MF .deps/db_driver.Tpo -c -o db_driver.o db_driver.c
mv -f .deps/db_driver.Tpo .deps/db_driver.Po
cc -DHAVE_CONFIG_H -I. -I../config  -I../sysbench -D_XOPEN_SOURCE=500 -D_GNU_SOURCE  -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -MT sb_percentile.o -MD -MP -MF .deps/sb_percentile.Tpo -c -o sb_percentile.o sb_percentile.c
mv -f .deps/sb_percentile.Tpo .deps/sb_percentile.Po
/bin/sh ../libtool --tag=CC   --mode=link cc -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast   -Wstrict-prototypes -Wnested-externs -Winline   -funroll-loops  -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align        -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public      -L/u01/app/oracle/product/11.2.0/client_1/lib -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o sb_percentile.o tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/mutex/libsbmutex.a scripting/libsbscript.a    drivers/oracle/libsboracle.a /u01/app/oracle/product/11.2.0/client_1/lib/libclntsh.so scripting/lua/src/liblua.a -lm -ldl -lrt -laio -lm 
libtool: link: cc -W -Wall -Wextra -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Winline -funroll-loops -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align -pthread -O2 -ggdb3 -m64 -I /u01/app/oracle/product/11.2.0/client_1/rdbms/public -o sysbench sysbench.o sb_timer.o sb_options.o sb_logger.o db_driver.o sb_percentile.o /u01/app/oracle/product/11.2.0/client_1/lib/libclntsh.so  -L/u01/app/oracle/product/11.2.0/client_1/lib tests/fileio/libsbfileio.a tests/threads/libsbthreads.a tests/memory/libsbmemory.a tests/cpu/libsbcpu.a tests/mutex/libsbmutex.a scripting/libsbscript.a drivers/oracle/libsboracle.a scripting/lua/src/liblua.a -ldl -lrt -laio -lm -pthread
make[2]: Leaving directory `/root/sysbench/sysbench'
make[1]: Leaving directory `/root/sysbench/sysbench'
make[1]: Entering directory `/root/sysbench'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/root/sysbench'


make install 

[[email protected] sysbench]# make install
Making install in doc
make[1]: Entering directory `/root/sysbench/doc'
Making install in xsl
make[2]: Entering directory `/root/sysbench/doc/xsl'
make[3]: Entering directory `/root/sysbench/doc/xsl'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/root/sysbench/doc/xsl'
make[2]: Leaving directory `/root/sysbench/doc/xsl'
make[2]: Entering directory `/root/sysbench/doc'
make[3]: Entering directory `/root/sysbench/doc'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/sysbench/share/doc/sysbench" || /bin/mkdir -p "/usr/local/sysbench/share/doc/sysbench"
/usr/bin/install -c -m 644 manual.html '/usr/local/sysbench/share/doc/sysbench'
make[3]: Leaving directory `/root/sysbench/doc'
make[2]: Leaving directory `/root/sysbench/doc'
make[1]: Leaving directory `/root/sysbench/doc'
Making install in sysbench
make[1]: Entering directory `/root/sysbench/sysbench'
Making install in drivers
make[2]: Entering directory `/root/sysbench/sysbench/drivers'
Making install in oracle
make[3]: Entering directory `/root/sysbench/sysbench/drivers/oracle'
make[4]: Entering directory `/root/sysbench/sysbench/drivers/oracle'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/drivers/oracle'
make[3]: Leaving directory `/root/sysbench/sysbench/drivers/oracle'
make[3]: Entering directory `/root/sysbench/sysbench/drivers'
make[4]: Entering directory `/root/sysbench/sysbench/drivers'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/drivers'
make[3]: Leaving directory `/root/sysbench/sysbench/drivers'
make[2]: Leaving directory `/root/sysbench/sysbench/drivers'
Making install in tests
make[2]: Entering directory `/root/sysbench/sysbench/tests'
Making install in cpu
make[3]: Entering directory `/root/sysbench/sysbench/tests/cpu'
make[4]: Entering directory `/root/sysbench/sysbench/tests/cpu'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/tests/cpu'
make[3]: Leaving directory `/root/sysbench/sysbench/tests/cpu'
Making install in fileio
make[3]: Entering directory `/root/sysbench/sysbench/tests/fileio'
make[4]: Entering directory `/root/sysbench/sysbench/tests/fileio'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/tests/fileio'
make[3]: Leaving directory `/root/sysbench/sysbench/tests/fileio'
Making install in memory
make[3]: Entering directory `/root/sysbench/sysbench/tests/memory'
make[4]: Entering directory `/root/sysbench/sysbench/tests/memory'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/tests/memory'
make[3]: Leaving directory `/root/sysbench/sysbench/tests/memory'
Making install in threads
make[3]: Entering directory `/root/sysbench/sysbench/tests/threads'
make[4]: Entering directory `/root/sysbench/sysbench/tests/threads'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/tests/threads'
make[3]: Leaving directory `/root/sysbench/sysbench/tests/threads'
Making install in mutex
make[3]: Entering directory `/root/sysbench/sysbench/tests/mutex'
make[4]: Entering directory `/root/sysbench/sysbench/tests/mutex'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/tests/mutex'
make[3]: Leaving directory `/root/sysbench/sysbench/tests/mutex'
Making install in db
make[3]: Entering directory `/root/sysbench/sysbench/tests/db'
make[4]: Entering directory `/root/sysbench/sysbench/tests/db'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/tests/db'
make[3]: Leaving directory `/root/sysbench/sysbench/tests/db'
make[3]: Entering directory `/root/sysbench/sysbench/tests'
make[4]: Entering directory `/root/sysbench/sysbench/tests'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/tests'
make[3]: Leaving directory `/root/sysbench/sysbench/tests'
make[2]: Leaving directory `/root/sysbench/sysbench/tests'
Making install in scripting
make[2]: Entering directory `/root/sysbench/sysbench/scripting'
Making install in lua
make[3]: Entering directory `/root/sysbench/sysbench/scripting/lua'
Making install in src
make[4]: Entering directory `/root/sysbench/sysbench/scripting/lua/src'
make[5]: Entering directory `/root/sysbench/sysbench/scripting/lua/src'
make[5]: Nothing to be done for `install-exec-am'.
make[5]: Nothing to be done for `install-data-am'.
make[5]: Leaving directory `/root/sysbench/sysbench/scripting/lua/src'
make[4]: Leaving directory `/root/sysbench/sysbench/scripting/lua/src'
make[4]: Entering directory `/root/sysbench/sysbench/scripting/lua'
make[5]: Entering directory `/root/sysbench/sysbench/scripting/lua'
make[5]: Nothing to be done for `install-exec-am'.
make[5]: Nothing to be done for `install-data-am'.
make[5]: Leaving directory `/root/sysbench/sysbench/scripting/lua'
make[4]: Leaving directory `/root/sysbench/sysbench/scripting/lua'
make[3]: Leaving directory `/root/sysbench/sysbench/scripting/lua'
Making install in .
make[3]: Entering directory `/root/sysbench/sysbench/scripting'
make[4]: Entering directory `/root/sysbench/sysbench/scripting'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/root/sysbench/sysbench/scripting'
make[3]: Leaving directory `/root/sysbench/sysbench/scripting'
make[2]: Leaving directory `/root/sysbench/sysbench/scripting'
Making install in .
make[2]: Entering directory `/root/sysbench/sysbench'
make[3]: Entering directory `/root/sysbench/sysbench'
test -z "/usr/local/sysbench/bin" || /bin/mkdir -p "/usr/local/sysbench/bin"
  /bin/sh ../libtool   --mode=install /usr/bin/install -c sysbench '/usr/local/sysbench/bin'
libtool: install: /usr/bin/install -c sysbench /usr/local/sysbench/bin/sysbench
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/root/sysbench/sysbench'
make[2]: Leaving directory `/root/sysbench/sysbench'
make[1]: Leaving directory `/root/sysbench/sysbench'
make[1]: Entering directory `/root/sysbench'
make[2]: Entering directory `/root/sysbench'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/sysbench'
make[1]: Leaving directory `/root/sysbench'

[[email protected] sysbench]# ll
total 4116
-rw-r--r--. 1 root root    3661 Oct 13 12:27 CMakeLists.txt
-rw-r--r--. 1 root root   23294 Oct 13 12:27 db_driver.c
-rw-r--r--. 1 root root    9800 Oct 13 12:27 db_driver.h
-rw-r--r--. 1 root root  128160 Oct 13 12:32 db_driver.o
drwxr-xr-x. 6 root root    4096 Oct 13 12:30 drivers
-rw-r--r--. 1 root root   25072 Oct 13 12:30 Makefile
-rw-r--r--. 1 root root    1887 Oct 13 12:27 Makefile.am
-rw-r--r--. 1 root root   25551 Oct 13 12:29 Makefile.in
-rw-r--r--. 1 root root    3626 Oct 13 12:27 sb_list.h
-rw-r--r--. 1 root root   16223 Oct 13 12:27 sb_logger.c
-rw-r--r--. 1 root root    4554 Oct 13 12:27 sb_logger.h
-rw-r--r--. 1 root root  116288 Oct 13 12:32 sb_logger.o
-rw-r--r--. 1 root root   13731 Oct 13 12:27 sb_options.c
-rw-r--r--. 1 root root    3108 Oct 13 12:27 sb_options.h
-rw-r--r--. 1 root root  109584 Oct 13 12:32 sb_options.o
-rw-r--r--. 1 root root    3456 Oct 13 12:27 sb_percentile.c
-rw-r--r--. 1 root root    1570 Oct 13 12:27 sb_percentile.h
-rw-r--r--. 1 root root   64592 Oct 13 12:32 sb_percentile.o
-rw-r--r--. 1 root root    5982 Oct 13 12:27 sb_timer.c
-rw-r--r--. 1 root root    3796 Oct 13 12:27 sb_timer.h
-rw-r--r--. 1 root root   54528 Oct 13 12:32 sb_timer.o
-rw-r--r--. 1 root root    6860 Oct 13 12:27 sb_win.c
-rw-r--r--. 1 root root    2747 Oct 13 12:27 sb_win.h
drwxr-xr-x. 4 root root    4096 Oct 13 12:32 scripting
-rwxr-xr-x. 1 root root 3317973 Oct 13 12:32 sysbench
-rw-r--r--. 1 root root   34046 Oct 13 12:27 sysbench.c
-rw-r--r--. 1 root root    7149 Oct 13 12:27 sysbench.h
-rw-r--r--. 1 root root  165312 Oct 13 12:32 sysbench.o
drwxr-xr-x. 9 root root    4096 Oct 13 12:30 tests



最後貼上一些編譯引數與環境變數解釋


#1,首先從原始碼生成目標檔案(預處理,編譯,彙編),"-c"選項表示不執行連結步驟。
$(CC) $(CPPFLAGS) $(CFLAGS) example.c   -c   -o example.o
#2,然後將目標檔案連線為最終的結果(連線),"-o"選項用於指定輸出檔案的名字。
$(CC) $(LDFLAGS) example.o   -o example
#有一些軟體包一次完成四個步驟:
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) example.c   -o example
當然也有少數軟體包不遵守這些約定俗成的規範,比如:
#1,有些在命令列中漏掉應有的Makefile變數(注意:有些遺漏是故意的)
$(CC) $(CFLAGS) example.c    -c   -o example.o
$(CC) $(CPPFLAGS) example.c  -c   -o example.o
$(CC) example.o   -o example
$(CC) example.c   -o example
#2,有些在命令列中增加了不必要的Makefile變數
$(CC) $(CFLAGS) $(LDFLAGS) example.o   -o example
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) example.c   -c   -o example.o
當然還有極個別軟體包完全是"胡來":亂用變數(增加不必要的又漏掉了應有的)者有之,不用$(CC)者有之,不一而足.....
儘管將原始碼編譯為二進位制檔案的四個步驟由不同的程式(cpp,gcc/g++,as,ld)完成,但是事實上 cpp, as, ld 都是由 gcc/g++ 進行間接呼叫的。換句話說,控制了 gcc/g++ 就等於控制了所有四個步驟。從 Makefile 規則中的編譯命令可以看出,編譯工具的行為全靠 CC/CXX CPPFLAGS CFLAGS/CXXFLAGS LDFLAGS 這幾個變數在控制。當然理論上控制編譯工具行為的還應當有 AS ASFLAGS ARFLAGS 等變數,但是實踐中基本上沒有軟體包使用它們。

那麼我們如何控制這些變數呢?一種簡易的做法是首先設定與這些 Makefile 變數同名的環境變數並將它們 export 為全域性,然後執行 configure 指令碼,大多數 configure 指令碼會使用這同名的環境變數代替 Makefile 中的值。但是少數 configure 指令碼並不這樣做(比如GCC-3.4.6和Binutils-2.16.1的指令碼就不傳遞LDFLAGS),你必須手動編輯生成的 Makefile 檔案,在其中尋找這些變數並修改它們的值,許多原始碼包在每個子資料夾中都有 Makefile 檔案,真是一件很累人的事!

CC 與 CXX

這是 C 與 C++ 編譯器命令。預設值一般是 “gcc” 與 “g++”。這個變數本來與優化沒有關係,但是有些人因為擔心軟體包不遵守那些約定俗成的規範,害怕自己苦心設定的 CFLAGS/CXXFLAGS/LDFLAGS 之類的變數被忽略了,而索性將原本應當放置在其它變數中的選項一股老兒塞到 CC 或 CXX 中,比如:CC=”gcc -march=k8 -O2 -s”。這是一種怪異的用法,本文不提倡這種做法,而是提倡按照變數本來的含義使用變數。

CPPFLAGS

這是用於預處理階段的選項。不過能夠用於此變數的選項,看不出有哪個與優化相關。如果你實在想設一個,那就使用下面這兩個吧:

-DNDEBUG

“NDEBUG”是一個標準的 ANSI 巨集,表示不進行除錯編譯。

-D_FILE_OFFSET_BITS=64

大多數包使用這個來提供大檔案(>2G)支援。

CFLAGS 與 CXXFLAGS

CFLAGS 表示用於 C 編譯器的選項,CXXFLAGS 表示用於 C++ 編譯器的選項。這兩個變數實際上涵蓋了編譯和彙編兩個步驟。大多數程式和庫在編譯時預設的優化級別是”2″(使用”-O2″選項)並且帶有除錯符號來編 譯,也就是 CFLAGS=”-O2 -g”, CXXFLAGS=$CFLAGS 。事實上,”-O2″已經啟用絕大多數安全的優化選項了。另一方面,由於大部分選項可以同時用於這兩個變數,所以僅在最後講述只能用於其中一個變數的選 項。[提醒]下面所列選項皆為非預設選項,你只要按需新增即可。

先說說”-O3″在”-O2″基礎上增加的幾項:

-finline-functions

允許編譯器選擇某些簡單的函式在其被呼叫處展開,比較安全的選項,特別是在CPU二級快取較大時建議使用。

-funswitch-loops

將迴圈體中不改變值的變數移動到迴圈體之外。

-fgcse-after-reload

為了清除多餘的溢位,在過載之後執行一個額外的載入消除步驟。

另外:

-fomit-frame-pointer

對於不需要棧指標的函式就不在暫存器中儲存指標,因此可以忽略儲存和檢索地址的程式碼,同時對許多函式提供一個額外的暫存器。所有”-O”級別都開啟 它,但僅在偵錯程式可以不依靠棧指標執行時才有效。在AMD64平臺上此選項預設開啟,但是在x86平臺上則預設關閉。建議顯式的設定它。

-falign-functions=N
-falign-jumps=N
-falign-loops=N
-falign-labels=N

這四個對齊選項在”-O2″中開啟,其中的根據不同的平臺N使用不同的預設值。如果你想指定不同於預設值的N,也可以單獨指定。比如,對於L2- cache>=1M的cpu而言,指定 -falign-functions=64 可能會獲得更好的效能。建議在指定了 -march 的時候不明確指定這裡的值。

除錯選項:

-fprofile-arcs

在使用這一選項編譯程式並執行它以建立包含每個程式碼塊的執行次數的檔案後,程式可以再次使用 -fbranch-probabilities 編譯,檔案中的資訊可以用來優化那些經常選取的分支。如果沒有這些資訊,gcc將猜測哪個分支將被經常執行以進行優化。這類優化資訊將會存放在一個以源文 件為名字的並以”.da”為字尾的檔案中。

全域性選項:

-pipe

在編譯過程的不同階段之間使用管道而非臨時檔案進行通訊,可以加快編譯速度。建議使用。

目錄選項:

–sysroot=dir

將dir作為邏輯根目錄。比如編譯器通常會在 /usr/include 和 /usr/lib 中搜索標頭檔案和庫,使用這個選項後將在 dir/usr/include 和 dir/usr/lib 目錄中搜索。如果使用這個選項的同時又使用了 -isysroot 選項,則此選項僅作用於庫檔案的搜尋路徑,而 -isysroot 選項將作用於標頭檔案的搜尋路徑。這個選項與優化無關,但是在 CLFS 中有著神奇的作用。

程式碼生成選項:

-fno-bounds-check

關閉所有對陣列訪問的邊界檢查。該選項將提高陣列索引的效能,但當超出陣列邊界時,可能會造成不可接受的行為。

-freg-struct-return

如果struct和聯合體足夠小就通過暫存器返回,這將提高較小結構的效率。如果不夠小,無法容納在一個暫存器中,將使用記憶體返回。建議僅在完 全使用GCC編譯的系統上才使用。

-fpic

生成可用於共享庫的位置獨立程式碼。所有的內部定址均通過全域性偏移表完成。要確定一個地址,需要將程式碼自身的記憶體位置作為表中一項插入。該選項產生可 以在共享庫中存放並從中載入的目標模組。

-fstack-check

為防止程式棧溢位而進行必要的檢測,僅在多執行緒環境中執行時才可能需要它。

-fvisibility=hidden

設定預設的ELF映象中符號的可見性為隱藏。使用這個特性可以非常充分的提高連線和載入共享庫的效能,生成更加優化的程式碼,提供近乎完美的API輸 出和防止符號碰撞。我們強烈建議你在編譯任何共享庫的時候使用該選項。參見 -fvisibility-inlines-hidden 選項。

硬體體系結構相關選項[僅僅針對x86與x86_64]:

-march=cpu-type

為特定的cpu-type編譯二進位制程式碼(不能在更低級別的cpu上執行)。Intel可以用:pentium2, pentium3(=pentium3m), pentium4(=pentium4m), pentium-m, prescott, nocona, core2(GCC-4.3新增) 。AMD可以用:k6-2(=k6-3), athlon(=athlon-tbird), athlon-xp(=athlon-mp), k8(=opteron=athlon64=athlon-fx)

-mfpmath=sse

P3和athlon-xp級別及以上的cpu支援”sse”標量浮點指令。僅建議在P4和K8以上級別的處理器上使用該選項。

-malign-double

將double, long double, long long對齊於雙位元組邊界上;有助於生成更高速的程式碼,但是程式的尺寸會變大,並且不能與未使用該選項編譯的程式一起工作。

-m128bit-long-double

指定long double為128位,pentium以上的cpu更喜歡這種標準,並且符合x86-64的ABI標準,但是卻不附合i386的ABI標準。

-mregparm=N

指定用於傳遞整數引數的暫存器數目(預設不使用暫存器)。0<=N<=3 ;注意:當N>0時你必須使用同一引數重新構建所有的模組,包括所有的庫。

-msseregparm

使用SSE暫存器傳遞float和double引數和返回值。注意:當你使用了這個選項以後,你必須使用同一引數重新構建所有的模組,包括所有的 庫。

-mmmx
-msse
-msse2
-msse3
-m3dnow
-mssse3(沒寫錯!GCC-4.3新增)
-msse4.1(GCC-4.3新增)
-msse4.2(GCC-4.3新增)
-msse4(含4.1和4.2,GCC-4.3新增)

是否使用相應的擴充套件指令集以及內建函式,按照自己的cpu選擇吧!

-maccumulate-outgoing-args

指定在函式引導段中計算輸出引數所需最大空間,這在大部分現代cpu中是較快的方法;缺點是會明顯增加二進位制檔案尺寸。

-mthreads

支援Mingw32的執行緒安全異常處理。對於依賴於執行緒安全異常處理的程式,必須啟用這個選項。使用這個選項時會定義”-D_MT”,它將包含使用 選項”-lmingwthrd”連線的一個特殊的執行緒輔助庫,用於為每個執行緒清理異常處理資料。

-minline-all-stringops

預設時GCC只將確定目的地會被對齊在至少4位元組邊界的字串操作內聯程序序程式碼。該選項啟用更多的內聯並且增加二進位制檔案的體積,但是可以提升依 賴於高速 memcpy, strlen, memset 操作的程式的效能。

-minline-stringops-dynamically

GCC-4.3新增。對未知尺寸字串的小塊操作使用內聯程式碼,而對大塊操作仍然呼叫庫函式,這是比”-minline-all- stringops”更聰明的策略。決定策略的演算法可以通過”-mstringop-strategy”控制。

-momit-leaf-frame-pointer

不為葉子函式在暫存器中儲存棧指標,這樣可以節省暫存器,但是將會使除錯變的困難。注意:不要與 -fomit-frame-pointer 同時使用,因為會造成程式碼效率低下。

-m64

生成專門運行於64位環境的程式碼,不能運行於32位環境,僅用於x86_64[含EMT64]環境。

-mcmodel=small

[預設值]程式和它的符號必須位於2GB以下的地址空間。指標仍然是64位。程式可以靜態連線也可以動態連線。僅用於