leahneukirchen / extrace

trace exec() calls system-wide
Other
122 stars 9 forks source link

Don't overwrite CFLAGS #5

Closed tbetker-rs closed 6 years ago

tbetker-rs commented 6 years ago

We use Yocto to cross-compile extrace for our target system. However, Yocto wants to set its own CFLAGS, so overwriting it in Makefile causes some build issues.

In our project, we simply patch Makefile to replace CFLAGS=... by CFLAGS+=..., which works fine. It would be helpful if you could integrate this (or something similar) into your Makefile so that the Yocto build works out of the box.

leahneukirchen commented 6 years ago

Would CFLAGS ?= work for your purposes? +=-ing e.g. -O2 is usually not what people want.

tbetker-rs commented 6 years ago

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) {
                                                ^~
leahneukirchen commented 6 years ago

Well, these warnings are for the developers anyway.