gcc does not support "-pg"
I want to enable “profiling” on my application for debug. So I enabled “-pg” option when build the application. But during linking, it report can’t find “gcrt1.o”. As I know “gcrt1.0” is part of glibc.
~/test $ gcc test.c -o test -pg test.c: In function 'test': test.c:3:5: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] printf("test"); ^~~~~~ test.c:3:5: warning: incompatible implicit declaration of built-in function 'printf' test.c:3:5: note: include '<stdio.h>' or provide a declaration of 'printf' /usr/lib/gcc/x86_64-alpine-linux-musl/6.4.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find gcrt1.o: No such file or directory collect2: error: ld returned 1 exit status
(from redmine: issue id 9191, created on 2018-08-06)