On 09/11/2013 11:36 PM, Michael Tokarev wrote:
> 
> A solution which I proposed at the very beginning -- to export
> a "hashed" init function from modules, and call it from the
> main executable.  Like, instead of, say, qemu_module_init(),
> call qemu_module_init_0xdeadbeaf(), where 0xdeadbeaf is a
> hash of some build-dependent value.  This should be enough
> to keep it going.

And of course, since we store sources in git, you already have such a
hash value at your disposal:
 $CC -DBUILD_HASH=$(git rev-parse HEAD) ...
coupled with
 glue(qemu_module_init_, BUILD_HASH)
where the only trick is to figure out how to bake in a hash when
building from a released tarball rather than git.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to