问题描述
我正在尝试gprof我的程序.我想要逐行分析.
但是,我似乎无法编写语法.我使用的是"make"而不是"gcc",因此请仅提供适合make的建议.如果您能给我完整的"make"语法,我将不胜感激.
基于此网站:
http://sourceware.org/binutils/docs/gprof/Output-Options.html [ ^ ]
http://sourceware.org/binutils/docs/gprof/Line_002dby_002dline.html [ ^ ]
这是我输入的内容:
使USE_LOCAL_HEADERS = 0 LDFLAGS =''-L.''BASE_CFLAGS = -m32 CFLAGS =''-fopenmp -pg -l -g''
输出为:
Hi,
I am trying to gprof my program. I want a line-by-line profiling.
However, I can''t seem to get the syntax write. I am using "make" and not "gcc" so please help only with suggestions that fit make. I wouldbe very grateful if you can give me the full "make" syntax.
Based on this website:
http://sourceware.org/binutils/docs/gprof/Output-Options.html[^]
http://sourceware.org/binutils/docs/gprof/Line_002dby_002dline.html[^]
Here is what I am inputting:
make USE_LOCAL_HEADERS=0 LDFLAGS=''-L.'' BASE_CFLAGS=-m32 CFLAGS=''-fopenmp -pg -l -g''
The output is:
/usr/bin/ld: cannot find -l-g
collect2: ld returned 1 exit status
make[2]: *** [build/release-linux-ppc64/ioquake3.ppc64] Error 1
make[2]: Leaving directory `/r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean'
make[1]: *** [targets] Error 2
make[1]: Leaving directory `/r/home7/yasir/minoru/cfe2/yasirTemp/ioquake3dev/svfb_201110271440/ioquake3dev_clean'
make: *** [release] Error 2
我需要选项"-l",-g"和"-pg".
问候,
Linux noob
I need option "-l", "-g" and "-pg".
Regards,
Linux noob
推荐答案
这篇关于GCC编译选项语法问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!