The green flowers are served:
Three source codes are required for compiling oprofile: binutils, popt, and oprofile.
Linux version (because it is compiled in a 64-bit Linux system ----- please refer to "compile a 32-bit program on a 64-bit Linux ")
Binutils
#! /Bin/sh
CD binutils-2.21
. /Configure cflags =-M32 cxxflags =-M32 fflags =-M32 fcflags =-M32 ldflags = "-l/usr/lib32" -- with-kernel-support -- prefix =/home/ henry/workspace/OPF/PC/build/binutils -- enable-shared
Make ldflags = "-All-static"
Make & make install
CD.
Popt
#! /Bin/sh
CD popt-1.14/
Ac_cv_va_copy = yes. /configure cflags =-M32 cxxflags =-M32 fflags =-M32 fcflags =-M32 ldflags = "-l/usr/lib32" -- with-kernel-support -- enable-static -- prefix =/home/Henry/workspace/OPF/PC/build/popt
Make & make install
CD ..
Oprofile
#! /Bin/sh
CD oprofile-0.9.6/
. /Configure cflags =-M32 cxxflags =-M32 fflags =-M32 fcflags =-M32 ldflags = "-l/usr/lib32" -- enable-static -- With-kernel-support -- prefix =/home/Henry/workspace/OPF/PC/build/oprofile/-- With-extra-libs =/home/Henry/workspace/OPF/PC/build/popt/lib/ -- With-extra-nodes des =/home/Henry/workspace/OPF/PC/build/popt/include/-- With-binutils =/home/Henry/workspace/OPF/PC/ build/binutils
Make ldflags = "-All-static-L/home/Henry/workspace/OPF/build/binutils/lib-L/home/Henry/workspace/OPF/build/popt/lib /-L/usr/lib32"
Make install
CD ..
Copy libiberty. h and libiberty. lib to the binutils directory.
We will introduce the android arm version in the future. Please pay attention to it. Thank you!
Compile oprofile with source code