Cherry-pick some patches from upstream to support building with `-integer-8` (i.e., the 64-bit integer variants of the libraries).
Cherry-pick some patches from upstream to support building with `-integer-8` (i.e., the 64-bit integer variants of the libraries).