Run ctfconvert/ctfmerge for all objects 08/13308/4
authorAndrew Deason <adeason@sinenomine.net>
Thu, 6 Sep 2018 18:42:11 +0000 (13:42 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 28 Sep 2018 12:30:07 +0000 (08:30 -0400)
commitc1d39153da00d5525b2f7874b2d214a7f1b1bb86
tree80ee8c2b937b211849d6c45d5b3c93cfc2605cb7
parent78ed034603781a979687a45c08eb8b13e515e8bf
Run ctfconvert/ctfmerge for all objects

Commit 88cb536f (autoconf: detect ctf-tools and add ctf to libafs)
introduced running ctfconvert and ctfmerge for libafs on Solaris, but
didn't add any CTF data for userspace code. This commit causes the
same commands to be run for every binary that we build (if the ctf
tools are available).

To accomplish this, also refactor how we run ctfconvert and ctfmerge.
The approach in commit 88cb536f would require us to modify the
makefile rule for every executable to run RUN_CTFCONVERT and
RUN_CTFMERGE, which is somewhat impractical. So instead in this
commit, we modify all of our *_CCRULE and *_LDRULE variables to wrap
the compiler invocation with the new CC_WRAPPER script. This means our
*RULE variables change from something like this:

    FOO_CCRULE = $(RUN_CC) $(CC) $(XXX_FLAGS) -o $@

to something like this:

    FOO_CCRULE = $(RUN_CC) $(CC_WRAPPER) $(CC) $(XXX_FLAGS) -o $@

CC_WRAPPER expands to the script src/config/cc-wrapper, which just
runs ctfconvert or ctfmerge on the relevant files after the
compiler/linker runs. If the CTF tools are not configured, CC_WRAPPER
expands to nothing, to limit our impact on other platforms.

This commit was developed in collaboration with
mbarbosa@sinenomine.net.

Change-Id: Id19ba9d739edc68f01c2db7d5caa20758ec8144a
Reviewed-on: https://gerrit.openafs.org/13308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
configure.ac
src/cf/ctf-tools.m4
src/config/.gitignore
src/config/Makefile.config.in
src/config/Makefile.pthread.in
src/config/cc-wrapper.in [new file with mode: 0644]
src/libafs/Makefile.common.in
src/libafs/MakefileProto.SOLARIS.in
src/tsalvaged/Makefile.in