Maybe you could strip LTO stuff from the .a before hashing with a call like https://github.com/openSUSE/brp-check-suse/blob/master/brp-15-strip-debug#L40