I was unable to cross-compile this crate. I fixed this by checking
what cross-compiling configure options and environment variables
libsodium-sys sets, since that was a crate I had on hand that did
cross-compile.
This patch sets CC, CFLAGS, and --host to their appropriate values.
CFLAGS is set conditionally if it isn't empty, because otherwise it'll
clobber default CFLAGS like -O2.
I was unable to cross-compile this crate. I fixed this by checking what cross-compiling configure options and environment variables libsodium-sys sets, since that was a crate I had on hand that did cross-compile.
This patch sets CC, CFLAGS, and --host to their appropriate values. CFLAGS is set conditionally if it isn't empty, because otherwise it'll clobber default CFLAGS like -O2.