Hello,
I've recently added DTrace USDT probes to a project using libtool. On
Solaris, this requires running dtrace with all affected object files
as arguments. The tool modifies those object files and generates a new
object file, which must all be linked into the executable/library.
This step cannot be done incrementally, it must be repeated for each
executable/library on all the original object files.
The solution I have come up with is to use
lib_la_LIBADD=generated.o
together with a rule
generated.o: ../dir1/lib1.la ../dir2/lib2.la obj1.lo
calling a custom shell script with these arguments that extracts
the .libs/*.a library corresponding to the .la to a temporary
directory, overwrites the .o files with a guess of their originals,
runs dtrace -G over these temporary object files and updates the .a
files with the modified files.
As you may guess, libtool doesn't like being passed a .o file, and my
heuristics for retrieving the locations of .a and .o files aren't
entirely safe.
Seeing that libtool itself appears to do something similar by
extracting its .a libraries to .lax folders before linking iiuc,
wouldn't it make sense to rather extend libtool with DTrace support?
Has anybody already looked into this, or do you have any suggestions
how to go about that?
Thanks,
Andreas
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool