Closed tbetker-rs closed 6 years ago
Would CFLAGS ?=
work for your purposes? +=
-ing e.g. -O2
is usually not what people want.
Yes, that would work fine (I tested it). A few warnings are lost, though:
pwait.c: In function 'main':
pwait.c:227:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (send(sk_nl, nl_hdr, nl_hdr->nlmsg_len, 0) != nl_hdr->nlmsg_len) {
^~
extrace.c: In function 'main':
extrace.c:526:48: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (send(sk_nl, nl_hdr, nl_hdr->nlmsg_len, 0) != nl_hdr->nlmsg_len) {
^~
Well, these warnings are for the developers anyway.
We use Yocto to cross-compile
extrace
for our target system. However, Yocto wants to set its own CFLAGS, so overwriting it inMakefile
causes some build issues.In our project, we simply patch
Makefile
to replaceCFLAGS=...
byCFLAGS+=...
, which works fine. It would be helpful if you could integrate this (or something similar) into yourMakefile
so that the Yocto build works out of the box.