mirror of
https://github.com/brain-hackers/lab
synced 2026-04-17 15:36:58 +09:00
Add gprof test code
This commit is contained in:
17
gprof/Makefile
Normal file
17
gprof/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
export CFLAGS = -pg # Use gprof
|
||||
export CFLAGS += -static # Static link
|
||||
export CFLAGS += -O0 # Heavy optimization
|
||||
export CFLAGS += -Wl,--defsym,_mcount=mcount # Link _mcount to mcount
|
||||
export CFLAGS += -mapcs-frame # Use standard calling convention
|
||||
#export CFLAGS += -fno-omit-frame-pointer # Don't omit fp (might not necessary to enable this)
|
||||
|
||||
AppMain.exe:
|
||||
@arm-mingw32ce-gcc -o AppMain $(CFLAGS) profile.c
|
||||
|
||||
AppMain.mitigated.s:
|
||||
@arm-mingw32ce-gcc -O0 -S -fno-omit-frame-pointer -mapcs-frame profile.c
|
||||
@mv profile.s AppMain.mitigated.s
|
||||
|
||||
.PHONY:
|
||||
clean:
|
||||
@rm -f AppMain.exe AppMain*.s
|
||||
Reference in New Issue
Block a user