[PATCH] D71627: [Clang FE, SystemZ] Recognize -mrecord-mcount CL option.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 22 11:08:38 PST 2019
MaskRay added a comment.
In D71627#1794127 <https://reviews.llvm.org/D71627#1794127>, @uweigand wrote:
> In D71627#1794108 <https://reviews.llvm.org/D71627#1794108>, @MaskRay wrote:
>
> > Fixed by 0792ef72564071f21b727d0de3a14d565950290f <https://reviews.llvm.org/rG0792ef72564071f21b727d0de3a14d565950290f>. My Linux powerpc64le build is good now.
> >
> > `make ARCH=powerpc CROSS_COMPILE=powerpc64le-linux-gnu- CC=~/llvm/Release/bin/clang LD=~/llvm/Release/bin/ld.lld O=out/powerpc64le powernv_defconfig zImage.epapr -j 30`
>
>
> Thank for you the fix, and sorry for the disruption!
>
> There is another limitation of the current implementation: -mrecord-mcount / -mnop-mcount are only supported with -mfentry, not with the "regular" mcount profiling. This is just a limitation of the current implementation (but in any case, the Linux kernel build will only use it in this combination anyway).
>
> We currently have checks that this combination is specified, but those are also in the code generator. Should they be moved to the driver as well?
gcc/config/s390/s390.c requires -mnop-mcount to be used together with -mfentry, but gcc/config/i386/i386-options.c doesn't.
% clang -target s390x -pg -mnop-mcount -c a.c
error: option '-mnop-mcount' cannot be specified without '-mfentry'
1 error generated.
% gcc -pg -mnop-mcount -fno-pic -c a.c
(GCC performs some other checks. I noted some in commit 527b0f8c7448707aa6b8159e6e4707a49f1dcb87 <https://reviews.llvm.org/rG527b0f8c7448707aa6b8159e6e4707a49f1dcb87>, but I am not sure whether we should document all... These options are only used by Linux kernel, and more specifically, ftrace.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71627/new/
https://reviews.llvm.org/D71627
More information about the llvm-commits
mailing list