Is there a way to get a universal (32 and 64bit) version of openssl installed? I am trying to cross compile some C code for an android application and it seems like things are currently failing because homebrew, at least by default, only builds a 64bit lib.
There’s no easy way to go about this, since the current Xcode and/or CLT support 32-bit targets anymore. Moreover, if you’re trying to cross-compile some C code for an Android application, you almost certainly do not want a universal version of openssl (assuming it would be linked into the Android application). You would probably want to find an
arm-linux-androideabi cross toolchain of some kind (assuming 32-bit ARM) or
aarch64 (assuming ARMv8/aarch64). It’s not just the bitness of the compiled code that matters here; you also need a Linux (specifically android-flavored Linux if it’s non-kernel) cross compiler, not just a compiler that will give you 32-bit Mach executables that would run on older versions of macOS.
None of those toolchains ship in Homebrew right now. If there’s enough demand for them, I’d consider writing formulae for them (currently, the only non-native toolchain in Homebrew is for