anakryiko / retsnoop

Investigate kernel error call stacks
BSD 2-Clause "Simplified" License
186 stars 32 forks source link

Makefile: use LDFLAGS for linking #58

Closed martinetd closed 7 months ago

martinetd commented 8 months ago

(This is the first patch from #56)

The link rule normally uses LDFLAGS and not CFLAGS.

For backwards compatibility though keep both as compilers will just ignore compile flags when linking.

Also note that LDFLAGS would also apply to the bpftool build, which might cause problems if some flags intended for retsnoop cannot link with it (e.g. -static for bpftool requires more libraries to be available as .a); if that becomes a problem we might need a way to differentiate the two in the future.